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.

A308488 a(n) is the smallest n-gonal pyramidal number greater than 1 which is also n-gonal; a(n) = 0 when one does not exist.

Original entry on oeis.org

10, 4900, 0, 946, 0, 1045, 0, 175, 23725, 0, 0, 441, 0, 0, 975061, 0, 0, 3578401, 0, 0, 10680265, 0, 0, 27453385, 0, 0, 63016921, 23001, 0, 132361021, 0, 0, 258815701, 0, 0, 477132085, 0, 0, 55202400, 0, 245905, 1408778281, 0, 0, 2286380881, 0, 0, 314755, 0, 0
Offset: 3

Views

Author

Davis Smith, Aug 22 2019

Keywords

Comments

a(n) is the smallest n-gonal number, N, such that, for some m > 1, N is the sum of the first m n-gonal numbers, 0 when one does not exist.
For n > 5, if n == 2 (mod 3), then a(n) > 0 and a(n) <= A080851(n - 2,((n-2)^2)/3 - 3), but there are cases where a(n) > 0 and n !== 2 (mod 3), e.g., a(10).

Crossrefs

Programs

  • PARI
    A308488_vec(lim,J=10^6)={my(
        pyramid(s,n)=(3*n^2 + n^3*(s-2)-n*(s-5))/6,
        check(s)=j=if(lift(Mod(s,3))==2,((s-2)^2)/3-2,J);m=3;while(m<=j,if(ispolygonal(pyramid(s,m),s),return(pyramid(s,m)),m++));0);
    vector(lim,s,check(s+2))}