A333822 Number of ways to write n as the difference of two k-gonal numbers for k >= 3.
1, 3, 3, 5, 4, 6, 4, 8, 5, 7, 6, 8, 5, 10, 7, 9, 6, 8, 6, 13, 8, 8, 7, 12, 6, 12, 8, 10, 9, 10, 7, 13, 8, 12, 10, 13, 6, 13, 9, 12, 8, 10, 8, 17, 11, 10, 10, 14, 8, 16, 9, 10, 9, 14, 10, 19, 9, 8, 10, 14, 7, 16, 12, 19, 12, 12, 7, 14, 12, 12, 11, 14, 8
Offset: 2
Keywords
Examples
For n = 7, the a(7) = 6 ways to write 7 as the difference of k-gonal numbers are: A000217(4) - A000217(2) = 10 - 3 (triangular), A000217(7) - A000217(6) = 28 - 21 (triangular), A000290(4) - A000290(3) = 16 - 9 (square), A000326(3) - A000326(2) = 12 - 5 (pentagonal), A000566(2) - A000566(0) = 7 - 0 (heptagonal), and A000567(2) - A000567(1) = 8 - 1 (octagonal).
Links
- Peter Kagey, Table of n, a(n) for n = 2..5000
- OEIS Wiki, Figurate numbers: Polygonal numbers
Crossrefs
Programs
-
Mathematica
b := 74 CoefficientList[ Series[Sum[ Sum[x^(k*(p*k - (p - 2))/2)/(1 - x^(p*k)), {k, 1, b}] - x, {p, 1, b - 1}], {x, 0, b}], x]
Formula
G.f.: Sum_{m>=1} (-x + Sum_{k>=1} x^A139601(m-1,k)/(1 - x^(m*k))).
Comments