A020756 Numbers that are the sum of two triangular numbers.
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
Offset: 1
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.
Crossrefs
Programs
-
Haskell
a020756 n = a020756_list !! (n-1) a020756_list = filter ((> 0) . a052343) [0..] -- Reinhard Zumkeller, Jul 25 2014
-
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 *)
-
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
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.
Extensions
Entry revised by N. J. A. Sloane, Dec 20 2004
Comments