How to Use
Enter s (sides) and n (index):
- P(s,n): The nth s-gonal number
- Test: Is m an s-gonal number?
- Sequence: First N values
Common Types
- Triangular (s=3): 1,3,6,10,15,21...
- Square (s=4): 1,4,9,16,25...
- Pentagonal (s=5): 1,5,12,22,35...
- Hexagonal (s=6): 1,6,15,28,45...
Fermat's Theorem
Every positive integer is the sum of at most s s-gonal numbers. For triangulars: at most 3 (Gauss's eureka theorem). For squares: at most 4 (Lagrange). For pentagons: at most 5 (Cauchy).
Step-by-Step Instructions
- 1Choose s (sides).
- 2Enter n.
- 3Get P(s,n).
- 4Test membership.
- 5View sequence.