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-6 of 6 results.

A002175 Excess of number of divisors of 12n+1 of form 4k+1 over those of form 4k+3.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Number of ways to write n as an ordered sum of 2 generalized pentagonal numbers. - Ilya Gutkovskiy, Aug 14 2017

Examples

			G.f. = 1 + 2*x + 3*x^2 + 2*x^3 + x^4 + 2*x^5 + 2*x^6 + 4*x^7 + 2*x^8 + 2*x^9 + ...
G.f. = q + 2*q^13 + 3*q^25 + 2*q^37 + q^49 + 2*q^61 + 2*q^73 + 4*q^85 + 2*q^97 + ...
		

References

  • 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

Programs

  • Maple
    series(mul( ( (1 + q^n)*(1 - q^(3*n))/(1 + q^(3*n)) )^2, n = 1..100), q, 101):
    seq(coeftayl(%, q = 0, n), n = 0..100); # Peter Bala, Jan 05 2025
  • Mathematica
    ed[n_]:=Module[{divs=Divisors[12n+1]},Count[divs,?(Mod[#,4] == 1&)]- Count[divs,?(Mod[#,4]==3&)]]; Array[ed,110,0] (* Harvey P. Dale, Jul 01 2012 *)
    a[ n_] := If[ n < 0, 0, With[ {m = 12 n + 1}, Sum[ KroneckerSymbol[ 4, d], {d, Divisors[m]}]]]; (* Michael Somos, Apr 23 2014 *)
    a[ n_] := SeriesCoefficient[ (QPochhammer[ x^2] QPochhammer[ x^3]^2 / (QPochhammer[ x] QPochhammer[ x^6]))^2, {x, 0, n}]; (* Michael Somos, Apr 23 2014 *)
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 4, 0, x^3] / QPochhammer[ x, x^2])^2, {x, 0, n}]; (* Michael Somos, May 25 2015 *)
  • PARI
    {a(n) = if( n<0, 0, n = 12*n + 1; sumdiv( n, d, (d%4==1) - (d%4==3)))}; /* Michael Somos, Sep 19 2005 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A) * eta(x^3 + A)^2 / (eta(x + A) * eta(x^6 + A)))^2, n))}; /* Michael Somos, Jun 02 2012 */

Formula

Expansion of (phi(-x^3) / chi(-x))^2 in powers of x where phi(), chi() are Ramanujan theta functions.
Expansion of q^(-1/12) * (eta(q^2) * eta(q^3)^2 / (eta(q) * eta(q^6)))^2 in powers of q. - Michael Somos, Sep 19 2005
Euler transform of period 6 sequence [ 2, 0, -2, 0, 2, -2, ...]. - Michael Somos, Sep 19 2005
G.f. is a period 1 Fourier series which satisfies f(-1 / (72 t)) = 2 (t/i) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A258279. - Michael Somos, May 25 2015
From Michael Somos, Jun 02 2012: (Start)
a(n) = A008441(3*n) = A121363(3*n) = A122865(4*n) = A122856(8*n).
a(n) = A116604(6*n) = A125079(6*n) = A129447(6*n) = A138741(6*n).
From Michael Somos, May 25 2015: (Start)
a(n) = A258277(4*n) = A258278(8*n) = A258291(3*n).
a(n) = - A258210(12*n + 1) = A258228(12*n + 1) = A258256(12*n + 1).
2*a(n) = A258279(12*n + 1) = - A258292(12*n + 1). (End)
G.f.: (Sum_{k = -oo..oo} x^(k*(3*k-1)/2))^2. - Ilya Gutkovskiy, Aug 14 2017
G.f.: ( Product_{n >= 1} (1 + q^n)*(1 - q^(3*n))/(1 + q^(3*n)) )^2. - Peter Bala, Jan 05 2025

A281451 Expansion of x * f(x, x) * f(x, x^17) in powers of x where f(, ) is Ramanujan's general theta function.

Original entry on oeis.org

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

Views

Author

Michael Somos, Jan 23 2017

Keywords

Examples

			G.f. = x + 3*x^2 + 2*x^3 + 2*x^5 + 2*x^6 + 2*x^10 + 2*x^11 + 2*x^17 + ...
G.f. = q^16 + 3*q^25 + 2*q^34 + 2*q^52 + 2*q^61 + 2*q^97 + 2*q^106 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, DivisorSum[ 9 n + 7, KroneckerSymbol[ -4, #] &]];
    a[ n_] := If[ n < 0, 0, Times @@ (Which[# < 3, 1, Mod[#, 4] == 1, #2 + 1, True, (1 + (-1)^#2) / 2] & @@@ FactorInteger[ 9 n + 7])];
    a[ n_] := SeriesCoefficient[ x EllipticTheta[ 3, 0, x] QPochhammer[ -x, x^18] QPochhammer[ -x^17, x^18] QPochhammer[ x^18], {x, 0, n}];
  • PARI
    {a(n) = if( n<0, 0, sumdiv(9*n + 7, d, (d%4==1) - (d%4==3)))};
    
  • PARI
    {a(n) = if( n<0, 0, my(A, p, e); A = factor(9*n + 7); prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if(p==2, 1, p%4==1, e+1, 1-e%2)))};
    
  • PARI
    {a(n) = if( n<0, 0, my(m = 9*n + 7, k, s); forstep(j=0, sqrtint(m), 3, if( issquare(m - j^2, &k) && (k%9 == 4 || k%9 == 5), s+=(j>0)+1)); s)};

Formula

f(x,x^m) = 1 + Sum_{k>=1} x^((m+1)*k*(k-1)/2) (x^k + x^(m*k)). - N. J. A. Sloane, Jan 30 2017
Euler transform of a period 36 sequence.
G.f.: x * (Sum_{k in Z} x^k^2) * (Sum_{k in Z} x^(9*k^2 + 8*k)).
G.f.: x * Product_{k>0} (1 + x^(2*k-1))^2 * (1 - x^(2*k)) * (1 + x^(18*k-17)) * (1 + x^(18*k-1)) * (1 - x^(18*k)).
a(4*n) = a(8*n + 7) = a(16*n + 13) = a(32*n + 9) = a(49*n + 7) = a(98*n + 14) = 0.
a(4*n + 1) = A281452(n). a(8*n + 3) = 2 * A281491(n). A(16*n + 1) = A281453(n).
a(32*n + 25) = 2 * A281490(n). a(64*n + 49) = a(n). a(128*n + 17) = 2 * A281492(n).
a(n) = A122865(3*n + 2). a(n) = A122856(6*n + 4) = A258278(6*n + 4).
2 * a(n) = b(9*n + 7) where b = A105673, A122857, A258034, A259761. -2 * a(n) = b(9*n + 7) where b = A138949, A256280, A258292.
a(n) = - A256269(9*n + 7). 4 * a(n) = A004018(9*n + 7).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/3 = 1.0471975... (A019670). - Amiram Eldar, Jan 20 2025

A281452 Expansion of f(x, x) * f(x^5, x^13) in powers of x where f(, ) is Ramanujan's general theta function.

Original entry on oeis.org

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

Views

Author

Michael Somos, Jan 26 2017

Keywords

Examples

			G.f. = 1 + 2*x + 2*x^4 + x^5 + 2*x^6 + 4*x^9 + x^13 + 4*x^14 + 2*x^16 + ...
G.f. = q^4 + 2*q^13 + 2*q^40 + q^49 + 2*q^58 + 4*q^85 + q^121 + 4*q^130 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, DivisorSum[ 9 n + 4, KroneckerSymbol[ -4, #] &]];
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, x] QPochhammer[ -x^5, x^18] QPochhammer[ -x^13, x^18] QPochhammer[ x^18], {x, 0, n}];
    a[ n_] := If[ n < 0, 0, Times @@ (Which[ # < 3, 1, Mod[#, 4] == 1, #2 + 1, True, (1 + (-1)^#2) / 2] & @@@ FactorInteger[ 9 n + 4])];
  • PARI
    {a(n) = if( n<0, 0, sumdiv(9*n + 4, d, (d%4==1) - (d%4==3)))};
    
  • PARI
    {a(n) = if( n<0, 0, my(m = 9*n + 4, k, s); forstep(j=0, sqrtint(m), 3, if( issquare(m - j^2, &k) && (k%9 == 2 || k%9 == 7), s+=(j>0)+1)); s)};
    
  • PARI
    {a(n) = if( n<0, 0, my(A, p, e); A = factor(9*n + 4); prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if(p==2, 1, p%4==1, e+1, 1-e%2)))};

Formula

f(a,b) = 1 + Sum_{k=1..oo} (ab)^(k(k-1)/2)*(a^k+b^k). - N. J. A. Sloane, Jan 30 2017
Euler transform of a period 36 sequence.
G.f.: (Sum_{k in Z} x^k^2) * (Sum_{k in Z} x^(9*k^2 + 4*k)).
G.f.: Product_{k>0} (1 + x^(2*k-1))^2 * (1 - x^(2*k)) * (1 - x^(18*k-13)) * (1 - x^(18*k-5)) * (1 - x^(18*k)).
a(n) = A122865(3*n + 1) = A122856(6*n + 2) = A258278(6*n + 2). a(n) = - A256269(9^n + 4). 4 * a(n) = A004018(9*n + 4).
2 * a(n) = b(9*n + 4) = with b = A105673, A105673, A122857, A258034, A259761. -2 * a(n) = b(9*n + 4) with b = A138949, A256280, A258292.
a(4*n) = A281453(n). a(8*n + 6) = 2 * A281490(n). a(16*n + 12) = A281451(n).
a(32*n + 4) = 2 * A281492(n). a(64*n + 28) = A281452(n). a(128*n + 60) = 2 * A281491(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/3 = 1.0471975... (A019670). - Amiram Eldar, Jan 20 2025

A281453 Expansion of f(x, x) * f(x^7, x^11) in powers of x where f(, ) is Ramanujan's general theta function.

Original entry on oeis.org

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

Views

Author

Michael Somos, Jan 26 2017

Keywords

Examples

			G.f. = 1 + 2*x + 2*x^4 + x^7 + 2*x^8 + 2*x^9 + 3*x^11 + 2*x^12 + ...
G.f. = q + 2*q^10 + 2*q^37 + q^64 + 2*q^73 + 2*q^82 + 3*q^100 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, DivisorSum[ 9 n + 1, KroneckerSymbol[ -4, #] &]];
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, x] QPochhammer[ -x^7, x^18] QPochhammer[ -x^11, x^18] QPochhammer[ x^18], {x, 0, n}];
    a[ n_] := If[ n < 0, 0, Times @@ (Which[# < 3, 1, # == 3, Mod[#2, 2] 2 + 1, Mod[#, 4] == 1, #2 + 1, True, (1 + (-1)^#2) / 2] & @@@ FactorInteger[ 9 n + 1])];
  • PARI
    {a(n) = if( n<0, 0, sumdiv(9*n + 1, d, kronecker(-4, d)))};
    
  • PARI
    {a(n) = if( n<0, 0, my(m = 9*n + 1, k, s); forstep(j=0, sqrtint(m), 3, if( issquare(m - j^2, &k) && (k%9 == 1 || k%9 == 8), s+=(j>0)+1)); s)};
    
  • PARI
    {a(n) = if( n<0, 0, my(A, p, e); A = factor(9*n + 1); prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if(p==2, 1, p==3, -2*(-1)^e, p%4==1, e+1, 1-e%2)))};

Formula

f(a,b) = 1 + Sum_{k=1..oo} (ab)^(k(k-1)/2)*(a^k+b^k). - N. J. A. Sloane, Jan 30 2017
Euler transform of a period 36 sequence.
G.f.: (Sum_{k in Z} x^k^2) * (Sum_{k in Z} x^(9*k^2 + 2*k)).
G.f.: Product_{k>0} (1 + x^(2*k-1))^2 * (1 - x^(2*k)) * (1 + x^(18*k-11)) * (1 + x^(18*k-7)) * (1 - x^(18*k)).
a(4*n + 2) = a(8*n + 5) = a(16*n + 3) = a(32*n + 31) = a(64*n + 55) = a(128*n + 39) = 0.
a(4*n + 3) = A281451(n). a(8*n + 1) = 2 * A281492(n). a(16*n + 7) = A281452(n). a(32*n + 15) = 2 * A281491(n). a(128*n + 103) = 2 * A281490(n).
a(n) = A122865(3*n) = A122856(6*n) = A258278(6*n) = a(64*n + 7). a(n) = -A256269(9*n + 1).
2 * a(n) = b(9*n + 1) where b = A105673, A122857, A258034, A259761. 2 * a(n) = - b(9*n+1) where b = A138949, A256280, A258292. 4 * a(n) = A004018(9*n + 1).
Convolution of A000122 and A205808.

A256282 Expansion of f(-q^3) * psi(q^3)^3 / (psi(q) * psi(q^9)) in powers of q where psi(), f() are Ramanujan theta functions.

Original entry on oeis.org

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

Views

Author

Michael Somos, Jun 02 2015

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 - q + q^2 + q^4 - 2*q^5 + q^8 - 4*q^9 + 2*q^10 - 2*q^13 + q^16 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ q^(1/8) QPochhammer[ q^3] EllipticTheta[ 2, 0, q^(3/2)]^3 / (2 EllipticTheta[ 2, 0, q^(1/2)] EllipticTheta[ 2, 0, q^(9/2)]), {q, 0, n}];
    a[ n_] := If[ n < 1, Boole[n == 0], DivisorSum[ n, {1, 2, -1, 0}[[Mod[#, 4, 1]]] If[ Divisible[#, 9], 4, 1] (-1)^(Boole[Mod[#, 8] == 6] + #) &]]; (* Michael Somos, Jun 06 2015 *)
    a[ n_] := If[ n < 1, Boole[ n==0 ], -Times @@ (Which[ # == 1, 1, # == 2, -1, Mod[#, 4] == 1, #2 + 1, True, If[# == 3, 4, 1] Mod[#2 + 1, 2]] & @@@ FactorInteger[n])]; (* Michael Somos, Jun 06 2015 *)
  • PARI
    {a(n) = if( n<1, n==0, sumdiv(n, d, [0, 1, 2, -1][d%4 + 1] * if(d%9, 1, 4) * (-1)^((d%8==6) + d)))};
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x + A) * eta(x^6 + A)^6 * eta(x^9 + A) / (eta(x^2 + A)^2 * eta(x^3 + A)^2 * eta(x^18 + A)^2), n))};

Formula

Expansion of eta(q) * eta(q^6)^6 * eta(q^9) / (eta(q^2)^2 * eta(q^3)^2 * eta(q^18)^2) in powers of q.
Euler transform of period 18 sequence [ -1, 1, 1, 1, -1, -3, -1, 1, 0, 1, -1, -3, -1, 1, 1, 1, -1, -2, ...].
Moebius transform is a period 72 sequence.
a(n) = (-1)^n * A258256(n). a(2*n) = A258256(n). a(3*n + 1) = - A258277(n). a(3*n + 2) = A258278(n). a(4*n + 3) = 0.
a(n) = -b(n) where b() is multiplicative with a(0) = 1, b(2^e) = -1 if e>0, b(3^e) = 2 * (1 + (-1)^e), a(p^e) = (1 + (-1)^e) / 2 if p == 3 (mod 4), a(p^e) = e+1 if p == 1 (mod 4). - Michael Somos, Jun 06 2015

A258260 Expansion of f(x) + 2*f(x^2) + 3*f(x^9) + 6*f(x^18) in powers of x where f(x) := x / (1 + x^2).

Original entry on oeis.org

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

Views

Author

Michael Somos, May 24 2015

Keywords

Examples

			G.f. = x + 2*x^2 - x^3 + x^5 - 2*x^6 - x^7 + 4*x^9 + 2*x^10 - x^11 + ...
		

Crossrefs

Cf. A258256.

Programs

  • Mathematica
    a[ n_] := {1, 2, -1, 0}[[Mod[n, 4, 1]]] If[ Divisible[ n, 9], 4, 1] (-1)^Boole[Mod[n, 8] == 6];
    a[ n_] := With[ {m = Mod[n, 72], f = #/(1 + #^2) &}, SeriesCoefficient[ f[x] + 2 f[x^2] + 3 f[x^9] + 6 f[x^18], {x, 0, m}]];
  • PARI
    {a(n) = [0, 1, 2, -1][n%4 + 1] * if(n%9, 1, 4) * (-1)^(n%8==6)};

Formula

a(n) is multiplicative with a(2) = 1, a(2^e) = 0 if e>1, a(3) = -1, a(3^e) = 4 * (-1)^e if e>1, a(p^e) = 1 if p == 1 (mod 4), a(p^e) = (-1)^e if p == 3 (mod 4).
a(n) = -a(-n) = a(n+72) = a(n+36)*(-1)^(mod(n,4)=2) for all n in Z.
0 = a(n) + a(n+18) + a(n+36) + a(n+54) for all n in Z.
Sum_{d|n} a(d) * (-1)^(n+d) = A258256(n) if n>0.
Sum_{k=1..n} abs(a(k)) ~ (4/3) * n. - Amiram Eldar, Jan 28 2024
Showing 1-6 of 6 results.