OFFSET
1,3
COMMENTS
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
John A. Ewell, On Sums of Triangular Numbers and Sums of Squares, The American Mathematical Monthly, 99:8 (October 1992), pp. 752-757.
T. Khovanova, K. Knop, and A. Radul, Baron Munchhausen's Sequence, J. Int. Seq. 13 (2010) # 10.8.7.
L. K. Mork, Keith Sullivan, Trenton Vogt, and Darin J. Ulness, A group theoretical approach to the partitioning of integers: Application to triangular numbers, squares, and centered polygonal numbers, Australasian J. Comb. (2021) Vol. 80, No. 3, 305-321.
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..]
-- Reinhard Zumkeller, Jul 25 2014
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
Entry revised by N. J. A. Sloane, Dec 20 2004
STATUS
approved