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.

Showing 1-9 of 9 results.

A374295 a(n) is the smallest positive integer k such that A096936(k) = n.

Original entry on oeis.org

1, 7, 4, 91, 2401, 28, 117649, 1729, 196, 31213, 282475249, 364, 13841287201, 1529437, 9604, 53599, 33232930569601, 2548, 1628413597910449, 593047, 470596, 3672178237, 3909821048582988049, 6916, 68574961, 179936733613, 33124, 29059303, 459986536544739960976801, 124852
Offset: 1

Views

Author

Seiichi Manyama, Jul 02 2024

Keywords

Comments

a(n) is the smallest positive integer k such that A033716(k) = 2*n,

Examples

			   n        |        a(n)
------------+-------------------------------------
   2        |            7.
   3 = 3*1  |            4.
   4        |           91 =     7 * 13.
   5        |         2401 =     7^4.
   6 = 3*2  |           28 = 4 * 7.
   7        |       117649 =     7^6.
   8        |         1729 =     7 * 13 * 19.
   9 = 3*3  |          196 = 4 * 7^2.
  10        |        31213 =     7^4 * 13.
  11        |    282475249 =     7^10.
  12 = 3*4  |          364 = 4 * 7 * 13.
  13        |  13841287201 =     7^12.
  14        |      1529437 =     7^6 * 13.
  15 = 3*5  |         9604 = 4 * 7^4.
  16        |        53599 =     7 * 13 * 19 * 31.
  17        |                    7^16.
  18 = 3*6  |         2548 = 4 * 7^2 * 13.
  19        |                    7^18.
  20        |       593047 =     7^4 * 13 * 19.
  21 = 3*7  |       470596 = 4 * 7^6.
  22        |   3672178237 =     7^10 * 13.
  23        |                    7^22.
  24 = 3*8  |         6916 = 4 * 7 * 13 * 19.
  25        |     68574961 =     7^4 * 13^4.
  26        | 179936733613 =     7^12 * 13.
  27 = 3*9  |        33124 = 4 * 7^2 * 13^2.
  28        |     29059303 =     7^6 * 13 * 19.
  29        |                    7^28.
  30 = 3*10 |       124852 = 4 * 7^4 * 13.
		

Crossrefs

Formula

If p is prime, a(p) = 7^(p-1).
a(n) is divisible by 7 for n > 3.

A033762 Product t2(q^d); d | 3, where t2 = theta2(q) / (2 * q^(1/4)).

Original entry on oeis.org

1, 1, 0, 2, 1, 0, 2, 0, 0, 2, 2, 0, 1, 1, 0, 2, 0, 0, 2, 2, 0, 2, 0, 0, 3, 0, 0, 0, 2, 0, 2, 2, 0, 2, 0, 0, 2, 1, 0, 2, 1, 0, 0, 0, 0, 4, 2, 0, 2, 0, 0, 2, 0, 0, 2, 2, 0, 0, 2, 0, 1, 0, 0, 2, 2, 0, 4, 0, 0, 2, 0, 0, 0, 3, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 3, 2, 0
Offset: 0

Views

Author

Keywords

Comments

Number of solutions of 8*n + 4 = x^2 + 3*y^2 in positive odd integers. - Michael Somos, Sep 18 2004
Half the number of integer solutions of 4*n + 2 = x^2 + y^2 + z^2 where 0 = x + y + z and x and y are odd. - Michael Somos, Jul 03 2011
Given g.f. A(x), then q^(1/2) * 2 * A(q) is denoted phi_1(z) where q = exp(Pi i z) in Conway and Sloane.
Half of theta series of planar hexagonal lattice (A2) with respect to an edge.
Bisection of A002324. Number of ways of writing n as a sum of a triangular plus three times a triangular number [Hirschhorn]. - R. J. Mathar, Mar 23 2011
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Cubic AGM theta functions: a(q) (see A004016), b(q) (A005928), c(q) (A005882).

Examples

			G.f. = 1 + x + 2*x^3 + x^4 + 2*x^6 + 2*x^9 + 2*x^10 + x^12 + x^13 + 2*x^15 + ...
G.f. = q + q^3 + 2*q^7 + q^9 + 2*q^13 + 2*q^19 + 2*q^21 + q^25 + q^27 + 2*q^31 + ...
a(6) = 2 since 8*6 + 4 = 52 = 5^2 + 3*3^2 = 7^2 + 3*1^2.
		

References

  • Burce C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, 1991, see p. 223 Entry 3(i).
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, 1999, p. 103. See Eq. (13).
  • Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 78, Eq. (32.27).

Crossrefs

Programs

  • Magma
    A := Basis( ModularForms( Gamma1(12), 1), 202); A[2] + A[4]; /* Michael Somos, Jul 25 2014 */
  • Mathematica
    a[ n_] := If[ n < 0, 0, DivisorSum[ 2 n + 1, Mod[(3 - #)/2, 3, -1] &]]; (* Michael Somos, Jul 03 2011 *)
    QP = QPochhammer; s = (QP[q^2]*QP[q^6])^2/(QP[q]*QP[q^3]) + O[q]^100; CoefficientList[s, q] (* Jean-François Alcover, Nov 27 2015, adapted from PARI *)
    a[ n_] := If[ n < 1, Boole[n == 0], Times @@ (Which[# < 2, 0^#2, Mod[#, 6] == 5, 1 - Mod[#2, 2], True, #2 + 1] & @@@ FactorInteger@(2 n + 1))]; (* Michael Somos, Mar 06 2016 *)
    %t A033762 a[ n_] := SeriesCoefficient[ (1/4) x^(-1/2) EllipticTheta[ 2, 0, x^(1/2)] EllipticTheta[ 2, 0, x^(3/2)], {x, 0, n}]; (* Michael Somos, Mar 06 2016 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A) * eta(x^6 + A))^2 / (eta(x + A) * eta(x^3 + A)), n))}; /* Michael Somos, Sep 18 2004 */
    
  • PARI
    {a(n) = if( n<0, 0, n = 2*n + 1; sumdiv( n, d, kronecker( -12, d) * (n / d % 2)))}; /* Michael Somos, Nov 04 2005 */
    
  • PARI
    {a(n) = if( n<0, 0, n = 8*n + 4; sum( j=1, sqrtint( n\3), (j%2) * issquare(n - 3*j^2)))} /* Michael Somos, Nov 04 2005 */
    
  • PARI
    {a(n) = if( n<0, 0, sumdiv(2*n + 1, d, kronecker(-3, d)))}; /* Michael Somos, Mar 06 2016 */
    

Formula

Expansion of q^(-1/2) * (eta(q^2) * eta(q^6))^2 / (eta(q) * eta(q^3)) in powers of q. - Michael Somos, Apr 18 2004
Expansion of q^(-1) * (a(q) - a(q^4)) / 6 in powers of q^2 where a() is a cubic AGM theta function. - Michael Somos, Oct 24 2006
Expansion of psi(x) * psi(x^3) in powers of x where psi() is a Ramanujan theta function. - Michael Somos, Jul 03 2011
Euler transform of period 6 sequence [ 1, -1, 2, -1, 1, -2, ...]. - Michael Somos, Apr 18 2004
From Michael Somos, Sep 18 2004: (Start)
Given g.f. A(x), then B(x) = (x * A(x^2))^2 satisfies 0 = f(B(x), B(x^2), B(x^4)) where f(u, v, w) = v^3 + 4*u*v*w + 16*v*w^2 - 8*w*v^2 - w*u^2.
a(n) = b(2*n + 1) where b() is multiplicative with b(2^e) = 0^e, b(3^e) = 1, b(p^e) = (1 + (-1)^e) / 2 if p==5 (mod 6) otherwise b(p^e) = e+1. (Clarification: the g.f. A(x) is not the primary function of interest, but rather B(x) = x * A(x^2), which is an eta-quotient and is the generating function of a multiplicative sequence.)
G.f.: (Sum_{j>0} x^((j^2 - j) / 2)) * (Sum_{k>0} x^(3(k^2 - k) / 2)) = Product_{k>0} (1 + x^k) * (1 - x^(2*k)) * (1 + x^(3*k)) * (1 - x^(6*k)).
G.f.: Sum_{k>=0} a(k) * x^(2*k + 1) = Sum_{k>0} x^k * (1 - x^k) * (1 - x^(4*k)) * (1 - x^(5*k)) / (1 - x^(12*k)). (End)
G.f.: s(4)^2*s(12)^2/(s(2)*s(6)), where s(k) := subs(q=q^k, eta(q)), where eta(q) is Dedekind's function, cf. A010815. [Fine]
G.f.: Sum_{k>=0} a(k) * x^(2*k + 1) = Sum_{k>0} x^k / (1 + x^k + x^(2*k)) - x^(4*k) / (1 + x^(4*k) + x^(8*k)). - Michael Somos, Nov 04 2005
a(n) = A002324(2*n + 1) = A035178(2*n + 1) = A091393(2*n + 1) = A093829(2*n + 1) = A096936(2*n + 1) = A112298(2*n + 1) = A113447(2*n + 1) = A113661(2*n + 1) = A113974(2*n + 1) = A115979(2*n + 1) = A122860(2*n + 1) = A123331(2*n + 1) = A123484(2*n + 1) = A136748(2*n + 1) = A137608(2*n + 1). A005881(n) = 2*a(n).
6 * a(n) = A004016(6*n + 3). - Michael Somos, Mar 06 2016
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/(2*sqrt(3)) = 0.906899... (A093766). - Amiram Eldar, Nov 23 2023

Extensions

Corrected by Charles R Greathouse IV, Sep 02 2009

A033716 Number of integer solutions to the equation x^2 + 3y^2 = n.

Original entry on oeis.org

1, 2, 0, 2, 6, 0, 0, 4, 0, 2, 0, 0, 6, 4, 0, 0, 6, 0, 0, 4, 0, 4, 0, 0, 0, 2, 0, 2, 12, 0, 0, 4, 0, 0, 0, 0, 6, 4, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 6, 6, 0, 0, 12, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 4, 6, 0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 2, 12, 0, 0, 4, 0, 2, 0, 0, 12, 0, 0, 0, 0, 0, 0, 8, 0, 4, 0, 0, 0, 4, 0, 0, 6, 0
Offset: 0

Views

Author

Keywords

Comments

The cubic modular equation for k is equivalent to theta_4(q) * theta_4(q^3) + theta_2(q)* theta_2(q^3) = theta_3(q) * theta_3(q^3). - Michael Somos, Feb 17 2003
The number of nonnegative solutions is given by A119395. - Max Alekseyev, May 16 2006
Fermat used infinite descent to prove "That there is no number, less by a unit than a multiple of 3, which is composed of a square and the triple of another square". [Yves Hellegouarch, "Invitation to the Mathematics of Fermat-Wiles", Academic Press, 2002, page 4]. - Michael Somos, Sep 03 2016

Examples

			G.f. = 1 + 2*q + 2*q^3 + 6*q^4 + 4*q^7 + 2*q^9 + 6*q^12 + 4*q^13 + 6*q^16 + ...
		

References

  • J. M. Borwein, P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 110.
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p 102 eq 9.
  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 78, Eq. (32.25).

Crossrefs

Programs

  • Maple
    A033716 := proc(n)
        local a,j ;
        a := 0 ;
        for j from 0 to n/3 do
            a := a+A000122(n-3*j)*A000122(j) ;
        end do:
        a;
    end proc:
    seq(A033716(n),n=0..80) ; # R. J. Mathar, Feb 22 2021
  • Mathematica
    a[n_] := With[{r = Reduce[x^2 + 3*y^2 == n, {x, y}, Integers]}, Which[r === False, 0, Head[r] === And, 1, True, Length[r]]]; Table[a[n], {n, 0, 101}] (* Jean-François Alcover, Jan 10 2014 *)
    QP = QPochhammer; s = (QP[q^2] * QP[q^6])^5 / (QP[q] * QP[q^3] * QP[q^4] * QP[q^12])^2 + O[q]^100; CoefficientList[s, q] (* Jean-François Alcover, Nov 09 2015 *)
    a[ n_] := Length @ FindInstance[ x^2 + 3 y^2 == n, {x, y}, Integers, 10^9]; (* Michael Somos, Sep 03 2016 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q] EllipticTheta[ 3, 0, q^3], {q, 0, n}]; (* Michael Somos, Sep 03 2016 *)
  • PARI
    {a(n) = if( n<1, n==0, qfrep([1, 0; 0, 3], n)[n] * 2)}; /* Michael Somos, Jun 05 2005 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A) * eta(x^6 + A))^5 / (eta(x + A) * eta(x^3 + A) * eta(x^4 + A) * eta(x^12 + A))^2, n))}; /* Michael Somos, Jun 05 2005 */
    
  • PARI
    { a(n) = local(f,B); f=factorint(n); B=1; for(i=1,matsize(f)[1], if(f[i,1]%3==1,B*=f[i,2]+1); if(f[i,1]%3==2,if(f[i,2]%2,return(0)))); if(n%4,2*B,6*B) } \\ Max Alekseyev, May 16 2006
    
  • PARI
    first(n) = {my(res = vector(n + 1)); for(i = 0, sqrtint(n \ 3), for(j = 0, sqrtint(n - 3*i^2), res[3*i^2 + j^2 + 1] += (1<<(!!i + !!j)))); res} \\ David A. Corneth, Nov 20 2017

Formula

Fine gives an explicit formula for a(n) in terms of the divisors of n.
Coefficients in expansion of Sum_{ i, j = -inf .. inf } q^(i^2+3*j^2).
G.f.: s(2)^5*s(6)^5/(s(1)^2*s(3)^2*s(4)^2*s(12)^2), where s(k) := subs(q=q^k, eta(q)), where eta(q) is Dedekind's function, cf. A010815. [Fine]
Euler transform of period 12 sequence [ 2, -3, 4, -1, 2, -6, 2, -1, 4, -3, 2, -2, ...]. - Michael Somos, Feb 17 2003
G.f. A(x) satisfies 0 = f(A(x), A(x^3), A(x^9)) where f(u1, u3, u9) = (u1*u9) * (u1^2 - 3*u1*u3 + 3*u3^2) * (u3^2 - 3*u3*u9 + 3*u9^2) - u3^6. - Michael Somos, Sep 05 2005
G.f.: theta_3(q) * theta_3(q^3) = (Sum_{k in Z} x^(k^2)) * (Sum_{k in Z} x^(3k^2)). - Michael Somos, Sep 05 2005
Let n=3^d*p1^(2*b1)*...*pm^(2*bm)*q1^c1*...*qk^ck be a prime factorization of n where pi are primes of the form 3t+2 and qj are primes of the form 3t+1. Let B=(c1+1)*...*(ck+1). Then a(n)=0 if either of bi is a half-integer; a(n)=6B if n is a multiple of 4; and a(n)=2B otherwise. - Max Alekseyev, May 16 2006
a(n) = 2 * A096936(n).
a(3*n + 2) = 0. a(3*n) = a(n). a(3*n + 1) = 2 * A129576(n). - Michael Somos, Sep 03 2016
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/sqrt(3) = 1.813799... (A093602). - Amiram Eldar, Oct 15 2022

A133675 Negative discriminants with form class number 1 (negated).

Original entry on oeis.org

3, 4, 7, 8, 11, 12, 16, 19, 27, 28, 43, 67, 163
Offset: 1

Views

Author

N. J. A. Sloane, May 16 2003

Keywords

Comments

The list on p. 260 of Cox is missing -12, the list in Theorem 7.30 on p. 149 is correct. - Andrew V. Sutherland, Sep 02 2012
Let b(k) be the number of integer solutions of f(x,y) = k, where f(x,y) is the principal binary quadratic form with discriminant d<0 (i.e., f(x,y) = x^2 - (d/4)*y^2 if 4|d, x^2 + x*y + ((1-d)/4)*y^2 otherwise), then this sequence lists |d| such that {b(k)/b(1): k>=1} is multiplicative. See Crossrefs for the actual sequences. - Jianing Song, Nov 20 2019

References

  • D. A. Cox, Primes of the form x^2+ny^2, Wiley, New York, 1989, pp. 149, 260.
  • D. E. Flath, Introduction to Number Theory, Wiley-Interscience, 1989.

Crossrefs

The sequences {b(k): k>=0}: A004016 (d=-3), A004018 (d=-4), A002652 (d=-7), A033715 (d=-8), A028609 (d=-11), A033716 (d=-12), A004531 (d=-16), A028641 (d=-19), A138805 (d=-27), A033719 (d=-28), A138811 (d=-43), A318984 (d=-67), A318985 (d=-163).
The sequences {b(k)/b(1): k>=1}: A002324 (d=-3), A002654 (d=-4), A035182 (d=-7), A002325 (d=-8), A035179 (d=-11), A096936 (d=-12), A113406 (d=-16), A035171 (d=-19), A138806 (d=-27), A110399 (d=-28), A035147 (d=-43), A318982 (d=-67), A318983 (d=-163).

Programs

  • PARI
    ok(n)={(-n)%4<2 && quadclassunit(-n).no == 1} \\ Andrew Howroyd, Jul 20 2018

Extensions

Corrected by David Brink, Dec 29 2007

A119395 Number of nonnegative integer solutions to the equation x^2 + 3y^2 = n.

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 0, 1, 0, 1, 0, 0, 2, 1, 0, 0, 2, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 3, 0, 0, 1, 0, 0, 0, 0, 2, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 2, 0, 0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 3, 0, 0, 1, 0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 2, 0
Offset: 0

Views

Author

Max Alekseyev, May 16 2006

Keywords

Comments

The number of integer solutions is given by A033716.
Records 1, 2, 3, 5, 6, 9, 12, 14, 18, ... occur at 0, 4, 28, 196, 364, 2548, 6916, 33124, 48412, ... - Antti Karttunen, Nov 20 2017

Crossrefs

Programs

  • Mathematica
    QP = QPochhammer;
    s = (QP[q^2]*QP[q^6])^5/(QP[q]*QP[q^3]*QP[q^4]*QP[q^12])^2 + O[q]^105;
    A033716 = CoefficientList[s, q];
    A119395 = Ceiling[A033716/4] (* Jean-François Alcover, Jul 02 2018 *)
  • PARI
    { A033716(n) = local(f,B); f=factorint(n); B=1; for(i=1,matsize(f)[1], if(f[i,1]%3==1,B*=f[i,2]+1); if(f[i,1]%3==2,if(f[i,2]%2,return(0)))); if(n%4,2*B,6*B) } { a(n) = ceil(A033716(n)/4) }

Formula

For n > 0, a(n) = (A033716(n) + 2)/4 if n is a square or a triple of a square; otherwise a(n) = A033716(n)/4. Alternatively, a(n) = ceiling(A033716(n)/4).
G.f.: (1 + theta_3(q))*(1 + theta_3(q^3))/4, where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Aug 01 2018

A115979 Expansion of (1 - theta_4(q)*theta_4(q^3))/2 in powers of q.

Original entry on oeis.org

1, 0, 1, -3, 0, 0, 2, 0, 1, 0, 0, -3, 2, 0, 0, -3, 0, 0, 2, 0, 2, 0, 0, 0, 1, 0, 1, -6, 0, 0, 2, 0, 0, 0, 0, -3, 2, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, -3, 3, 0, 0, -6, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, -3, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 1, -6, 0, 0, 2, 0, 1, 0, 0, -6, 0, 0, 0, 0, 0, 0, 4, 0, 2, 0, 0, 0, 2, 0, 0, -3, 0, 0, 2, 0, 0
Offset: 1

Views

Author

Michael Somos, Feb 09 2006

Keywords

Crossrefs

Programs

  • Maple
    S:=series((1-JacobiTheta4(0,q)*JacobiTheta4(0,q^3))/2, q, 106):
    seq(coeff(S,q,n),n=1..105); # Robert Israel, Nov 20 2017
  • Mathematica
    Drop[CoefficientList[Series[(1 -EllipticTheta[4, 0, q]*EllipticTheta[4, 0, q^3])/2, {q, 0, 110}], q], 1] (* G. C. Greubel, May 09 2019 *)
  • PARI
    {a(n)=local(A); if(n<1, 0, A=x*O(x^n); polcoeff( (eta(x+A)*eta(x^3+A))^2/eta(x^2+A)/eta(x^6+A), n)/-2)}
    
  • Sage
    def E(x): return 1 + 2*sum((-1)^k*x^(k^2) for k in (1..50))
    a=((1 - E(x)*E(x^3))/2).series(x, 110).coefficients(x, sparse=False); a[1:] # G. C. Greubel, May 09 2019
  • Scheme
    (define (A115979 n) (- (* (expt -1 n) (A096936 n)))) ;; Follow A096936 for the rest of code. - Antti Karttunen, Nov 20 2017
    

Formula

Expansion of (1-(eta(q)*eta(q^3))^2/(eta(q^2)*eta(q^6)))/2 in powers of q.
Moebius transform is period 12 sequence [1,-1,0,-3,-1,0,1,3,0,1,-1,0,...].
a(n) is multiplicative and a(2^e) = -3(1+(-1)^e)/2 if e>0, a(3^e)=1, a(p^e) = 1+e if p == 1 (mod 6), a(p^e) = (1+(-1)^e)/2 if p == 5 (mod 6).
G.f.: Sum_{k>0} x^(k)/(1+x^k+x^(2k)) -4x^(4k)/(1+x^(4k)+x^(8k)).
a(n) = -(-1)^n*A096936(n).
A115978(n) = -2*a(n) if n > 0.

A129576 Expansion of phi(x) * chi(x) * psi(-x^3) in powers of x where phi(), chi(), psi() are Ramanujan theta functions.

Original entry on oeis.org

1, 3, 2, 0, 2, 3, 2, 0, 1, 6, 2, 0, 2, 0, 2, 0, 3, 6, 0, 0, 2, 3, 2, 0, 2, 6, 2, 0, 0, 0, 4, 0, 2, 3, 2, 0, 2, 6, 0, 0, 1, 6, 2, 0, 4, 0, 2, 0, 0, 6, 2, 0, 2, 0, 2, 0, 3, 6, 2, 0, 2, 0, 0, 0, 2, 9, 2, 0, 0, 6, 2, 0, 4, 0, 2, 0, 2, 0, 0, 0, 2, 6, 4, 0, 0, 3, 4
Offset: 0

Views

Author

Michael Somos, Apr 23 2007

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Cubic AGM theta functions: a(q) (see A004016), b(q) (A005928), c(q) (A005882). - Michael Somos, Jun 28 2017

Examples

			G.f. = 1 + 3*x + 2*x^2 + 2*x^4 + 3*x^5 + 2*x^6 + x^8 + 6*x^9 + 2*x^10 + ...
G.f. = q + 3*q^4 + 2*q^7 + 2*q^13 + 3*q^16 + 2*q^19 + q^25 + 6*q^28 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ 2^(-1/2) x^(-3/8) EllipticTheta[ 3, 0, x] QPochhammer[ -x, x^2] EllipticTheta[ 2, Pi/4, x^(3/2)], {x, 0, n}]; (* Michael Somos, Nov 11 2015 *)
    a[ n_] := Length @ FindInstance[ x^2 + 3 y^2 == 3 n + 1, {x, y}, Integers, 10^9] / 2; (* Michael Somos, Sep 03 2016 *)
    a[ n_] := If[ n < 1, Boole[n == 0], Times @@ (Which[# == 3, Boole[#2 == 0], # == 2, 3 (1 + (-1)^#2)/2, Mod[#, 3] == 2, (1 + (-1)^#2)/2, True, #2 + 1] & @@@ FactorInteger[3 n + 1])]; (* Michael Somos, Jun 28 2017 *)
  • PARI
    {a(n) = if( n<0, 0, n = 3*n + 1; sumdiv(n, d, kronecker(-3, d) * [0, 1, -2, 1] [n/d%4 + 1] ))};
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^7 * eta(x^3 + A) * eta(x^12 + A) / (eta(x + A)^3 * eta(x^4 + A)^3 * eta(x^6 + A)), n))};
    
  • PARI
    {a(n) = my(A, p, e); if( n<0, 0, n = 3*n + 1; A = factor(n); prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, 3*(1-e%2), p==3, 0, p%3==2, 1-e%2, e+1)))}; /* Michael Somos, Jun 28 2017 */

Formula

From Michael Somos, Jun 28 2017: (Start)
Expansion of q^(-1/3) * (2*c(q) + c(-q)) / 3 = q^(-1/3) * (c(q) + 2*c(q^4)) / 3 in powers of q where c() is a cubic AGM theta function.
Expansion of (a(q) - a(q^3) + 2*a(q^4) - 2*a(q^12)) / 6 in powers of q where a() is a cubic AGM theta function.
Expansion of q^(-1/3) * eta(q^2)^7 * eta(q^3) * eta(q^12) / (eta(q)^3 * eta(q^4)^3 * eta(q^6)) in powers of q. (End)
Euler transform of period 12 sequence [3, -4, 2, -1, 3, -4, 3, -1, 2, -4, 3, -2, ...].
a(n) = b(3*n + 1) where b() is multiplicative and b(2^e) = 3 * (1 + (-1)^e) / 2 if e>0, a(3^e) = 0^e, a(p^e) = e+1 if p == 1 (mod 3), a(p^e) = (1 + (-1)^e)/2 if p == 2 (mod 3).
a(n) = A096936(3*n + 1) = A112298(3*n + 1).
2 * a(n) = A033716(3*n + 1). - Michael Somos, Sep 03 2016
a(n) = (-1)^n * A122161(n). - Michael Somos, Jun 28 2017
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/sqrt(3) = 1.813799... (A093602). - Amiram Eldar, Dec 29 2023

A138806 Expansion of (theta_3(q) * theta_3(q^27) + theta_2(q) * theta_2(q^27) - 1) / 2 in powers of q.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 2, 0, 3, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 3, 2, 0, 0, 2, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 6, 1, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2, 0, 0
Offset: 1

Views

Author

Michael Somos, Mar 30 2008

Keywords

Comments

Half the number of integer solutions to x^2 + x*y + 7*y^2 = n. - Jianing Song, Nov 20 2019

Examples

			q + q^4 + 2*q^7 + 3*q^9 + 2*q^13 + q^16 + 2*q^19 + q^25 + 3*q^27 + ...
		

Crossrefs

Cf. A138805 (number of integer solutions to x^2 + x*y + 7*y^2 = n).
Similar sequences: A096936, A113406, A110399.

Programs

  • Mathematica
    f[p_, e_] := If[Mod[p, 6] == 1, e + 1, (1 + (-1)^e)/2]; f[2, e_] := 1 - Mod[e, 2]; f[3, e_] := 3; f[3, 1] = 0; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 07 2023 *)
  • PARI
    {a(n) = if( n<1, 0, if( n%3 == 2, 0, if( n%3==1, sumdiv(n, d, kronecker(-3, d)), if( n%9==0, 3 * sumdiv(n/9, d, kronecker(-3, d))))))}
    
  • PARI
    {a(n) = if( n<1, 0, sumdiv(n, d, kronecker(-3, d)) - if( n%3==0, sumdiv(n/3, d, [0, 1, -1, -3, 1, -1, 3, 1, -1][d%9+1])))}
    
  • PARI
    {a(n) = if( n<1, 0, qfrep([2, 1; 1, 14], n, 1)[n])}

Formula

a(n) is multiplicative and a(3^e) = 3 if e>1, a(p^e) = e+1 if p == 1 (mod 6), a(p^e) = (1 + (-1)^e) / 2 if p == 5 (mod 6).
a(3*n + 2) = a(4*n + 2) = 0.
G.f.: (Sum_{i,j} x^(i*i + i*j + 7*j*j) - 1) / 2.
A138805(n) = 2 * a(n) unless n=0. A033687(n) = a(3*n + 1). A097195(n) = a(6*n + 1). A123884(n) = a(12*n + 1). 2 * A121361(n) = a(12*n + 7).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/(3*sqrt(3)) = 0.604599... (A073010). - Amiram Eldar, Nov 16 2023

A110399 Expansion of (theta_3(q)*theta_3(q^7) - 1)/2 in powers of q.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 1, 2, 1, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 1, 2, 0, 0, 4, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 5, 0, 0, 2, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Michael Somos, Oct 22 2005

Keywords

Comments

Half the number of integer solutions to x^2 + 7*y^2 = n. - Jianing Song, Nov 20 2019

Examples

			G.f. = x + x^4 + x^7 + 2*x^8 + x^9 + 2*x^11 + 3*x^16 + 2*x^23 + ...
		

References

  • Bruce C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, 1991, see p. 302, Entry 17(ii).

Crossrefs

Cf. A033719 (number of integer solutions to x^2 + 7*y^2 = n).
Similar sequences: A096936, A113406, A138806.

Programs

  • Mathematica
    f[p_, e_] := If[MemberQ[{1, 2, 4}, Mod[p, 7]], e + 1, (1 + (-1)^e)/2]; f[2, e_] := e - 1; f[7, e_] := 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 07 2023 *)
  • PARI
    {a(n) = my(x); if( n<1, 0, x = valuation(n, 2); abs(x -1) * sumdiv(n/2^x, d, kronecker(-28, d)))};
    
  • PARI
    {a(n) = my(A, p, e); if( n<1, 0, A = factor(n); prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, e-1,  p==7, 1, kronecker(-7, p)==-1, (1+(-1)^e)/2, e+1)))};
    
  • PARI
    {a(n) = my(A); if( n<1, 0, A = x *O(x^n); polcoeff( (eta(x + A)^-2 * eta(x^2 + A)^5 * eta(x^4 + A)^-2 * eta(x^7 + A)^-2 * eta(x^14 + A)^5 * eta(x^28 + A)^-2 - 1)/2, n))};

Formula

a(n) is multiplicative with a(2^e) = |e-1|, 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).
G.f.: Sum_{k>0} Kronecker(-7, k) x^k/(1-(-x)^k).
G.f.: (theta_3(q)*theta_3(q^7) - 1)/2 where theta_3(q) = 1 + 2*(q + q^4 + q^9 + ...).
a(2*n + 1) = A035162(2*n + 1) = A035182(2*n + 1). A033719(n) = 2*a(n) if n > 0.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/(2*sqrt(7)) = 0.593705... . - Amiram Eldar, Nov 16 2023
Showing 1-9 of 9 results.