OFFSET
0,9
COMMENTS
I have proved that a(n) > 0 for all n, i.e., any nonnegative integer can be expressed as the sum of four generalized octagonal numbers. I can show that a(n) = 1 if 3*n+4 is among 7, 13, 19, 31, 43, 2^(2k), 5*2^(2k+1), 11*2^(2k+1), 23*2^(2k+1) (k = 0,1,2,...), and conjecture the converse.
I also conjecture that each nonnegative integer can be written as the sum of two heptagonal numbers, a second heptagonal number and a generalized heptagonal number.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Zhi-Wei Sun, On universal sums of polygonal numbers, arXiv:0905.0635 [math.NT], 2009-2015.
Zhi-Wei Sun, A result similar to Lagrange's theorem, arXiv:1503.03743 [math.NT], 2015.
EXAMPLE
a(60) = 1 since 60 = 1*(3*1-2) + (-1)*(3*(-1)-2) + 3*(3*3-2) + (-3)*(3*(-3)-2).
a(1876) = 1 since 1876 = (-5)*(3*(-5)-2) + (-5)*(3*(-5)-2) + 11*(3*11-2) + (-21)*(3*(-21)-2).
a(15700) = 1 since 15700 = 11*(3*11-2) + (-21)*(3*(-21)-2) + 43*(3*43-2) + (-53)*(3*(-53)-2).
a(21844) = 1 since 21844 = 43*(3*43-2) + 43*(3*43-2) + 43*(3*43-2) + 43*(3*43-2).
a(30036) = 1 since 30036 = (-21)*(3*(-21)-2) + (-21)*(3*(-21)-2) + 43*(3*43-2) + (-85)*(3*(-85)-2).
MATHEMATICA
T[n_]:=Union[Table[x(3x-2), {x, -Floor[(Sqrt[3n+1]-1)/3], Floor[(Sqrt[3n+1]+1)/3]}]]
Do[r=0; Do[If[n-Part[T[n], x]-Part[T[n], y]-Part[T[n], z]<Part[T[n], z], Goto[aa]]; If[MemberQ[Table[Part[T[n], w], {w, z, Length[T[n]]}], n-Part[T[n], x]-Part[T[n], y]-Part[T[n], z]]==True, r=r+1]; Label[aa]; Continue, {x, 1, Length[T[n]]}, {y, x, Length[T[n]]}, {z, y, Length[T[n]]}]; Print[n, " ", r]; Continue, {n, 0, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 11 2015
STATUS
approved