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.

A093518 Number of ways of representing n as the sum of two (not necessarily distinct) generalized pentagonal numbers.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 0, 2, 1, 2, 1, 1, 2, 0, 1, 1, 0, 2, 1, 2, 0, 1, 3, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 0, 2, 2, 2, 0, 1, 1, 0, 2, 1, 0, 1, 1, 3, 1, 0, 1, 1, 2, 2, 1, 0, 1, 2, 1, 1, 0, 2, 0, 0, 1, 2, 1, 2, 1, 0, 2, 0, 3, 1, 2, 1, 0, 2, 1, 1, 1, 1, 0, 0, 1, 0, 1, 4, 1, 1, 0, 1, 2, 0, 2, 1, 1, 2, 1
Offset: 0

Views

Author

Jon Perry, Mar 29 2004

Keywords

Examples

			a(7)=2 as we have 7+0 = 5+2.
		

Crossrefs

Cf. A001318 (generalized pentagonal numbers), A093519 (where a(n)=0).

Programs

  • Maple
    GP:= [0,seq(op([m*(3*m-1)/2, m*(3*m+1)/2]),m=1..11)]:
    V:= Array(0..200):
    for i from 1 to 23 do
      for j from 1 to i do
        r:= GP[i]+GP[j];
        if r > 200 then break fi;
        V[r]:= V[r]+1
    od od:
    convert(V,list); # Robert Israel, Feb 26 2025
  • PARI
    { v=vector(101); v[1]=0; for (i=1,50, v[2*i]=i*(3*i-1)/2; v[2*i+1]=i*(3*i+1)/2); x=vector(500); for (a=1,50, for (b=a,50, if (v[a]+v[b]<500, x[v[a]+v[b]+1]++))); x }

Extensions

Definition clarified by Robert Israel, Feb 26 2025