This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A254885 Number of ways to write n as the sum of two squares and a positive triangular number. 7
 1, 1, 2, 1, 2, 2, 2, 2, 1, 3, 4, 2, 1, 3, 3, 3, 2, 2, 5, 3, 3, 2, 5, 2, 2, 5, 2, 5, 3, 4, 4, 4, 3, 1, 6, 3, 5, 5, 3, 5, 5, 3, 2, 5, 3, 8, 5, 2, 3, 4, 5, 3, 8, 4, 7, 6, 3, 3, 4, 5, 5, 6, 3, 5, 7, 4, 4, 8, 2, 6, 9, 2, 6, 6, 6, 4, 4, 5, 6, 7, 5, 6, 6, 4, 4, 11, 4, 6, 5, 3, 9, 6, 5, 4, 11, 6, 3, 4, 3, 9 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS We have shown that a(n) > 0 for all n > 0. In fact, if n is a positive triangular number T(x) = x*(x+1)/2, then n = 0^2 + 0^2 + T(x); if n > 0 is not a triangular number, then by Theorem 1(ii) of the reference of Sun in 2007, there are nonnegative integers a,b,c,u,v,w such that n = a^2 + b^2 + T(c) = u^2 + v^2 + T(w) with a + b odd and u + v even, hence c and w cannot both be zero. This result is stronger than Euler's observation that any nonnegative integer can be written as the sum of two squares and a triangular number. We have also proved that any positive integer can be written as the sum of a positive square and two triangular numbers. LINKS Zhi-Wei Sun, Table of n, a(n) for n = 1..10000 Zhi-Wei Sun, Mixed sums of squares and triangular numbers, Acta Arith. 127(2007), 103-113. Zhi-Wei Sun, On universal sums a*x^2+b*y^2+c*f(z), a*T_x+b*T_y+f(z) and a*T_x+b*y^2+c*f(z), arXiv:1502.03056 [math.NT], 2015. EXAMPLE a(4) = 1 since 4 = 0^2 + 1^2 + 2*3/2. a(9) = 1 since 9 = 2^2 + 2^2 + 1*2/2. a(13) = 1 since 13 = 1^2 + 3^2 + 2*3/2. a(34) = 1 since 34 = 2^2 + 3^2 + 6*7/2. MATHEMATICA TQ[n_]:=n>0&&IntegerQ[Sqrt[8n+1]] Do[r=0; Do[If[TQ[n-x^2-y^2], r=r+1], {x, 0, Sqrt[n]}, {y, 0, x}]; Print[n, " ", r]; Continue, {n, 1, 10000}] CROSSREFS Cf. A000217, A000290. Sequence in context: A106030 A104888 A286885 * A108461 A321004 A258595 Adjacent sequences:  A254882 A254883 A254884 * A254886 A254887 A254888 KEYWORD nonn AUTHOR Zhi-Wei Sun, Feb 10 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 21 12:35 EDT 2019. Contains 327253 sequences. (Running on oeis4.)