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

A049240 Smallest nonnegative value taken on by x^2 - n*y^2 for an infinite number of integer pairs (x, y).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Encodes to 1,2,1,4,1,6,1,8,1,10,...: unsigned version of A009531. - Paul Barry, Oct 12 2005
Parity of inverse Moebius transform of Jacobsthal numbers J(k) less J(n). - Paul Barry, Oct 12 2005

Crossrefs

Characteristic function of A000037 (the nonsquares).

Programs

  • Magma
    [Floor((1 + Ceiling(Sqrt(n)) - Floor(Sqrt(n)))/2) : n in [1..100]]; // Wesley Ivan Hurt, Sep 27 2014
    
  • Maple
    A049240:=n->`if`(issqr(n),0,1): seq(A049240(n), n=1..100); # Wesley Ivan Hurt, Sep 27 2014
  • Mathematica
    Differences[Table[n - Ceiling[Sqrt[n]], {n, 105}]] (* Arkadiusz Wesolowski, Oct 30 2012 *)
    Table[Floor[(1 + Ceiling[Sqrt[n]] - Floor[Sqrt[n]])/2], {n, 70}] (* Wesley Ivan Hurt, Sep 27 2014 *)
  • Python
    from math import isqrt
    def A049240(n): return int(isqrt(n)**2!=n) # Chai Wah Wu, Jun 14 2022

Formula

a(n) = 0 if n is square, 1 otherwise.
a(n) = (A001045(n) - Sum_{k|n} A001045(k)) mod 2. - Paul Barry, Oct 12 2005
a(n) = 1 - A010052(n). - R. J. Mathar, Jul 04 2009
a(n) = floor(1+ceiling(sqrt(n))-floor(sqrt((n)))/2). - Wesley Ivan Hurt, Sep 27 2014
G.f.: (1+x)/(2-2*x) - (1/2)*theta_3(0,x) where theta_3 is a Jacobi theta function. - Robert Israel, Oct 02 2014

A003781 Expansion of theta series of {E_7}* lattice in powers of q^(1/2).

Original entry on oeis.org

1, 0, 0, 56, 126, 0, 0, 576, 756, 0, 0, 1512, 2072, 0, 0, 4032, 4158, 0, 0, 5544, 7560, 0, 0, 12096, 11592, 0, 0, 13664, 16704, 0, 0, 24192, 24948, 0, 0, 27216, 31878, 0, 0, 44352, 39816, 0, 0, 41832, 55944, 0, 0, 72576, 66584, 0, 0, 67536, 76104, 0, 0, 100800
Offset: 0

Views

Author

Keywords

Comments

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

Examples

			G.f. = 1 + 56*x^3 + 126*x^4 + 576*x^7 + 756*x^8 + 1512*x^11 + 2072*x^12 + ...
G.f. = 1 + 56*q^(3/2) + 126*q^2 + 576*q^(7/2) + 756*q^4 + 1512*q^(11/2) + ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 125.
  • M. Eichler and D. Zagier, The Theory of Jacobi Forms, Birkhauser, 1985, p. 141.

Crossrefs

Programs

  • Magma
    Basis( ModularForms( Gamma0(4), 7/2), 19) [1] ; /* Michael Somos, Jun 10 2014 */
  • Mathematica
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q]^3 (EllipticTheta[ 3, 0, q]^4 + 7 EllipticTheta[ 4, 0, q]^4) / 8, {q, 0, n}]; (* Michael Somos, Aug 27 2013 *)
  • PARI
    {a(n) = local(A, B, m); n++; m=n%4; n\=4; if( n<0 || m>1, 0, A = sum(k=1, sqrtint(n), 2*x^k^2, 1 + x * O(x^n)); B = subst(A, x, -x); polcoeff( if(m==0, (A^4 - B^4) * (8*A^4 - B^4) / 2 / sum(k=0, sqrtint( 4*n + 1)\2, x^(k^2 + k), x * O(x^n)), 8*A^7 - 7*A^3 * subst(A, x, -x)^4 ), n))}; /* Michael Somos, Jun 11 2007 */
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = sum(k=1, sqrtint(n), 2 * x^k^2, 1 + x * O(x^n)); polcoeff( A^3 * (A^4 + 7 * subst(A, x, -x)^4) / 8, n))}; /* Michael Somos, Aug 27 2013 */
    

Formula

Theta series is given on page 125 of Conway and Sloane.
Can be determined from A023919 (A*_7): [1] A003781(4n)=A023919(16n) [2] A003781(4n+3)=A023919(16n+12). Let A_7+[1] be the generator of A*_7/A_7, then these correspond to [1]A004008=theta(E_7)=theta(A_7)+theta(A_7+[4]), [2]A005931=theta(E_7+[1])=theta(A_7+[2])+theta(A_7+[6]) - Kok Seng Chua (chuaks(AT)ihpc.nus.edu.sg), May 03 2000
Expansion of phi(q)^3 * (phi(q)^4 + 7 * phi(-q)^4) / 8 in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Aug 27 2013
G.f. is a period 1 Fourier series which satisfies f(-1 / (4 t)) = 2^(13/2) (t / i)^(7/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A004008. - Michael Somos, Aug 27 2013
a(4*n + 1) = a(4*n + 2) = 0. - Michael Somos, Jun 11 2007
a(4*n) = A004008(n), a(4*n + 3) = A005931(n). - Michael Somos, Jun 11 2007.
Showing 1-2 of 2 results.