OFFSET
1,1
COMMENTS
Numbers n such that 8n+2 is in A085989. - Robert Israel, Mar 06 2017
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Fermat's Polygonal Number Theorem
FORMULA
A053603(a(n)) > 0. - Reinhard Zumkeller, Jun 28 2013
A061336(a(n)) = 2. - M. F. Hasler, Mar 06 2017
EXAMPLE
666 is in the sequence because we can write 666 = 435 + 231 = binomial(22,2) + binomial(30,2).
MAPLE
isA051533 := proc(n)
local a, ta;
for a from 1 do
ta := A000217(a) ;
if 2*ta > n then
return false;
end if;
if isA000217(n-ta) then
return true;
end if;
end do:
end proc:
for n from 1 to 200 do
if isA051533(n) then
printf("%d, ", n) ;
end if;
end do: # R. J. Mathar, Dec 16 2015
MATHEMATICA
f[k_] := If[!
Head[Reduce[m (m + 1) + n (n + 1) == 2 k && 0 < m && 0 < n, {m, n},
Integers]] === Symbol, k, 0]; DeleteCases[Table[f[k], {k, 1, 108}], 0] (* Ant King, Nov 22 2010 *)
nn=50; tri=Table[n(n+1)/2, {n, nn}]; Select[Union[Flatten[Table[tri[[i]]+tri[[j]], {i, nn}, {j, i, nn}]]], #<=tri[[-1]] &]
With[{nn=70}, Take[Union[Total/@Tuples[Accumulate[Range[nn]], 2]], nn]] (* Harvey P. Dale, Jul 16 2015 *)
PROG
(Haskell)
a051533 n = a051533_list !! (n-1)
a051533_list = filter ((> 0) . a053603) [1..]
-- Reinhard Zumkeller, Jun 28 2013
(PARI) is(n)=for(k=ceil((sqrt(4*n+1)-1)/2), (sqrt(8*n-7)-1)\2, if(ispolygonal(n-k*(k+1)/2, 3), return(1))); 0 \\ Charles R Greathouse IV, Jun 09 2015
CROSSREFS
KEYWORD
easy,nonn,nice
AUTHOR
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de)
STATUS
approved