OFFSET
1,2
COMMENTS
Conjecture: (i) a(n) exists for any n > 0. Moreover, n^2 is the main term of a(n) as n tends to the infinity.
(ii) a(n) is never divisible by 5. Also, for any n > 1 the term a(n) is not congruent to 1 modulo 5.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..200
Zhi-Wei Sun, On universal sums of polygonal numbers, arXiv:0905.0635 [math.NT], 2009-2015.
EXAMPLE
a(3) = 9 since 9 is the first positive integer m with A254573(m)=3. Note that 9 = 2*3 +1*(3*1+1)/2 + 1*(3*1-1)/2 = 1*2 + 1*(3*1+1)/2 + 2*(3*2-1)/2 = 1*2 + 2*(3*2+1)/2 + 0*(3*0-1)/2.
MATHEMATICA
sQ[n_]:=IntegerQ[Sqrt[4n+1]]
Do[Do[m=0; Label[aa]; m=m+1; r=0; Do[If[sQ[m-y(3y+1)/2-z(3z-1)/2], r=r+1; If[r>n, Goto[aa]]], {y, 0, (Sqrt[24m+1]-1)/6}, {z, 0, (Sqrt[24(m-y(3y+1)/2)+1]+1)/6}]; If[r==n, Print[n, " ", m]; Goto[bb], Goto[aa]]]; Label[bb]; Continue, {n, 1, 60}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 02 2015
STATUS
approved