Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Standard view
Full view
of .
×
0 of .
Results for:
P. 1
Testing Polygonal Numbers Candidates

# Testing Polygonal Numbers Candidates

Ratings: 0|Views: 300|Likes:
N. Lindblad. 2007. A General Algorithm for Testing Polygonal Candidates.
N. Lindblad. 2007. A General Algorithm for Testing Polygonal Candidates.

Published by: Emanuele Sabetta on Oct 23, 2012

### Availability:

Read on Scribd mobile: iPhone, iPad and Android.
See More
See less

10/23/2012

pdf

text

original

A General Algorithm For Testing PolygonalCandidates
Niklas LindbladApril 3, 2007
Abstract
This paper describes a general formula for reversing polygonalnumbers and how it can be applied to test any integer for s-gonalproperties.
1 The Deﬁnition of a Polygonal Number
Mathematically the common formula for the polygonal number
s,n
where
s
is the number of sides in the polygon and
n
declares that it is the
n
th
s
-gonalnumber can be written as:
s,n
=
(
s
2)
n
2
(
s
4)
n
2
2 Rewriting as an Equation
In order to form a reverse function that will provide
n
for every
s,n
the goalis to ﬁrst rewrite the general formula for polygonal numbers as an equation:1

s,n
=
(
s
2)
n
2
(
s
4)
n
2
2
s,n
= (
s
2)
n
2
(
s
4)
n
(
s
2)
n
2
(
s
4)
n
2
s,n
= 0
(
s
2)(
n
2
(
s
4)(
s
2)
n
2(
s
2)
s,n
) = 0By solving the above second degree equation using the general solving for-mula the solution is:
n
=
(
s
4)(
s
2
2
±

(
s
4)(
s
2)
22
+
2(
s
2)
s,n
Due to the nature of series only the solution
n
1
is usable since a positionwithin a series cannot be negative:
n
1
=
(
s
4)(
s
2
2
+

(
s
4)(
s
2)
22
+
2(
s
2)
s,n
Furthermore simpliﬁed:
n
1
=
s
42
s
4
+

(
s
4)
2
(2
s
4)
2
+
2
s,n
s
2
3 Conditional Testing
By calling the function
r
(
s,n
) a reverse function of
s,n
the function willgive
n
for the
s
-gonal number
s,n
if:
n
and
n >
0If the above conditions are met then the following condition will be true:
s,n
=
s,r
(
s,n
)
2

## Activity (1)

### Showing

AllMost RecentReviewsAll NotesLikes
You've already reviewed this. Edit your review.