cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A035162 Number of positive odd solutions to equation x^2 + 7y^2 = 8n.

This page as a plain text file.
%I A035162 #36 Feb 16 2025 08:32:37
%S A035162 1,1,0,1,0,0,1,1,1,0,2,0,0,1,0,1,0,1,0,0,0,2,2,0,1,0,0,1,2,0,0,1,0,0,
%T A035162 0,1,2,0,0,0,0,0,2,2,0,2,0,0,1,1,0,0,2,0,0,1,0,2,0,0,0,0,1,1,0,0,2,0,
%U A035162 0,0,2,1,0,2,0,0,2,0,2,0,1,0,0,0,0,2,0,2,0,0,0,2,0,0,0,0,0,1,2,1,0,0,0,0,0
%N A035162 Number of positive odd solutions to equation x^2 + 7y^2 = 8n.
%C A035162 Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
%C A035162 Also number of solutions to the equation x + 7y = n in triangular numbers give the same sequence offset by 1. E.g., for n = 10, 3 + 7*1 = 10 + 7*0 = 10 so there are two solutions.
%D A035162 B. C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, see p. 303.
%D A035162 J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 346.
%H A035162 Seiichi Manyama, <a href="/A035162/b035162.txt">Table of n, a(n) for n = 1..10000</a>
%H A035162 Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>.
%H A035162 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>.
%F A035162 Expansion of q * psi(q) * psi(q^7) in powers of q where psi() is a Ramanujan theta function. - _Michael Somos_, Apr 24 2015
%F A035162 Expansion of (eta(q^2) * eta(q^14))^2 / (eta(q) * eta(q^7)) in powers of q.
%F A035162 Coefficients in expansion of Dirichlet series Product_p (1-(Kronecker(m,p)+1)*p^(-s)+Kronecker(m,p)*p^(-2s))^(-1) for m = -28.
%F A035162 G.f.: Sum_{K>0} (x^k - x^(3*k) - x^(5*k) + x^(9*k) + x^(11*k) - x^(13*k)) / (1 - x^(14*k)).
%F A035162 Multiplicative with a(2^e) = a(7^e) = 1, a(p^e) = e+1 if p == 1, 2, 4 (mod 7), a(p^e) = (1 + (-1)^e)/2 if p == 3, 5, 6 (mod 7). - _Michael Somos_, Sep 10 2005
%F A035162 Euler transform of period 14 sequence [ 1, -1, 1, -1, 1, -1, 2, -1, 1, -1, 1, -1, 1, -2, ...].
%F A035162 a(2*n) = a(7*n) = a(n). a(7*n + 3) = a(7*n + 5) = a(7*n + 6) = 0.
%F A035162 G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = u1^3*u6 - u2^3*u3 - 3*u1*u6^3 + 3*u2*u3^3 + 3*u2*u6*(u1*(u2-u1) + 3*u3*(u6-u3)). - _Michael Somos_, Sep 10 2005
%F A035162 G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u*w*(u-2*v) - v*(v-2*w)^2. - _Michael Somos_, Sep 10 2005
%F A035162 G.f.: Sum_{k>0} x^k * (1 - x^(2*k)) * (1 - x^(4*k)) * (1 - x^(6*k)) / (1 - x^(14*k)) = x * Product_{k>0} (1 - x^(2*k)) * (1 - x^(14*k)) / ((1 - x^(2*k-1)) * (1 - x^(14*k-7))).
%F A035162 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/(2*sqrt(7)) = 0.593705... . - _Amiram Eldar_, Oct 25 2022
%e A035162 For n=11, 5^2 + 7*3^2 = 9^2 + 7*1^2 = 8*11 so a(11)=2.
%e A035162 G.f. = q + q^2 + q^4 + q^7 + q^8 + q^9 + 2*q^11 + q^14 + q616 + q^18 + 2*q^22 + ...
%t A035162 a[ n_] := If[ n < 1, 0, Sum[ KroneckerSymbol[ -28, d], { d, Divisors[ n]}]]; (* _Michael Somos_, Apr 24 2015 *)
%t A035162 a[ n_] := SeriesCoefficient[ EllipticTheta[ 2, 0, q^(1/2)] EllipticTheta[ 2, 0, q^(7/2)] / 4, {q, 0, n}]; (* _Michael Somos_, Apr 24 2015 *)
%t A035162 QP = QPochhammer; s = (QP[q^2]*QP[q^14])^2/(QP[q]*QP[q^7]) + O[q]^100; CoefficientList[s, q] (* _Jean-François Alcover_, Nov 27 2015, adapted from PARI *)
%o A035162 (PARI) {a(n) = if( n<1, 0, sumdiv(n, d, kronecker(-28, d)))};
%o A035162 (PARI) {a(n) = if( n<0, 0, sum(i=1, sqrtint(8*n \ 7), (i%2) * issquare(8*n - 7*i^2)))};
%o A035162 (PARI) {a(n) = if( n<1, 0, direuler(p=2, n, 1 / (1 - X) / (1 - kronecker(-28, p) * X))[n])};
%o A035162 (PARI) {a(n) = my(A); if( n<1, 0, n--; A = x * O(x^n); polcoeff( eta(x^2 + A)^2 * eta(x^14 + A)^2 / (eta(x + A) * eta(x^7 + A)), n))}; /* _Michael Somos_, Apr 24 2015 */
%Y A035162 Cf. A000122, A000700, A010054, A121373.
%K A035162 nonn,mult
%O A035162 1,11
%A A035162 _N. J. A. Sloane_
%E A035162 Entry revised by _N. J. A. Sloane_, Jul 31 2006