A020757 Numbers that are not the sum of two triangular numbers.
5, 8, 14, 17, 19, 23, 26, 32, 33, 35, 40, 41, 44, 47, 50, 52, 53, 54, 59, 62, 63, 68, 71, 74, 75, 77, 80, 82, 85, 86, 89, 95, 96, 98, 103, 104, 107, 109, 113, 116, 117, 118, 122, 124, 125, 128, 129, 131, 134, 138, 140, 143, 145, 147, 149, 152, 155, 158, 161, 162, 166, 167
Offset: 1
Keywords
Examples
3 = 0 + 3 and 7 = 1 + 6 are not terms, but 8 = 1 + 1 + 6 is a term.
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, Vol. 99, No. 8 (October 1992), pp. 752-757. [From _Ant King_, Dec 02 2010]
- U. V. Satyanarayana, On the representation of numbers as sums of triangular numbers, The Mathematical Gazette, 45(351):40-43, February 1961. [From _Hans J. H. Tuenter_, Oct 11 2009]
Crossrefs
Complement of A020756.
Programs
-
Haskell
a020757 n = a020757_list !! (n-1) a020757_list = filter ((== 0) . a052343) [0..] -- Reinhard Zumkeller, Jul 25 2014
-
Mathematica
data = Reduce[m (m + 1) + n (n + 1) == 2 # && 0 <= m && 0 <= n, {m, n}, Integers] & /@ Range[167]; Position[data, False] // Flatten (* Ant King, Dec 05 2010 *) t = Array[PolygonalNumber, 18, 0]; Complement[Range@ 169, Flatten[ Outer[ Plus, t, t]]] (* Robert G. Wilson v, Aug 07 2024 *)
-
PARI
is(n)=my(m9=n%9,f); if(m9==5 || m9==8, return(1)); f=factor(4*n+1); for(i=1,#f~, if(f[i,1]%4==3 && f[i,2]%2, return(1))); 0 \\ Charles R Greathouse IV, Mar 17 2022
Comments