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.

A089801 a(n) = 0 unless n = 3j^2 + 2j or 3j^2 + 4j + 1 for some j >= 0, in which case a(n) = 1.

Original entry on oeis.org

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

Views

Author

Eric W. Weisstein, Nov 12 2003

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Also characteristic function of generalized octagonal numbers A001082. - Omar E. Pol, Jul 13 2012
Number 12 of the 14 primitive eta-products which are holomorphic modular forms of weight 1/2 listed by D. Zagier on page 30 of "The 1-2-3 of Modular Forms". - Michael Somos, May 04 2016

Examples

			G.f. = 1 + x + x^5 + x^8 + x^16 + x^21 + x^33 + x^40 + x^56 + x^65 + x^85 + ...
G.f. = q + q^4 + q^16 + q^25 + q^49 + q^64 + q^100 + q^121 + q^169 + q^196 + ...
		

Crossrefs

Programs

  • Magma
    Basis( ModularForms( Gamma0(36), 1/2), 87) [2]; /* Michael Somos, Jul 02 2014 */
    
  • Maple
    A089801 := proc(n)
            A033684(3*n+1) ;
    end proc: # R. J. Mathar, Oct 07 2011
    M:=33;
    S:=f->series(f,q,500);
    L:=f->seriestolist(f);
    X:=add(q^(3*n^2+2*n),n=-M..M);
    S(%);
    L(%); # N. J. A. Sloane, Jan 31 2012
    eps:=Array(0..120,0);
    for j from 0 to 120 do
    if 3*j^2+2*j <= 120 then eps[3*j^2+2*j] := 1; fi;
    if 3*j^2+4*j+1 <= 120 then eps[3*j^2+4*j+1] := 1; fi;
    end do;  # N. J. A. Sloane, Aug 12 2017
  • Mathematica
    a[ n_] := SeriesCoefficient[ (1/2) x^(-1/3) (EllipticTheta[ 3, 0, x^(1/3)] - EllipticTheta[ 3, 0, x^3]), {x, 0, n}]; (* Michael Somos, Jun 29 2012 *)
    a[ n_] := SeriesCoefficient[ 2^(-1/2) x^(-3/8) QPochhammer[ -x, x^2] EllipticTheta[ 2, Pi/4, x^(3/2)], {x, 0, n}]; (* Michael Somos, Jun 29 2012 *)
  • PARI
    {a(n) = issquare(3*n + 1)}; /* Michael Somos, Apr 12 2005 */
    
  • Python
    from sympy.ntheory.primetest import is_square
    def A089801(n): return int(is_square(3*n+1)) # Chai Wah Wu, May 17 2023

Formula

G.f.: Sum_{n=-oo..oo} q^(3n^2+2n).
Expansion of Jacobi theta function (theta_3(q^(1/3)) - theta_3(q^3))/(2 q^(1/3)) in powers of q.
Euler transform of period 12 sequence [1, -1, 0, 0, 1, -1, 1, 0, 0, -1, 1, -1, ...]. - Michael Somos, Apr 12 2005
a(n) = b(3*n + 1) where b() is multiplicative with b(3^e) = 0^e, b(p^e) = (1 + (-1)^e) / 2 if p != 3. - Michael Somos, Jun 06 2005; b=A033684. - R. J. Mathar, Oct 07 2011
Expansion of q^(-1/3) * eta(q^2)^2 * eta(q^3) * eta(q^12) / (eta(q) * eta(q^4) * eta(q^6)) in powers of q. - Michael Somos, Apr 12 2005
Expansion of chi(x) * psi(-x^3) in powers of x where chi(), psi() are Ramanujan theta functions. - Michael Somos, Apr 19 2007
Expansion of f(x, x^5) in powers of x where f(, ) is Ramanujan's general theta function. - Michael Somos, Jun 29 2012
G.f. is a period 1 Fourier series which satisfies f(-1 / (36 t)) = 2^(1/2) (t/i)^(1/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A089807.
a(8*n + 4) = a(4*n + 2) = a(4*n + 3) = 0, a(4*n + 1) = a(n), a(8*n) = A080995(n). - Michael Somos, Jan 28 2011
a(n) = (-1)^n * A089802(n).
For n > 0, a(n) = b(n)-b(n-1) + c(n)-c(n-1), where b(n) = floor(sqrt(n/3+1/9)+2/3) and c(n) = floor(sqrt(n/3+1/9)+4/3). - Mikael Aaltonen, Jan 22 2015
a(n) = A033684(3*n + 1). - Michael Somos, Jan 10 2017

Extensions

Edited with simpler definition by N. J. A. Sloane, Jan 31 2012
Further edited by N. J. A. Sloane, Aug 12 2017

A033683 a(n) = 1 if n is an odd square not divisible by 3, otherwise 0.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			G.f. = x + x^25 + x^49 + x^121 + x^169 + x^289 + x^361 + x^529 + x^625 + ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 105, Eq. (41).

Crossrefs

Programs

  • Haskell
    a033683 n = fromEnum $ odd n && mod n 3 > 0 && a010052 n == 1
    -- Reinhard Zumkeller, Nov 14 2015
    
  • Magma
    Basis( ModularForms( Gamma0(144), 1/2), 106)[2]; /* Michael Somos, Dec 07 2019 */
  • Mathematica
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 2, 0, x^4] - EllipticTheta[ 2, 0, x^36])/2, {x, 0, n}] // PowerExpand; (* Michael Somos, Dec 07 2019 *)
    Table[If[OddQ[n]&&IntegerQ[Sqrt[n]]&&Mod[n,3]!=0,1,0],{n,0,120}] (* Harvey P. Dale, Sep 06 2020 *)
  • PARI
    {a(n) = if( n%24 == 1, issquare(n), 0)}; /* Michael Somos, Jan 26 2008 */
    

Formula

Essentially the series psi_6(z)=(1/2)(theta_2(z/9)-theta_2(z)).
a(A104777(n)) = 1.
A080995(n) = a(24n+1).
Multiplicative with a(p^e) = 1 if 2 divides e and p > 3, 0 otherwise. - Mitch Harris, Jun 09 2005
Euler transform of a period 144 sequence. - Michael Somos, Jan 26 2008
a(n) = A033684(n) * A000035(n).
Dirichlet g.f.: zeta(2*s) *(1-2^(-2s)) *(1-3^(-2s)). - R. J. Mathar, Mar 10 2011
G.f.: Sum_{k in Z} x^(6*k+1)^2. - Michael Somos, Dec 07 2019
Sum_{k=1..n} a(k) ~ sqrt(n)/3. - Amiram Eldar, Jan 14 2024

A057780 Multiples of 3 that are one less than a perfect square.

Original entry on oeis.org

0, 3, 15, 24, 48, 63, 99, 120, 168, 195, 255, 288, 360, 399, 483, 528, 624, 675, 783, 840, 960, 1023, 1155, 1224, 1368, 1443, 1599, 1680, 1848, 1935, 2115, 2208, 2400, 2499, 2703, 2808, 3024, 3135, 3363, 3480, 3720, 3843, 4095, 4224, 4488, 4623, 4899, 5040
Offset: 1

Views

Author

Benjamin Geiger (benjamin_geiger(AT)yahoo.com), Nov 02 2000

Keywords

Comments

Also, numbers of the form 9*m^2+6*m, m an integer. - Jason Kimberley, Nov 08 2012
k is in this list iff k+1 is in the support of A033684. - Jason Kimberley, Nov 13 2012
Exponents in the expansion of Product_{n >= 1} (1 - q^(6*n))^2 * (1 - q ^(9*n)) * (1 - q^(36*n))/((1 - q^(3*n))*(1 - q^(12*n))*(1 - q^(18*n))) = 1 + q^3 + q^15 + q^24 + q^48 + q^63 + q^99 + ... (see Oliver, Theorem 1.1). - Peter Bala, Jan 06 2025

Crossrefs

Numbers of the form 9n^2+kn, for integer n: A016766 (k=0), A132355 (k=2), A185039 (k=4), this sequence (k=6), A218864 (k=8). - Jason Kimberley, Nov 08 2012

Programs

  • Magma
    a:=func;[0]cat[a(n*m):m in[-1, 1],n in[1..24]]; // Jason Kimberley, Nov 09 2012
    
  • Mathematica
    Select[3*Range[0,2000],IntegerQ[Sqrt[#+1]]&] (* or *) LinearRecurrence[ {1,2,-2,-1,1},{0,3,15,24,48},50] (* Harvey P. Dale, Sep 10 2019 *)
  • PARI
    concat(0, Vec(3*x^2*(1+4*x+x^2)/((1-x)^3*(1+x)^2) + O(x^100))) \\ Colin Barker, Dec 26 2015

Formula

a(n) = A001651(n)^2 - 1 = 3 * A001082(n).
G.f.: 3*x^2*(1+4*x+x^2) / ((1-x)^3*(1+x)^2). - Colin Barker, Nov 24 2012
From Colin Barker, Dec 26 2015: (Start)
a(n) = 3/8*(6*n^2-2*((-1)^n+3)*n+(-1)^n-1).
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5) for n>5. (End)

Extensions

Since this is a list, offset corrected to 1 by Jason Kimberley, Nov 09 2012
Showing 1-3 of 3 results.