|
|
A051533
|
|
Numbers that are the sum of two positive triangular numbers.
|
|
31
|
|
|
2, 4, 6, 7, 9, 11, 12, 13, 16, 18, 20, 21, 22, 24, 25, 27, 29, 30, 31, 34, 36, 37, 38, 39, 42, 43, 46, 48, 49, 51, 55, 56, 57, 58, 60, 61, 64, 65, 66, 67, 69, 70, 72, 73, 76, 79, 81, 83, 84, 87, 88, 90, 91, 92, 93, 94, 97, 99, 100, 101, 102, 106, 108
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
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;
|
|
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..]
(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
|
Cf. A061336: minimal number of triangular numbers that sum up to n.
|
|
KEYWORD
|
easy,nonn,nice
|
|
AUTHOR
|
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de)
|
|
STATUS
|
approved
|
|
|
|