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-10 of 40 results. Next

A002325 Glaisher's J numbers.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Number of integer solutions to the equation x^2 + 2*y^2 = n when (-x, -y) and (x, y) are counted as the same solution.
For n nonzero, a(n) is nonzero if and only if n is in A002479. - Michael Somos, Dec 15 2011
Coefficients of Dedekind zeta function for the quadratic number field of discriminant -8. See A002324 for formula and Maple code. - N. J. A. Sloane, Mar 22 2022

Examples

			x + x^2 + 2*x^3 + x^4 + 2*x^6 + x^8 + 3*x^9 + 2*x^11 + 2*x^12 + x^16 + ...
		

References

  • B. C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, see p. 114 Entry 8(iii).
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 3, p. 19.
  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 78, Eq. (32.24).
  • J. W. L. Glaisher, Table of the excess of the number of (8k+1)- and (8k+3)-divisors of a number over the number of (8k+5)- and (8k+7)-divisors, Messenger Math., 31 (1901), 82-91.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-10.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Dedekind zeta functions for imaginary quadratic number fields of discriminants -3, -4, -7, -8, -11, -15, -19, -20 are A002324, A002654, A035182, A002325, A035179, A035175, A035171, A035170, respectively.
Dedekind zeta functions for real quadratic number fields of discriminants 5, 8, 12, 13, 17, 21, 24, 28, 29, 33, 37, 40 are A035187, A035185, A035194, A035195, A035199, A035203, A035188, A035210, A035211, A035215, A035219, A035192, respectively.

Programs

  • Maple
    S:= series( (JacobiTheta3(0,q)*JacobiTheta3(0,q^2)-1)/2, q, 1001):
    seq(coeff(S,q,j), j=1..1000); # Robert Israel, Dec 01 2015
  • Mathematica
    a[n_] := Total[ KroneckerSymbol[-8, #] & /@ Divisors[n]]; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Nov 25 2011, after Michael Somos *)
    QP = QPochhammer; s = ((QP[q^2]^3*QP[q^4]^3)/(QP[q]^2*QP[q^8]^2)-1)/(2q) + O[q]^105; CoefficientList[s, q] (* Jean-François Alcover, Dec 01 2015, adapted from PARI *)
  • PARI
    a(n) = if( n<1, 0, issquare(n)-issquare(2*n) + 2*sum(i=1,sqrtint(n\2), issquare(n-2*i^2)))
    
  • PARI
    {a(n) = if( n<1, 0, qfrep([ 1, 0; 0, 2],n)[n])} \\ Michael Somos, Jun 05 2005
    
  • PARI
    {a(n) = if( n<1, 0, direuler(p=2, n, 1 / (1 - X) / (1 - kronecker( -2, p) * X))[n])} \\ Michael Somos, Jun 05 2005
    
  • PARI
    {a(n) = if( n<1, 0, sumdiv(n, d, kronecker( -2, d)))} \\ Michael Somos, Aug 23 2005
    
  • PARI
    {a(n) = local(A, p, e); if( n<1, 0, A = factor(n); prod( k=1, matsize(A)[1], if( p=A[k, 1], e=A[k, 2]; if( p==2, 1, if( p%8<4, e+1, !(e%2))))))} \\ Michael Somos, Oct 23 2006
    
  • PARI
    {a(n) = local(A); if( n<1, 0, A = x * O(x^n); polcoeff( eta(x + A)^-2 * eta(x^2 + A)^3 * eta(x^4 + A)^3 * eta(x^8 + A)^-2, n) / 2)}
    
  • PARI
    a(n) = my(f=factor(n>>valuation(n,2)), e); prod(i=1, #f~, e=f[i, 2]; if( f[i, 1]%8<4, e+1, 1 - e%2)) \\ Charles R Greathouse IV, Sep 09 2014

Formula

Coefficients in expansion of Dirichlet series Product_p (1-(Kronecker(m, p)+1)*p^(-s) + Kronecker(m, p)*p^(-2s))^(-1) for m = -2.
Moebius transform is period 8 sequence [ 1, 0, 1, 0, -1, 0, -1, 0, ...]. - Michael Somos, Aug 23 2005
G.f.: (theta_3(q) * theta_3(q^2) - 1) / 2 = Sum_{k>0} Kronecker( -2, n) * x^k / (1 - x^k) = Sum_{k>0} (x^k + x^(3*k)) / (1 + x^(4*k)).
Multiplicative with a(2^e) = 1, a(p^e) = e+1 if p == 1, 3 (mod 8), a(p^e) = (1+(-1)^e)/2 if p == 5, 7 (mod 8). - Michael Somos, Oct 23 2006
A033715(n) = 2 * a(n) unless n=0.
a(n) = A188169(n) + A188170(n) - A188171(n) - A188172(n) [Hirschhorn]. - R. J. Mathar, Mar 23 2011
G.f.: A(x) = 2*(1+x^2)/(G(0)-2*x*(1+x^2)); G(k) = 1+x+x^(2*k)*(1+x^3+x^(2*k+1)+x^(2*k+4)+x^(4*k+3)+x^(4*k+4)) - x*(1+x^(2*k))*(1+x^(2*k+4))*(1+x^(4*k+4))^2/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Jan 03 2012
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/(2*sqrt(2)) = 1.110720... (A093954). - Amiram Eldar, Oct 11 2022

A025428 Number of partitions of n into 4 nonzero squares.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Records occur at n= 4, 28, 52, 82, 90, 130, 162, 198, 202, 210,.... - R. J. Mathar, Sep 15 2015

Crossrefs

Cf. A000414, A000534, A025357-A025375, A216374, A025416 (greedy inverse).
Column k=4 of A243148.

Programs

  • Maple
    A025428 := proc(n)
        local a,i,j,k,lsq ;
        a := 0 ;
        for i from 1 do
            if 4*i^2 > n then
                return a;
            end if;
            for j from i do
                if i^2+3*j^2 > n then
                    break;
                end if;
                for k from j do
                    if i^2+j^2+2*k^2 > n then
                        break;
                    end if;
                    lsq := n-i^2-j^2-k^2 ;
                    if lsq >= k^2 and issqr(lsq) then
                        a := a+1 ;
                    end if;
                end do:
            end do:
        end do:
    end proc:
    seq(A025428(n),n=1..40) ; # R. J. Mathar, Jun 15 2018
    # second Maple program:
    b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
         `if`(i<1 or t<1, 0, b(n, i-1, t)+`if`(i^2>n, 0, b(n-i^2, i, t-1))))
        end:
    a:= n-> b(n, isqrt(n), 4):
    seq(a(n), n=0..100);  # Alois P. Heinz, Apr 14 2019
  • Mathematica
    nn = 100; lim = Sqrt[nn]; t = Table[0, {nn}]; Do[n = a^2 + b^2 + c^2 + d^2; If[n <= nn, t[[n]]++], {a, lim}, {b, a, lim}, {c, b, lim}, {d, c, lim}]; t (* T. D. Noe, Sep 28 2012 *)
    f[n_] := Length@ IntegerPartitions[n, {4}, Range[ Floor[ Sqrt[n - 1]]]^2]; Array[f, 105] (* Robert G. Wilson v, Sep 28 2012 *)
  • PARI
    A025428(n)=sum(a=1,n,sum(b=1,a,sum(c=1,b,sum(d=1,c,a^2+b^2+c^2+d^2==n))))
    
  • PARI
    A025428(n)=sum(a=1,sqrtint(max(n-3,0)), sum(b=1,min(sqrtint(n-a^2-2),a), sum(c=1,min(sqrtint(n-a^2-b^2-1),b),issquare(n-a^2-b^2-c^2,&d) & d <= c )))
    
  • PARI
    A025428(n)=sum(a=sqrtint(max(n,4)\4),sqrtint(max(n-3,0)), sum(b=sqrtint((n-a^2)\3-1)+1,min(sqrtint(n-a^2-2),a), sum(c=sqrtint((t=n-a^2-b^2)\2-1)+1, min(sqrtint(t-1),b), issquare(t-c^2) ))) \\ - M. F. Hasler, Sep 17 2012
    for(n=1,100,print1(A025428(n),","))
    
  • PARI
    T(n)={a=matrix(n,4,i,j,0);for(d=1,sqrtint(n),forstep(i=n,d*d+1,-1,for(j=2,4,a[i,j]+=sum(k=1,j,if(k0,a[i-k*d*d,j-k],if(k==j&&i-k*d*d==0,1)))));a[d*d,1]=1);for(i=1,n,print(i" "a[i,4]))} /* Robert Gerbicz, Sep 28 2012 */

Formula

For n>0, a(n) = ( A063730(n) + 6*A213024(n) + 3*A063725(n/2) + 8*A092573(n) + 6*A010052(n/4) ) / 24. - Max Alekseyev, Sep 30 2012
a(n) = ( A000118(n) - 4*A005875(n) - 6*A004018(n) - 12*A000122(n) - 15*A000007(n) + 12*A014455(n) - 24*A033715(n) - 12*A000122(n/2) + 12*A004018(n/2) + 32*A033716(n) - 32*A000122(n/3) + 48*A000122(n/4) ) / 384. - Max Alekseyev, Sep 30 2012
a(n) = [x^n y^4] Product_{k>=1} 1/(1 - y*x^(k^2)). - Ilya Gutkovskiy, Apr 19 2019
a(n) = Sum_{k=1..floor(n/4)} Sum_{j=k..floor((n-k)/3)} Sum_{i=j..floor((n-j-k)/2)} A010052(i) * A010052(j) * A010052(k) * A010052(n-i-j-k). - Wesley Ivan Hurt, Apr 19 2019

Extensions

Values of a(0..10^4) double-checked by M. F. Hasler, Sep 17 2012

A002652 Theta series of Kleinian lattice Z[(1 + sqrt(-7))/ 2] in 1 complex (or 2 real) dimensions.

Original entry on oeis.org

1, 2, 4, 0, 6, 0, 0, 2, 8, 2, 0, 4, 0, 0, 4, 0, 10, 0, 4, 0, 0, 0, 8, 4, 0, 2, 0, 0, 6, 4, 0, 0, 12, 0, 0, 0, 6, 4, 0, 0, 0, 0, 0, 4, 12, 0, 8, 0, 0, 2, 4, 0, 0, 4, 0, 0, 8, 0, 8, 0, 0, 0, 0, 2, 14, 0, 0, 4, 0, 0, 0, 4, 8, 0, 8, 0, 0, 4, 0, 4, 0, 2, 0, 0, 0, 0, 8, 0, 16, 0, 0, 0, 12, 0, 0, 0, 0, 0, 4, 4, 6, 0
Offset: 0

Views

Author

Keywords

Comments

In other words, theta series of lattice with Gram matrix [2, 1; 1, 4].
The number of integer solutions (x, y) to x^2 + x*y + 2*y^2 = n.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 + 2*x + 4*x^2 + 6*x^4 + 2*x^7 + 8*x^8 + 2*x^9 + 4*x^11 + 4*x^14 + ...
Theta series of lattice with Gram matrix [2, 1; 1, 4] = 1 + 2*q^2 + 4*q^4 + 6*q^8 + 2*q^14 + 8*q^16 + 2*q^18 + 4*q^22 + 4*q^28 + 10*q^32 + 4*q^36 + 8*q^44 + 4*q^46 + 2*q^50 + 6*q^56 + 4*q^58 + 12*q^64 + 6*q^72 + ...
		

References

  • Bruce C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, 1991, see p. 467, Entry 5(i).

Crossrefs

Number of integer solutions to f(x,y) = n where f(x,y) is the principal binary quadratic form with discriminant d: A004016 (d=-3), A004018 (d=-4), this sequence (d=-7), A033715 (d=-8), A028609 (d=-11), A028641 (d=-19), A138811 (d=-43).

Programs

  • Magma
    A := Basis( ModularForms( Gamma1(14), 1), 85); A[1] + 2*A[2] + 4*A[3] + 6*A[5]; /* Michael Somos, Jun 10 2015 */
  • Mathematica
    f[d_] := KroneckerSymbol[-7, d]; a[n_] := 2*Total[f /@ Divisors[n]]; a[0]=1; Table[a[n], {n, 0, 101}] (* Jean-François Alcover, Nov 08 2011, after Michael Somos *)
    a[ n_] := If[ n < 1, Boole[n == 0], 2 Sum[ KroneckerSymbol[ -7, d], { d, Divisors[ n]}]]; (* Michael Somos, Jun 10 2015 *)
    a[ n_] := If[ n < 1, Boole[n == 0], 2 DivisorSum[ n, KroneckerSymbol[ -7, #] &]]; (* Michael Somos, Jun 10 2015 *)
    a[ n_] := If[ n < 1, Boole[n == 0], Length @ FindInstance[ n == x^2 + x y + 2 y^2, {x, y}, Integers, 10^9]]; (* Michael Somos, Jun 10 2015 *)
  • PARI
    {a(n) = my(t2, t3); if( n<1, n==0, t2 = 2 * sum( n=1, (sqrtint( max(0, 4*n - 7)) + 1)\2, x^(n*n - n)); t3 = 1 + 2 * sum( n=1, sqrtint(n), x^(n*n)); polcoeff( t3 * subst(t3, x, x^7) + x^2 * t2 * subst(t2, x, x^7), n))};
    
  • PARI
    {a(n) = my(t); if( n<1, n==0, 2 * issquare(n) + 2 * sum( y=1, sqrtint(n*4\7), 2 * issquare(t = 4*n - 7*y^2) - (t==0)))}; /* Michael Somos, Sep 20 2004 */
    
  • PARI
    {a(n) = my(A, A1, A2); if( n<0, 0, A = x * O(x^n); A1 = eta(x + A) * eta(x^7 + A); A2 = eta(x^2 + A) * eta(x^14 + A); polcoeff( (A1^3 + 4 * x * A2^3) / (A1 * A2), n))}; /* Michael Somos, May 28 2005 */
    
  • PARI
    {a(n) = if( n<1, n==0, 2 * qfrep( [ 2, 1; 1, 4], n, 1)[n])}; /* Michael Somos, Jun 03 2005 */
    
  • PARI
    {a(n) = if( n<1, n==0, 2 * sumdiv( n, d, kronecker( -7, d)))}; /* Michael Somos, Oct 07 2005 */
    

Formula

G.f.: theta_3(q) * theta_3(q^7) + theta_2(q) * theta_2(q^7).
G.f.: 1 + 2 * Sum_{k>0} Kronecker(-7, k) * x^k / (1 - x^k). - Michael Somos, Mar 17 2012
Expansion of phi(x) * phi(x^7) + 4 * x^2 * psi(x^2) * psi(x^14) = phi(-x) * phi(-x^7) + 4 * x * psi(x) * psi(x^7) in powers of x where phi(), psi() are Ramanujan theta functions. - Michael Somos, Mar 17 2012
Expansion of ((eta(q) * eta(q^7))^3 + 4 * (eta(q^2) * eta(q^14))^3) / (eta(q) * eta(q^2) * eta(q^7) * eta(q^14)) in powers of q. - Michael Somos, May 28 2005
Moebius transform is period 7 sequence [ 2, 2, -2, 2, -2, -2, 0, ...]. - Michael Somos, Oct 07 2005
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2 + 5 * v^2 + 4 * w^2 + 2 * u*w - 4 * u*v - 8 * v*w. - Michael Somos, Sep 20 2004
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 + 2*u2^3*u3 + 18*u1*u3*u6^2 + 18*u2*u3^2*u6 + 6*u1*u2^2*u6 + 3*u1^2*u2*u3 - 3*u2*u3^3 - 18*u2*u3*u6^2 - 6*u1*u6^3 - 9*u1*u3^2*u6 - 6*u1*u2^2*u3 - 6*u1^2*u2*u6. - Michael Somos, Jun 03 2005
From Michael Somos, Mar 17 2012: (Start)
G.f. is a period 1 Fourier series which satisfies f(-1 / (7 t)) = 7^(1/2) (t/i) f(t) where q = exp(2 Pi i t).
a(n) = 2 * A035182(n) unless n = 0. a(7*n + 5) = a(7*n + 6) = a(9*n + 3) = a(9*n + 6) = 0. a(2*n + 1) = 2 * A133827(n). a(9*n) = a(n). (End)
a(0) = 1, a(n) = 2 * b(n) for n > 0, where b() is multiplicative with b(7^e) = 1, b(p^e) = e + 1 if p == 1, 2, 4 (mod 7), b(p^e) = (1 + (-1)^e) / 2 if p == 3, 5, 6 (mod 7). - Michael Somos, Jun 10 2015
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=0..m} a(k) = 2*Pi/sqrt(7) = 2.3748208... . - Amiram Eldar, Dec 16 2023

A320067 Expansion of Product_{k>0} theta_3(q^k), where theta_3() is the Jacobi theta function.

Original entry on oeis.org

1, 2, 2, 6, 8, 10, 22, 26, 36, 60, 78, 106, 152, 202, 258, 370, 478, 602, 828, 1042, 1332, 1758, 2198, 2758, 3572, 4448, 5518, 7012, 8636, 10654, 13350, 16362, 19946, 24722, 30070, 36478, 44776, 54010, 65202, 79234, 95196, 114166, 137686, 164530, 196252, 235308, 279718, 332002
Offset: 0

Views

Author

Seiichi Manyama, Oct 05 2018

Keywords

Comments

Also the number of integer solutions (a_1, a_2, ..., a_n) to the equation a_1^2 + 2*a_2^2 + ... + n*a_n^2 = n.

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((&*[(&*[(1 - x^(k*j))*(1 + x^(k*j))^3/(1 + x^(2*k*j))^2: j in [1..Floor(2*m/k)]]): k in [1..2*m]]))); // G. C. Greubel, Oct 29 2018
  • Mathematica
    nmax = 50; CoefficientList[Series[Product[EllipticTheta[3, 0, x^k], {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Oct 05 2018 *)
    nmax = 50; CoefficientList[Series[Product[(1 - x^(k*j))*(1 + x^(k*j))^3/(1 + x^(2*k*j))^2, {k, 1, nmax}, {j, 1, Floor[nmax/k] + 1}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Oct 05 2018 *)
  • PARI
    m=50; x='x+O('x^m); Vec(1/(prod(k=1,2*m, prod(j=1,floor(2*m/k), (1 - x^(k*j))*(1 + x^(k*j))^3/(1 + x^(2*k*j))^2 )))) \\ G. C. Greubel, Oct 29 2018
    

Formula

Expansion of Product_{k>0} eta(q^(2*k))^5 / (eta(q^k)*eta(q^(4*k)))^2.
a(n) ~ log(2)^(3/8) * exp(Pi*sqrt(n*log(2))) / (4 * Pi^(1/4) * n^(7/8)). - Vaclav Kotesovec, Oct 05 2018
Expansion of Product_{k>0} theta_4(q^(2*k))/theta_4(q^(2*k-1)), where theta_4() is the Jacobi theta function. - Seiichi Manyama, Oct 26 2018

A028609 Expansion of (theta_3(z)*theta_3(11z) + theta_2(z)*theta_2(11z)).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Theta series of lattice with Gram matrix [2, 1; 1, 6].
Number of integer solutions (x, y) to x^2 + x*y + 3*y^2 = n. - Michael Somos, Sep 20 2004
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 + 2*x + 4*x^3 + 2*x^4 + 4*x^5 + 6*x^9 + 2*x^11 + 4*x^12 + 8*x^15 + ...
Theta series of lattice with Gram matrix [2, 1; 1, 6] = 1 + 2*q^2 + 4*q^6 + 2*q^8 + 4*q^10 + 6*q^18 + 2*q^22 + 4*q^24 + 8*q^30 + 2*q^32 + 4*q^40 + 4*q^46 + 6*q^50 + 8*q^54 + 4*q^62 + 4*q^66 + 6*q^72 + 4*q^74 + ...
		

References

  • Henry McKean and Victor Moll, Elliptic Curves, Cambridge University Press, 1997, page 202. MR1471703 (98g:14032).

Crossrefs

Number of integer solutions to f(x,y) = n where f(x,y) is the principal binary quadratic form with discriminant d: A004016 (d=-3), A004018 (d=-4), A002652 (d=-7), A033715 (d=-8), this sequence (d=-11), A028641 (d=-19), A138811 (d=-43).

Programs

  • Magma
    A := Basis( ModularForms( Gamma1(11), 1), 103); A[1] + 2*A[2] + 4*A[4] + 2*A[5]; /* Michael Somos, Jul 12 2014 */
  • Mathematica
    a[ n_] := If[ n < 1, Boole[ n == 0], DivisorSum[ n, KroneckerSymbol[ -11, #] &] 2]; (* Michael Somos, Jul 12 2014 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q] EllipticTheta[ 3, 0, q^11] + EllipticTheta[ 2, 0, q] EllipticTheta[ 2, 0, q^11], {q, 0, n}]; (* Michael Somos, Jul 12 2014 *)
  • PARI
    {a(n) = my(t); if( n<1, n==0, 2 * issquare(n) + 2 * sum( y=1, sqrtint(n * 4\11), 2 * issquare( t=4*n - 11*y^2) - (t==0)))}; /* Michael Somos, Sep 20 2004 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 + 2 * x * Ser(qfrep( [ 2, 1; 1, 6], n, 1)), n))}; /* Michael Somos, Apr 21 2015 */
    
  • PARI
    {a(n) = if( n<1, n==0, direuler( p=2, n, 1 / (1 - X) / (1 - kronecker( -11, p) * X))[n] * 2)}; /* Michael Somos, Jun 05 2005 */
    
  • PARI
    {a(n) = if( n<1, n==0, 2 * sumdiv( n, d, kronecker( -11, d)))}; /* Michael Somos, Jan 29 2007 */
    

Formula

Expansion of phi(x) * phi(x^11) = 4 * x^3 * psi(x^2) * psi(x^22) in powers of x where phi(), psi() are Ramanujan theta functions. - Michael Somos, Apr 21 2015
From Michael Somos, Jan 29 2007: (Start)
Moebius transform is period 11 sequence [ 2, -2, 2, 2, 2, -2, -2, -2, 2, -2, 0, ...].
a(n) = 2 * b(n) and b(n) is multiplicative with b(11^e) = 1, b(p^e) = (1 + (-1)^e) / 2 if p == 2, 6, 7, 8, 10 (mod 11), b(p^e) = e + 1 if p == 1, 3, 4, 5, 9 (mod 11).
G.f.: 1 + 2 * Sum_{k>0} Kronecker( -11, k) * x^k / (1 - x^k). (End)
G.f. is a period 1 Fourier series which satisfies f(-1 / (11 t)) = 11^(1/2) (t/i) f(t) where q = exp(2 Pi i t). - Michael Somos, Jun 05 2007
Expansion of (F(x)^2 + 4 * F(x^2)^2 + 8 * F(x^4)^2) / F(x^2) in powers of x or expansion of (F(x)^2 + 2 * F(x^2)^2 + 2 * F(x^4)^2) / F(x^2) in powers of x^4 where F(x) = x^(1/2) * f(-x) * f(-x^11) and f() is a Ramanujan theta function. - Michael Somos, Mar 01 2010
a(n) = 2 * A035179(n) unless n=0. Convolution square is A028610.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=0..m} a(k) = 2*Pi/sqrt(11) = 1.894451... . - Amiram Eldar, Dec 16 2023

A348410 Number of nonnegative integer solutions to n = Sum_{i=1..n} (a_i + b_i), with b_i even.

Original entry on oeis.org

1, 1, 5, 19, 85, 376, 1715, 7890, 36693, 171820, 809380, 3830619, 18201235, 86770516, 414836210, 1988138644, 9548771157, 45948159420, 221470766204, 1069091485500, 5167705849460, 25009724705460, 121171296320475, 587662804774890, 2852708925078675, 13859743127937876
Offset: 0

Views

Author

César Eliud Lozada, Oct 17 2021

Keywords

Comments

Suppose n objects are to be distributed into 2n baskets, half of these white and half black. White baskets may contain 0 or any number of objects, while black baskets may contain 0 or an even number of objects. a(n) is the number of distinct possible distributions.

Examples

			Some examples (semicolon separates white basket from black baskets):
For n=1: {{1 ; 0}} - Total possible ways: 1.
For n=2: {{0, 0 ; 0, 2}, {0, 0 ; 2, 0}, {0, 2 ; 0, 0}, {1, 1 ; 0, 0}, {2, 0 ; 0, 0}} - Total possible ways: 5.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(t=0, 1-signum(n),
          add(b(n-j, t-1)*(1+iquo(j, 2)), j=0..n))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..25);  # Alois P. Heinz, Oct 17 2021
  • Mathematica
    (* giveList=True produces the list of solutions *)
    (* giveList=False gives the number of solutions *)
    counter[objects_, giveList_: False] :=
      Module[{n = objects, nb, eq1, eqa, eqb, eqs, var, sol, var2, list},
       nb = n;
       eq1 = {Total[Map[a[#] + 2*b[#] &, Range[nb]]] - n == 0};
       eqa = {And @@ Map[0 <= a[#] <= n &, Range[nb]]};
       eqb = {And @@ Map[0 <= b[#] <= n &, Range[nb]]};
       eqs = {And @@ Join[eq1, eqa, eqb]};
       var = Flatten[Map[{a[#], b[#]} &, Range[nb]]];
       var = Join[Map[a[#] &, Range[nb]], Map[b[#] &, Range[nb]]];
       sol = Solve[eqs, var, Integers];
       var2 = Join[Map[a[#] &, Range[nb]], Map[2*b[#] &, Range[nb]]];
       list = Sort[Map[var2 /. # &, sol]];
       list = Map[StringReplace[ToString[#], {"," -> " ;"}, n] &, list];
       list = Map[StringReplace[#, {";" -> ","}, n - 1] &, list];
       Return[
        If[giveList, Print["Total: ", Length[list]]; list, Length[sol]]];
       ];
    (* second program: *)
    b[n_, t_] := b[n, t] = If[t == 0, 1 - Sign[n], Sum[b[n - j, t - 1]*(1 + Quotient[j, 2]), {j, 0, n}]];
    a[n_] := b[n, n];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Aug 16 2023, after Alois P. Heinz *)

Formula

Conjecture: D-finite with recurrence +7168*n*(2*n-1)*(n-1)*a(n) -64*(n-1)*(1759*n^2-5294*n+5112)*a(n-1) +12*(7561*n^3-75690*n^2+165271*n-101070)*a(n-2) +5*(110593*n^3-743946*n^2+1659971*n-1232778)*a(n-3) +2680*(4*n-15)*(2*n-7)*(4*n-13)*a(n-4)=0. - R. J. Mathar, Oct 19 2021
From Vaclav Kotesovec, Nov 01 2021: (Start)
Recurrence (of order 2): 16*(n-1)*n*(2*n - 1)*(51*n^2 - 162*n + 127)*a(n) = (n-1)*(5457*n^4 - 22791*n^3 + 32144*n^2 - 17536*n + 3072)*a(n-1) + 8*(2*n - 3)*(4*n - 7)*(4*n - 5)*(51*n^2 - 60*n + 16)*a(n-2).
a(n) ~ sqrt(3 + 5/sqrt(17)) * (107 + 51*sqrt(17))^n / (sqrt(Pi*n) * 2^(6*n+2)). (End)
From Peter Bala, Feb 21 2022: (Start)
a(n) = [x^n] ( (1 - x)*(1 - x^2) )^(-n). Cf. A234839.
a(n) = Sum_{k = 0..floor(n/2)} binomial(2*n-2*k-1,n-2*k)*binomial(n+k-1,k).
exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + x + 3*x^2 + 9*x^3 + 32*x^4 + 119*x^5 + ... is the g.f. of A063020.
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all primes p and positive integers n and k.
Conjecture: the supercongruences a(n*p^k) == a(n*p^(k-1)) (mod p^(3*k)) hold for all primes p >= 5 and positive integers n and k.
The o.g.f. A(x) is the diagonal of the bivariate rational function 1/(1 - t/((1-x)*(1-x^2))) and hence is an algebraic function over Q(x) by Stanley 1999, Theorem 6.33, p. 197.
Let F(x) = (1/x)*Series_Reversion( x*(1-x)*(1-x^2) ). Then A(x) = 1 + x*d/dx (log(F(x))). (End)
a(n) = Sum_{k = 0..n} (-1)^(n+k)*binomial(2*n+k-1, k)*binomial(2*n-k-1, n-k). Cf. A352373. - Peter Bala, Jun 05 2024

Extensions

More terms from Alois P. Heinz, Oct 17 2021

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

A341784 Norms of prime elements in Z[sqrt(-2)], the ring of integers of Q(sqrt(-2)).

Original entry on oeis.org

2, 3, 11, 17, 19, 25, 41, 43, 49, 59, 67, 73, 83, 89, 97, 107, 113, 131, 137, 139, 163, 169, 179, 193, 211, 227, 233, 241, 251, 257, 281, 283, 307, 313, 331, 337, 347, 353, 379, 401, 409, 419, 433, 443, 449, 457, 467, 491, 499, 521, 523, 529, 547, 563
Offset: 1

Views

Author

Jianing Song, Feb 19 2021

Keywords

Comments

Also norms of prime ideals in Z[sqrt(-2)], which is a unique factorization domain. The norm of a nonzero ideal I in a ring R is defined as the size of the quotient ring R/I.
Consists of the primes congruent to 1, 2, 3 modulo 8 and the squares of primes congruent to 5, 7 modulo 8.
For primes p == 1, 3 (mod 8), there are two distinct ideals with norm p in Z[sqrt(2)], namely (x + y*sqrt(-2)) and (x - y*sqrt(-2)), where (x,y) is a solution to x^2 + 2*y^2 = p; for p = 2, (sqrt(-2)) is the unique ideal with norm p; for p == 5, 7 (mod 8), (p) is the only ideal with norm p^2.

Examples

			norm(1 + sqrt(-2)) = norm(1 + sqrt(-2)) = 3;
norm(3 + sqrt(-2)) = norm(3 + sqrt(-2)) = 11;
norm(3 + 2*sqrt(-2)) = norm(3 + 2*sqrt(-2)) = 17;
norm(1 + 3*sqrt(-2)) = norm(1 + 3*sqrt(-2)) = 19.
		

Crossrefs

The number of nonassociative elements with norm n (also the number of distinct ideals with norm n) is given by A002325.
The total number of elements with norm n is given by A033715.
Norms of prime ideals in O_K, where K is the quadratic field with discriminant D and O_K be the ring of integers of K: A055673 (D=8), A341783 (D=5), A055664 (D=-3), A055025 (D=-4), A090348 (D=-7), this sequence (D=-8), A341785 (D=-11), A341786 (D=-15*), A341787 (D=-19), A091727 (D=-20*), A341788 (D=-43), A341789 (D=-67), A341790 (D=-163). Here a "*" indicates the cases where O_K is not a unique factorization domain.

Programs

  • PARI
    isA341784(n) = my(disc=-8); (isprime(n) && kronecker(disc,n)>=0) || (issquare(n, &n) && isprime(n) && kronecker(disc,n)==-1)

A345437 Represent the ring R = {x+y*sqrt(-2): x, y rational integers} by the cells centered at the points (x,y) of a square grid; number the cells of the grid along a counterclockwise square spiral, with the cells at (0,0) and (1,0) numbered 0, 1. Sequence lists the index numbers of the cells which are 0 or a prime in R.

Original entry on oeis.org

0, 2, 3, 4, 6, 7, 8, 25, 26, 28, 29, 32, 34, 37, 38, 40, 41, 44, 46, 57, 63, 73, 79
Offset: 1

Views

Author

N. J. A. Sloane, Jun 23 2021

Keywords

Comments

R is the ring of integers in the quadratic number field Q(sqrt(-2)). The element x+y*sqrt(-2) in R has norm x^2+2*y^2.
A033715 gives the number of elements in R with norm n.
There are two units, +-1, of norm 1.
A341784 gives the norms of the primes in R, and A345438 gives the numbers of primes of those norms.

Examples

			One can read off the primes from the blue cells in the illustration. The first few primes are +-sqrt(-2), 2 of norm 2; +-1+-sqrt(-2), 4 of norm 3; +-3+-sqrt(-2), 4 of norm 11; ... (see A345438).
		

References

  • H. M. Stark, An Introduction to Number Theory. Markham, Chicago, 1970; Theorem 8.22 on page 295 lists the nine UFDs of the form Q(sqrt(-d)), cf. A003173.

Crossrefs

A028641 Expansion of theta_3(q) * theta_3(q^19) + theta_2(q) * theta_2(q^19) in powers of q.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
The number of integer solutions (x, y) to x^2 + x*y + 5*y^2 = n, discriminant -19. - Ray Chandler, Jul 12 2014

Examples

			G.f. = 1 + 2*x + 2*x^4 + 4*x^5 + 4*x^7 + 2*x^9 + 4*x^11 + 2*x^16 + 4*x^17 + 2*x^19 + ...
		

References

  • Robert Fricke, Die elliptischen Funktionen und ihre Anwendungen, Teubner, 1922, Vol. 2, see p. 409, Eq. (19).

Crossrefs

Cf. A035171.
Number of integer solutions to f(x,y) = n where f(x,y) is the principal binary quadratic form with discriminant d: A004016 (d=-3), A004018 (d=-4), A002652 (d=-7), A033715 (d=-8), A028609 (d=-11), this sequence (d=-19), A138811 (d=-43).

Programs

  • Mathematica
    a[ n_] := If[ n < 1, Boole[ n == 0], DivisorSum[ n, KroneckerSymbol[ -19, #] &] 2]; (* Michael Somos, Jun 14 2012 *)
  • PARI
    {a(n) = if( n<1, n==0, sumdiv(n, d, kronecker(-19, d)) * 2)}; /* Michael Somos, Feb 27 2007 */
    
  • PARI
    {a(n) = if( n<1, n==0, qfrep([2, 1;1, 10], n, 1)[n] * 2)}; /* Michael Somos, Feb 27 2007 */

Formula

Theta series of quadratic form with Gram matrix [ 2, 1; 1, 10 ].
Expansion of phi(q) * phi(q^19) + 4 * q^5 * psi(q^2)* psi(q^38) in powers of q where phi(), psi() are Ramanujan theta functions. - Michael Somos, Feb 27 2007
Moebius transform is period 19 sequence [2, -2, -2, 2, 2, 2, 2, -2, 2, -2, 2, -2, -2, -2, -2, 2, 2, -2, 0, ...]. - Michael Somos, Feb 27 2007
a(n) = 2*b(n) where b(n) is multiplicative with a(0) = 1, b(19^e) = 1, b(p^e) = e + 1 if Kronecker(-19, p) = 1, b(p^e) = (1 + (-1)^e)/2 if Kronecker(-19, p) = -1. - Michael Somos, Feb 27 2007
a(n) = 2 * A035171(n) unless n = 0. - Jianing Song, Sep 06 2018
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=0..m} a(k) = 2*Pi/sqrt(19) = 1.441461... . - Amiram Eldar, Dec 16 2023
Showing 1-10 of 40 results. Next