This site is supported by donations to The OEIS Foundation. Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A088534 Number of representations of n by the quadratic form x^2 + xy + y^2 with 0 <= x <= y. 14
 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,50 REFERENCES B. C. Berndt, "On a certain theta-function in a letter of Ramanujan from Fitzroy House", Ganita 43 (1992), 33-43. LINKS Reinhard Zumkeller, Table of n, a(n) for n = 0..10000 FORMULA a(A003136(n)) > 0; a(A034020(n)) = 0; a(A118886(n)) > 1; a(A198772(n)) = 1; a(A198773(n)) = 2; a(A198774(n)) = 3; a(A198775(n)) = 4; a(A198799(n)) = n and a(m) <> n for m < A198799(n). - Reinhard Zumkeller, Oct 30 2011, corrected by M. F. Hasler, Mar 05 2018 EXAMPLE From M. F. Hasler, Mar 05 2018: (Start) a(0) = a(1) = 1 since 0 = 0^2 + 0*0 + 0^2 and 1 = 0^2 + 0*1 + 1^2. a(2) = 0 since 2 cannot be written as x^2 + xy + y^2. a(49) = 2 since 49 = 0^2 + 0*7 + 7^2 = 3^2 + 3*5 + 5^2. (End) MATHEMATICA a[n_] := Sum[Boole[i^2 + i*j + j^2 == n], {i, 0, n}, {j, 0, i}]; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Jun 20 2018 *) PROG (PARI) a(n)=sum(i=0, n, sum(j=0, i, if(i^2+i*j+j^2-n, 0, 1))) (PARI) A088534(n, d)=sum(x=0, sqrt(n\3), sum(y=max(x, sqrtint(n-x^2)\2), sqrtint(n-2*x^2), x^2+x*y+y^2==n&&(!d||!printf("%d", [x, y]))))\\ Set 2nd arg = 1 to print all decompositions, with 0 <= x <= y. - M. F. Hasler, Mar 05 2018 (Haskell) a088534 n = length    [(x, y) | y <- [0..a000196 n], x <- [0..y], x^2 + x*y + y^2 == n] a088534_list = map a088534 [0..] -- Reinhard Zumkeller, Oct 30 2011 (Julia) function A088534(n)     n % 3 == 2 && return 0     M = Int(round(2*sqrt(n/3)))     count = 0     for y in 0:M, x in 0:y         n == x^2 + y^2 + x*y && (count += 1)     end     return count end A088534list(upto) = [A088534(n) for n in 0:upto] A088534list(104) |> println # Peter Luschny, Mar 17 2018 CROSSREFS Cf. A003136, A034020, A000196. Cf. A118886 (indices of values > 1), A198772 (indices of 1's), A198773 (indices of 2's), A198774 (indices of 3's), A198775 (indices of 4's), A198799 (index of 1st term = n). Sequence in context: A308264 A065335 A230264 * A178602 A216279 A025441 Adjacent sequences:  A088531 A088532 A088533 * A088535 A088536 A088537 KEYWORD nonn AUTHOR Benoit Cloitre, Nov 16 2003 EXTENSIONS Edited by M. F. Hasler, Mar 05 2018 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 December 16 09:06 EST 2019. Contains 330020 sequences. (Running on oeis4.)