This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A333822 #18 Nov 19 2020 22:33:59 %S A333822 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, %T A333822 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, %U A333822 8,10,14,7,16,12,19,12,12,7,14,12,12,11,14,8 %N A333822 Number of ways to write n as the difference of two k-gonal numbers for k >= 3. %C A333822 Records occur at indices 2, 3, 5, 7, 9, 15, 21, 45, 57, 81, 105, 145, 217, 225, 385, 435, 441, 495, 561, 651, 705, 945, 1105, ... - _Peter Kagey_, Nov 18 2020 %H A333822 Peter Kagey, <a href="/A333822/b333822.txt">Table of n, a(n) for n = 2..5000</a> %H A333822 OEIS Wiki, <a href="http://oeis.org/wiki/Figurate_numbers#Polygonal_numbers">Figurate numbers: Polygonal numbers</a> %F A333822 G.f.: Sum_{m>=1} (-x + Sum_{k>=1} x^A139601(m-1,k)/(1 - x^(m*k))). %e A333822 For n = 7, the a(7) = 6 ways to write 7 as the difference of k-gonal numbers are: %e A333822 A000217(4) - A000217(2) = 10 - 3 (triangular), %e A333822 A000217(7) - A000217(6) = 28 - 21 (triangular), %e A333822 A000290(4) - A000290(3) = 16 - 9 (square), %e A333822 A000326(3) - A000326(2) = 12 - 5 (pentagonal), %e A333822 A000566(2) - A000566(0) = 7 - 0 (heptagonal), and %e A333822 A000567(2) - A000567(1) = 8 - 1 (octagonal). %t A333822 b := 74 %t A333822 CoefficientList[ %t A333822 Series[Sum[ %t A333822 Sum[x^(k*(p*k - (p - 2))/2)/(1 - x^(p*k)), {k, 1, b}] - x, {p, 1, %t A333822 b - 1}], {x, 0, b}], x] %Y A333822 Cf. A000217, A000290, A000326, A000566, A000567, A139601. %Y A333822 Cf. A177025. %Y A333822 Analogous sequences for specific values of k: A001227 (k=3), A034178 (k=4), A333815 (k=5), A333816 (k=6), A333817 (k=7), A333818 (k=8). %K A333822 nonn %O A333822 2,2 %A A333822 _Peter Kagey_, Apr 06 2020