cp's OEIS Frontend

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.

A333822 Number of ways to write n as the difference of two k-gonal numbers for k >= 3.

Original entry on oeis.org

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

Views

Author

Peter Kagey, Apr 06 2020

Keywords

Comments

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

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).
		

Crossrefs

Cf. A177025.
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).

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))).