A093518 Number of ways of representing n as the sum of two (not necessarily distinct) generalized pentagonal numbers.
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
Keywords
Examples
a(7)=2 as we have 7+0 = 5+2.
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
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