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.

Previous Showing 31-40 of 48 results. Next

A129134 Expansion of (1 - phi(-q) * phi(-q^2)) / 2 in powers of q where phi() is a Ramanujan theta function.

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

Michael Somos, Mar 30 2007

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
For n nonzero, a(n) is nonzero if and only if n is in A002479.

Examples

			G.f. = q + q^2 - 2*q^3 - q^4 + 2*q^6 - q^8 + 3*q^9 - 2*q^11 - 2*q^12 - q^16 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 1, 0, (-1)^Quotient[ n - 1, 2] DivisorSum[n, KroneckerSymbol[-2, #] &]]; (* Michael Somos, Jun 09 2015 *)
    a[ n_] := SeriesCoefficient[ (1 - EllipticTheta[ 4, 0, q] EllipticTheta[ 4, 0, q^2]) / 2 , {q, 0, n}]; (* Michael Somos, Jun 09 2015 *)
    a[ n_] := SeriesCoefficient[ (1 - QPochhammer[ q]^2 QPochhammer[ q^2] / QPochhammer[ q^4]) / 2 , {q, 0, n}]; (* Michael Somos, Jun 09 2015 *)
  • PARI
    {a(n) = if( n<1, 0, (-1)^((n-1)\2) * sumdiv(n, d, kronecker( -2, d)))};
    
  • PARI
    {a(n) = local(A); if( n<1, 0, A = x * O(x^n); polcoeff( (1 - eta(x + A)^2 * eta(x^2 + A) / eta(x^4 + A)) / 2, n))};

Formula

Expansion of (1 - eta(q)^2 * eta(q^2) / eta(q^4)) / 2 in powers of q.
G.f.: (1 - Product_{k>0} (1 - x^k)^2 / (1 + x^(2*k)) )/2.
a(n) = A002325(n) * (-1)^floor((n-1)/2). A082564(n) = -2 * a(n) unless n=0.
a(3*n + 1) = A258747(n). a(3*n + 2) = A258764(n). - Michael Somos, Jun 09 2015

A139093 Expansion of phi(q) * phi(-q^2) in powers of q where phi() is a Ramanujan theta function.

Original entry on oeis.org

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

Views

Author

Michael Somos, Apr 08 2008

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
a(n) is nonzero if and only if n is in A002479.

Examples

			G.f. = 1 + 2*q - 2*q^2 - 4*q^3 + 2*q^4 - 4*q^6 + 2*q^8 + 6*q^9 - 4*q^11 + ...
		

Crossrefs

Programs

  • Magma
    A := Basis( ModularForms( Gamma1(32), 1), 105); A[1] + 2*A[2] - 2*A[3] - 4*A[4] + 2*A[5] - 4*A[7] + 2*A[9] + 6*A[10] - 4*A[12] + 4*A[13] + 4*A[16]; /* Michael Somos, Aug 29 2014 */
  • Mathematica
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q] EllipticTheta[ 4, 0, q^2], {q, 0, n}]; (* Michael Somos, Aug 29 2014 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ q^2]^7 / (QPochhammer[ q]^2 QPochhammer[ q^4]^3), {q, 0, n}]; (* Michael Somos, Feb 18 2015 *)
    a[ n_] := If[ n < 1, Boole[n == 0], 2 (-1)^Quotient[n, 2] Sum[ JacobiSymbol[ -2, d], {d, Divisors @ n}]]; (* Michael Somos, Feb 18 2015 *)
  • PARI
    {a(n) = if( n<1, n==0, 2 * (-1)^(n\2) * sumdiv(n, d, kronecker( -2, d)))};
    
  • PARI
    {a(n) = my(A); if ( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^7 / (eta(x + A)^2 * eta(x^4 + A)^3), n))};
    

Formula

Expansion of eta(q^2)^7 / (eta(q)^2 * eta(q^4)^3) in powers of q.
Euler transform of period 4 sequence [ 2, -5, 2, -2, ...].
G.f. is a period 1 Fourier series which satisfies f(-1 / (4 t)) = 8^(1/2) (t/i) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A112603.
G.f.: Product_{k>0} (1 - x^(2*k))^2 * (1 + x^(2*k-1))^2 / (1 + x^(2*k)).
a(8*n + 5) = a(8*n + 7) = 0.
a(n) = (-1)^n * A082564(n). a(2*n) = A133692(n). a(2*n + 1) = 2 * A125095(n). a(4*n) = a(8*n) = A033715(n). a(8*n + 1) = 2 * A112603(n). a(8*n + 3) = -4 * A033761(n).

A308547 Number of ways to write n as a^2 + 2*b^2 + 2^c*3^d, where a,b,c,d are nonnegative integers.

Original entry on oeis.org

1, 2, 3, 4, 4, 4, 4, 4, 5, 7, 5, 8, 6, 5, 6, 4, 6, 8, 7, 10, 8, 6, 4, 8, 8, 8, 10, 10, 6, 9, 6, 4, 10, 9, 11, 14, 8, 8, 9, 10, 8, 11, 8, 9, 13, 6, 5, 8, 9, 10, 11, 13, 7, 14, 8, 10, 13, 9, 11, 16, 7, 7, 13, 4, 12, 12, 10, 12, 10, 13, 5, 14, 13, 9, 17, 12, 7, 12, 6, 10
Offset: 1

Views

Author

Zhi-Wei Sun, Jun 06 2019

Keywords

Comments

As 3*(a^2 + 2*b^2 + 2^c*3^d) = (a+2*b)^2 + 2*(a-b)^2 + 2^c*3^(d+1), we have a(3*n) > 0 if a(n) > 0.
The first positive integer n with a(n) = 0 is 139571911. We also have a(142991573) = 0.

Examples

			a(1) = 1 with 1 = 0^2 + 2*0^2 + 2^0*3^0.
a(2) = 2 with 2 = 0^2 + 2*0^2 + 2^1*3^0 = 1^2 + 2*0^2 + 2^0*3^0.
a(1117) = 2 with 1117 = 10^2 + 2*12^2 + 2^0*3^6 = 19^2 + 2*18^2 + 2^2*3^3.
a(78373) = 1 with 78373 = 271^2 + 2*48^2 + 2^2*3^4.
a(448159) = 1 with 448159 = 610^2 + 2*195^2 + 2^0*3^2.
a(82816213) = 2 with 82816213 = 4353^2 + 2*5651^2 + 2^1*3^0 = 3681^2 + 2*5885^2 + 2^1*3^0.
a(90685253) = 2 with 90685253 = 7007^2 + 2*4560^2 + 2^2*3^0 = 607^2 + 2*6720^2 + 2^2*3^0.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    tab={};Do[r=0;Do[If[SQ[n-3^k*2^m-2x^2],r=r+1],{k,0,Log[3,n]},{m,0,Log[2,n/3^k]},{x,0,Sqrt[(n-3^k*2^m)/2]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A034027 Numbers of the form x^2+2y^2 with x >= y >= 0.

Original entry on oeis.org

0, 1, 3, 4, 6, 9, 11, 12, 16, 17, 18, 24, 25, 27, 33, 34, 36, 38, 43, 44, 48, 49, 51, 54, 57, 64, 66, 67, 68, 72, 75, 81, 82, 83, 86, 89, 96, 99, 100, 102, 108, 113, 114, 118, 121, 123, 129, 131, 132, 136, 139, 144, 146, 147, 150, 152, 153, 162, 169, 171
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A002479.

Extensions

Definition corrected by N. J. A. Sloane, Apr 30 2015 (thanks to Harvey P. Dale for pointing out that something was wrong).

A035172 a(n) = Sum_{d|n} Kronecker(-18, d).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
For n nonzero, a(n) is nonzero if and only if n is in A002479.

References

  • Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 81, Eq. (32.51).

Crossrefs

Cf. A002479, A093825, A122071 (odd bisection).

Programs

  • Mathematica
    a[n_] := DivisorSum[n, KroneckerSymbol[-18, #]&]; Array[a, 105] (* Jean-François Alcover, Nov 14 2015 *)
  • PARI
    {a(n) = if( n<1, 0, sumdiv( n, d, kronecker( -18, d)))}
    
  • PARI
    {a(n) = if( n<1, 0, direuler( p=2, n, 1 / (1 - X) / (1 - kronecker( -18, p) * X))[n])}
    
  • PARI
    {a(n) = local(A); if( n<1, 0, n--; A = x * O(x^n); polcoeff( eta(x^2 + A) * eta(x^3 + A) * eta(x^4 + A) * eta(x^24 + A) / eta(x + A) / eta(x^8 + A), n))}

Formula

Expansion of q * psi(-q^3) * psi(-q^6) * chi(-q^4) / chi(-q) in powers of q where psi(), chi() are Ramanujan theta functions.
From Michael Somos, Apr 25 2003: (Start)
G.f.: x * Product_{k>0} (1 - x^(3*k)) * (1 - x^(24*k)) * (1 + x^k) / (1 + x^(4*k)).
Euler transform of period 24 sequence [ 1, 0, 0, -1, 1, -1, 1, 0, 0, 0, 1, -2, 1, 0, 0, 0, 1, -1, 1, -1, 0, 0, 1, -2, ...]. (End)
Moebius transform is period 24 sequence [ 1, 0, 0, 0, -1, 0, -1 ,0, 0, 0, 1, 0, -1, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1, 0, ...]. - Michael Somos, Jan 28 2006
From Michael Somos, Aug 04 2006: (Start)
Multiplicative with a(2^e) = a(3^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).
G.f.: Sum_{k>0} x^k * (1 - x^(4*k)) * (1 - x^(6* k)) / (1 + x^(12*k)). (End)
Coefficients in expansion of Dirichlet series Product_p (1-(Kronecker(m,p)+1)*p^(-s)+Kronecker(m,p)*p^(-2s))^(-1) for m = -18.
G.f.: 1 + Sum{n = -infinity...infinity} (q^n - q^(5n)) / (1 + q^(12n)) (see Berkovich/Yesilyurt). - Ralf Stephan, May 14 2007
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/(3*sqrt(2)) = 0.7404804... (A093825). - Amiram Eldar, Nov 16 2023

A302641 Number of nonnegative integers k such that n^2 - 3*2^k can be written as x^2 + 2*y^2 with x and y integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 10 2018

Keywords

Comments

The author's Square Conjecture in A301471 implies that a(n) > 0 for all n > 1.
We have a(2^n) = 1 for all n > 0. In fact, (2^n)^2 = (2^(n-1))^2 + 2*0^2 + 3*2^(2*n-2). If k > 2*n-2 then 3*2^k >= 6*2^(2*n-2) > (2^n)^2. If 0 <= k < 2*n-2, then 2*n-k is at least 3 and hence (2^n)^2 - 3*2^k = 2^k*(2^(2*n-k)-3) cannot be written as x^2 + 2*y^2 with x and y integers.

Examples

			a(2) = 1 with 2^2 = 1^2 + 2*0^2 + 3*2^0.
a(3) = 2 with 3^2 = 2^2 + 2*1^2 + 3*2^0 = 1^2 + 2*1^2 + 3*2^1.
a(2857932461) = 1 since 3 is the only nonnegative integer k such that 2857932461^2 - 3*2^k has the form x^2 + 2*y^2 with x and y integers.
a(4428524981) = 2 since 3 and 8 are the only nonnegative integers k such that 4428524981^2 - 3*2^k has the form x^2 + 2*y^2 with x and y integers.
a(4912451281) = 3 since 3, 6 and 7 are the only nonnegative integers k with 4428524981^2 - 3*2^k = x^2 + 2*y^2 for some integers x and y.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n];
    g[n_]:=g[n]=Sum[Boole[(Mod[Part[Part[f[n],i],1],8]==5||Mod[Part[Part[f[n],i],1],8]==7)&&Mod[Part[Part[f[n],i],2],2]==1],{i,1,Length[f[n]]}]==0;
    QQ[n_]:=QQ[n]=(n==0)||(n>0&&g[n]);
    tab={};Do[r=0;Do[If[QQ[n^2-3*2^k],r=r+1],{k,0,Log[2,n^2/3]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A034031 Numbers that are primitively but not imprimitively represented by x^2+2y^2.

Original entry on oeis.org

1, 2, 3, 6, 11, 17, 19, 22, 33, 34, 38, 41, 43, 51, 57, 59, 66, 67, 73, 82, 83, 86, 89, 97, 102, 107, 113, 114, 118, 123, 129, 131, 134, 137, 139, 146, 163, 166, 177, 178, 179, 187, 193, 194, 201, 209, 211, 214, 219, 226, 227
Offset: 1

Views

Author

Keywords

Crossrefs

Extensions

Corrected by N. J. A. Sloane, Apr 30 2015

A034033 Both primitively and imprimitively represented by x^2+2y^2.

Original entry on oeis.org

9, 18, 27, 54, 81, 99, 121, 153, 162, 171, 198, 242, 243, 289, 297, 306, 342, 361, 363, 369, 387, 459, 486, 513, 531, 578, 594, 603, 657, 722, 726, 729, 738, 747, 774, 801, 867, 873, 891, 918, 963, 1017, 1026, 1062, 1083, 1089
Offset: 1

Views

Author

Keywords

Crossrefs

Extensions

Corrected by N. J. A. Sloane, Apr 30 2015

A124452 Expansion of psi(-q) * psi(-q^2) * chi(q^3) * chi(q^6) in powers of q where psi(), chi() are Ramanujan theta functions.

Original entry on oeis.org

1, -1, -1, 1, -1, 0, 1, 0, -1, 3, 0, -2, 1, 0, 0, 0, -1, -2, 3, -2, 0, 0, -2, 0, 1, -1, 0, 5, 0, 0, 0, 0, -1, 2, -2, 0, 3, 0, -2, 0, 0, -2, 0, -2, -2, 0, 0, 0, 1, -1, -1, 2, 0, 0, 5, 0, 0, 2, 0, -2, 0, 0, 0, 0, -1, 0, 2, -2, -2, 0, 0, 0, 3, -2, 0, 1, -2, 0, 0, 0, 0, 7, -2, -2, 0, 0, -2, 0, -2, -2, 0, 0, 0, 0, 0, 0, 1, -2, -1, 6, -1, 0, 2, 0, 0
Offset: 0

Views

Author

Michael Somos, Nov 02 2006

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
a(n) is nonzero if and only if n is in A002479.

Examples

			1 - q - q^2 + q^3 - q^4 + q^6 - q^8 + 3*q^9 - 2*q^11 + q^12 - q^16 - 2*q^17 + ...
		

Crossrefs

Cf. A002479.

Programs

  • Mathematica
    eta[q_]:= q^(1/24)*QPochhammer[q]; a[n_]:= SeriesCoefficient[eta[q]* eta[q^6]*eta[q^8]*eta[q^12]/(eta[q^3]*eta[q^24]), {q, 0, n}]; Table[a[n], {n, 0, 50}] (* G. C. Greubel, Mar 08 2018 *)
  • PARI
    {a(n) = local(A, p, e); if( n<1, n==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==3, 1 - 2*e, if( p%8<4, e+1, !(e%2)))))))}
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x + A) * eta(x^6 + A) * eta(x^8 + A) * eta(x^12 + A) / (eta(x^3 + A) * eta(x^24 + A)), n))}
    
  • PARI
    q='q+O('q^99); Vec(eta(q)*eta(q^6)*eta(q^8)*eta(q^12)/(eta(q^3)*eta(q^24))) \\ Altug Alkan, Mar 09 2018

Formula

Expansion of eta(q) * eta(q^6) * eta(q^8) * eta(q^12) / (eta(q^3) * eta(q^24)) in powers of q.
a(n) = -b(n) where b(n) is multiplicative with b(2^e) = 1, b(3^e) = 1 - 2*e, b(p^e) = 1+e if p == 1, 3 (mod 8), b(p^e) = (1 + (-1)^e) / 2 if p == 5, 7 (mod 8).
Euler transform of period 24 sequence [ -1, -1, 0, -1, -1, -1, -1, -2, 0, -1, -1, -2, -1, -1, 0, -2, -1, -1, -1, -1, 0, -1, -1, -2, ...].
Moebius transform is period 24 sequence [ -1, 0, 2, 0, 1, 0, 1, 0, 2, 0, -1, 0, 1, 0, -2, 0, -1, 0, -1, 0, -2, 0, 1, 0, ...].
a(8*n + 5) = a(8*n + 7) = 0. a(2*n) = a(n). a(3*n) >= 0.

A133693 Expansion of (1 - phi(-q) * phi(q^2)) / 2 in powers of q where phi() is a Ramanujan theta function.

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
Offset: 1

Views

Author

Michael Somos, Sep 20 2007

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
For n nonzero, a(n) is nonzero if and only if n is in A002479.

Examples

			G.f. = q - q^2 + 2*q^3 - q^4 - 2*q^6 - q^8 + 3*q^9 + 2*q^11 - 2*q^12 - q^16 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 1, 0, -(-1)^n DivisorSum[ n, KroneckerSymbol[ -2, #] &]]; (* Michael Somos, Oct 30 2015 *)
  • PARI
    {a(n) = if( n<1, 0, -(-1)^n * sumdiv(n, d, kronecker( -2, d)))};

Formula

Expansion of (1 - eta(q)^2 * eta(q^4)^5 / (eta(q^2)^3 * eta(q^8)^2)) / 2 in powers of q.
Moebius transform is period 16 sequence [ 1, -2, 1, 0, -1, -2, -1, 0, 1, 2, 1, 0, -1, 2, -1, 0, ...].
a(n) is multiplicative with a(2^e) = -1 if e>0, a(p^e) = (1 + (-1)^e) / 2 if p == 5, 7 (mod 8), a(p^e) = e + 1 if p == 1, 3 (mod 8).
a(8*n + 5) = a(8*n + 7) = 0. A133692(n) = -2 * a(n) unless n=0. a(n) = -(-1)^n * A002325(n). a(2*n + 1) = A113411(n).
Previous Showing 31-40 of 48 results. Next