This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A034178 Number of solutions to n = a^2 - b^2, a > b >= 0. 21
 1, 0, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 1, 0, 2, 2, 1, 0, 1, 1, 2, 0, 1, 2, 2, 0, 2, 1, 1, 0, 1, 2, 2, 0, 2, 2, 1, 0, 2, 2, 1, 0, 1, 1, 3, 0, 1, 3, 2, 0, 2, 1, 1, 0, 2, 2, 2, 0, 1, 2, 1, 0, 3, 3, 2, 0, 1, 1, 2, 0, 1, 3, 1, 0, 3, 1, 2, 0, 1, 3, 3, 0, 1, 2, 2, 0, 2, 2, 1, 0, 2, 1, 2, 0, 2, 4, 1, 0, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,9 COMMENTS Also, number of ways n can be expressed as the sum of one or more consecutive odd numbers. (E.g., 45 = 45 = 13+15+17 = 5+7+9+11+13, so a(45)=3.) - Naohiro Nomoto, Feb 26 2002 a(A042965(n))>0, a(A016825(n))=0; also number of occurrences of n in A094728. - Reinhard Zumkeller, May 24 2004 It appears a(n) can be found by adding together the divisor pairs of n and finding the number of even results. For example: n=9 has the divisor pairs (1,9) and (3,3); adding the pairs: 1+9=10 is even and 3+3=6 is even, so a(9)=2. Another example: n=90 has the divisor pairs (1,96) (2,48) (3,32) (4,24) (6,16) (8,12); when each pair is added there are 4 even results, so a(96)=4. - Gregory Bryant, Dec 06 2016 LINKS T. D. Noe, Table of n, a(n) for n = 1..2000 Edward T. H. Wang, Problem 1717, Crux Mathematicorum, page 30, Vol. 19, Jan. 93. FORMULA From Naohiro Nomoto, Feb 26 2002: (Start) a(2k) = A038548(2k) - A001227(k). a(2k+1) = A038548(2k+1). (End) From Bernard Schott, Apr 11 2019: (Start) (see Crux link) a(n) = 0 if n == 2 (mod 4) a(n) = floor((tau(n) + 1)/2) if n == 1 or n == 3 (mod 4) a(n) = floor((tau(n/4) + 1)/2) if n == 0 (mod 4). (End) G.f.: Sum_{i>=1} Sum_{j>=i} Product_{k=i..j} x^(2*k-1). - Ilya Gutkovskiy, Apr 18 2019 EXAMPLE G.f. = x + x^3 + x^4 + x^5 + x^7 + x^8 + 2*x^9 + x^11 + x^12 + x^13 + 2*x^15 + ... From Bernard Schott, Apr 19 2019: (Start) a(8) = floor((tau(2) + 1)/2) = floor(3/2) = 1 and 8 = 3^2 - 1^2. a(9) = floor((tau(9) + 1)/2) = floor(4/2) = 2 and 9 = 3^2 - 0^2 = 5^2 - 4^2. a(10) = 0 and a^2 - b^2 = 10 has no solution. a(11) = floor(tau(11) + 1)/2 = floor(3/2) = 1 and 11 = 6^2 - 5^2.  (End) MATHEMATICA nn = 100; Table[0, {nn}]; Do[n = a^2 - b^2; If[n <= nn, t[[n]]++], {a, nn}, {b, 0, a - 1}]] (* T. D. Noe, May 04 2011 *) PROG (PARI) a(n)=sum(k=1, sqrtint(n), (n-k^2)%(2*k)==0) \\ Charles R Greathouse IV, Sep 27 2012 (PARI) a(n)=sumdiv(n, d, n>=d^2 && (n-d^2)%(2*d)==0) \\ Charles R Greathouse IV, Sep 27 2012 CROSSREFS Cf. A058957, A016825. Sequence in context: A088434 A205745 A243223 * A317531 A074169 A099362 Adjacent sequences:  A034175 A034176 A034177 * A034179 A034180 A034181 KEYWORD easy,nonn,nice AUTHOR 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 August 21 19:04 EDT 2019. Contains 326168 sequences. (Running on oeis4.)