|
|
A020756
|
|
Numbers that are the sum of two triangular numbers.
|
|
20
|
|
|
0, 1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 13, 15, 16, 18, 20, 21, 22, 24, 25, 27, 28, 29, 30, 31, 34, 36, 37, 38, 39, 42, 43, 45, 46, 48, 49, 51, 55, 56, 57, 58, 60, 61, 64, 65, 66, 67, 69, 70, 72, 73, 76, 78, 79, 81, 83, 84, 87, 88, 90, 91, 92, 93, 94, 97, 99, 100, 101, 102, 105, 106, 108
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
The possible sums of a square and a promic, i.e., x^2+n(n+1), e.g., 3^2 + 2*3 = 9 + 6 = 15 is present. - Jon Perry, May 28 2003
|
|
LINKS
|
|
|
FORMULA
|
Numbers n such that 4n+1 is the sum of two squares, i.e. such that 4n+1 is in A001481. Hence n is a member if and only if 4n+1 = odd square * product of distinct primes of form 4k+1. (Fred Helenius and others, Dec 18 2004)
Equivalently, we may say that a positive integer n can be partitioned into a sum of two triangular numbers if and only if every 4 k + 3 prime factor in the canonical form of 4 n + 1 occurs with an even exponent. - Ant King, Nov 29 2010
Also, the values of n for which 8n+2 can be partitioned into a sum of two squares of natural numbers. - Ant King, Nov 29 2010
Closed under the operation f(x, y) = 4*x*y + x + y.
|
|
MATHEMATICA
|
q[k_] := If[! Head[Reduce[m (m + 1) + n (n + 1) == 2 k && 0 <= m && 0 <= n, {m, n}, Integers]] === Symbol, k, {}]; DeleteCases[Table[q[i], {i, 0, 108}], {}] (* Ant King, Nov 29 2010 *)
Take[Union[Total/@Tuples[Accumulate[Range[0, 20]], 2]], 80] (* Harvey P. Dale, May 02 2012 *)
|
|
PROG
|
(PARI) v=vector(200); vc=0; for (x=0, 10, for (y=0, 10, v[vc++ ]=x^2+y*(y+1))); v=vecsort(v); v
(PARI) is(n)=my(f=factor(4*n+1)); for(i=1, #f~, if(f[i, 1]%4==3 && f[i, 2]%2, return(0))); 1 \\ Charles R Greathouse IV, Jul 05 2013
(Haskell)
a020756 n = a020756_list !! (n-1)
a020756_list = filter ((> 0) . a052343) [0..]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|