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

A214295 a(n) = 1 if n is a square, -1 if n is three times a square, 0 otherwise.

Original entry on oeis.org

1, 0, -1, 1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
Offset: 1

Views

Author

Michael Somos, Jul 10 2012

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
a(A092206(n)) = 0; a(A000290(n)) = 1; a(A033428(n)) = -1.

Examples

			G.f. = q - q^3 + q^4 + q^9 - q^12 + q^16 + q^25 - q^27 + q^36 - q^48 + q^49 + ...
		

Crossrefs

Programs

  • Haskell
    a214295 n = a010052 n - a010052 (3*n)  -- Reinhard Zumkeller, Jul 12 2012
    
  • Magma
    Basis( ModularForms( Gamma1(12), 1/2), 50) [2] ; /* Michael Somos, Jun 10 2014 */
  • Mathematica
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] - EllipticTheta[ 3, 0, q^3]) / 2, {q, 0, n}];
    a[ n_] := Boole[ IntegerQ[ Sqrt[ n]]] - Boole[ IntegerQ[ Sqrt[ 3 n]]]; (* Michael Somos, Jun 10 2014 *)
    Table[Which[IntegerQ[Sqrt[n]],1,IntegerQ[Sqrt[n/3]],-1,True,0],{n,120}] (* Harvey P. Dale, Apr 08 2013 *)
  • PARI
    {a(n) = issquare(n) - issquare(3*n)};
    
  • PARI
    {a(n) = if( n<1, 0, direuler( p=2, n, if( p==3, 1 - X, 1) / (1 - X^2 ))[n])};
    

Formula

Expansion of q * psi(q^3) * f(-q^2, -q^10) / f(-q^5, -q^7) in powers of q where psi(), f() are Ramanujan theta functions.
Multiplicative with a(3^e) = (-1)^e, a(p^e) = 1 if e even, 0 otherwise.
G.f.: (theta_3(q) - theta_3(q^3)) / 2 = Sum_{k>0} x^(k^2) - x^(3*k^2).
Dirichlet g.f.: zeta(2*s) * (1 - 3^(-s)). [corrected by Amiram Eldar, Oct 24 2023]
a(3*n) = - a(n). - Reinhard Zumkeller, Jul 12 2012
Expansion of (phi(q) - phi(q^3)) / 2 = q * chi(q) * f(-q, -q^11) in powers fof q where phi(), chi(), f() are Ramanujan theta functions. - Michael Somos, Jan 10 2015
Euler transform of period 12 sequence [ 0, -1, 1, 0, 1, -1, 1, 0, 1, -1, 0, -1, ...]. - Michael Somos, Jan 10 2015
Convolution product of A000700 and A247133. - Michael Somos, Jan 10 2015
Sum_{k=1..n} a(k) ~ c*sqrt(n), where c = 1 - 1/sqrt(3) = 0.42264973... . - Amiram Eldar, Oct 24 2023

A244612 a(n) = 1 if n is a square, -1 if n is six times a square, 0 if n < 1.

Original entry on oeis.org

1, 0, 0, 1, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Michael Somos, Jul 01 2014

Keywords

Comments

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

Examples

			G.f. = q + q^4 - q^6 + q^9 + q^16 - q^24 + q^25 + q^36 + q^49 - q^54 + ...
		

Crossrefs

Programs

  • Magma
    Basis( ModularForms( Gamma1(24), 1/2), 64) [2];
  • Mathematica
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] - EllipticTheta[ 3, 0, q^6]) / 2,  {q, 0, n}];
    a[ n_] := If[ n < 0, 0, Boole[ OddQ [ Length @ Divisors @ n]] - Boole[ OddQ [ Length @ Divisors [6 n]]]];
  • PARI
    {a(n) = issquare(n) - issquare(6*n)};
    

Formula

Expansion of (phi(q) - phi(q^6)) / 2 in powers of q where phi() is a Ramanujan theta function.
G.f.: (theta_3(q) - theta_3(q^6)) / 2 = Sum_{k>0} x^(k^2) - x^(6*k^2).
a(3*n) = A089801(n). a(3*n + 2) = 0.
Sum_{k=1..n} a(k) ~ c*sqrt(n), where c = 1 - 1/sqrt(6) = 0.5917517... . - Amiram Eldar, Oct 24 2023

Extensions

More terms from Antti Karttunen, Dec 15 2017

A245485 a(n) = 1 if n is a square, -1 if n is seven times a square, 0 otherwise.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1
Offset: 1

Views

Author

Michael Somos, Jul 23 2014

Keywords

Examples

			G.f. = q + q^4 - q^7 + q^9 + q^16 + q^25 - q^28 + q^36 + q^49 - q^63 + ...
		

Crossrefs

Programs

  • Magma
    Basis( ModularForms( Gamma1(28), 1/2), 86) [2] ;
  • Mathematica
    a[ n_] := Boole[ IntegerQ[ Sqrt[ n]]] - Boole[ IntegerQ[ Sqrt[ 7 n]]];
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] - EllipticTheta[ 3, 0, q^7]) / 2, {q, 0, n}];
    Table[Which[IntegerQ[Sqrt[n]],1,IntegerQ[Sqrt[n/7]],-1,True,0],{n,120}] (* Harvey P. Dale, May 19 2019 *)
  • PARI
    {a(n) = issquare(n) - issquare(7*n)};
    
  • PARI
    {a(n) = if( n<1, 0, direuler( p=2, n, if( p==7, 1 - X, 1) / (1 - X^2 ))[n])};
    

Formula

a(n) is multiplicative with a(p^e) = (-1)^e if p = 7, a(p^e) = (1 + (-1)^e) / 2 otherwise.
G.f.: (theta_3(q) - theta_3(q^7)) / 2 = Sum_{k>0} x^(k^2) - x^(7*k^2).
Dirichlet g.f.: zeta(2*s) * (1 - 7^(-*s)). [corrected by Amiram Eldar, Oct 24 2023]
Sum_{k=1..n} a(k) ~ c*sqrt(n), where c = 1 - 1/sqrt(7) = 0.6220355... . - Amiram Eldar, Oct 24 2023

Extensions

Data section extended up to a(112) by Antti Karttunen, Jul 02 2024
Showing 1-3 of 3 results.