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-10 of 14 results. Next

A000194 n appears 2n times, for n >= 1; also nearest integer to square root of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Define the oblong root obrt(x) to be the (larger) solution of y * (y+1) = x; i.e., obrt(x) = sqrt(x+1/4) - 1/2. So obrt(x) is an integer iff x is an oblong number (A002378). Then a(n) = ceiling(obrt(n)). - Franklin T. Adams-Watters, Jun 24 2015
From Wolfdieter Lang, Mar 12 2019: (Start)
The general Pell equation is related to the non-reduced form F(n) = Xvec^T A(n) Xvec = x^2 - D(n)*y^2 with D(n) = A000037(n) (D not a square), Xvec = (x,y)^T (T for transposed) and A(n) = matrix[[1,0], [0,-D(n)]]. The discriminant of F(n) = [1, 0, -D(n)] is 4*D(n).
The first reduced form appears after two applications of an equivalence transformation A' = R^T A R obtained with R = R(t) = matrix([0, -1], [1, t]), namely first with t = 0, leading to the still not reduced form [-D, 0, 1], and then with t = ceiling(f(4*D(n))/2 - 1), where f(4*D(n)) = ceiling(2*sqrt(D(n))). This can be shown to be a(n), which is also D(n) - n, for n >= 1 (see a formula below).
This leads to the reduced form FR(n) = [1, 2*a(n), -(D(n) - a(n)^2)] = [1, 2*a(n), -(n - a(n)*(a(n) - 1))]. Example: n = 5, a(5) = 2: D(5) = 7 and FR(5) = [1, 4, -3]. (End)

Examples

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

References

  • Titu Andreescu, Dorin Andrica, and Zuming Feng, 104 Number Theory Problems, Birkhäuser, 2006, 59-60.
  • B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 78, Entry 24.

Crossrefs

Partial sums of A005369.
Cf. A000196 (floor(sqrt(n))), A003059 (ceiling(sqrt(n))).

Programs

  • Haskell
    a000194 n = a000194_list !! (n-1)
    a000194_list = concat $ zipWith ($) (map replicate [2,4..]) [1..]
    -- Reinhard Zumkeller, Mar 18 2011
    
  • Maple
    Digits := 100; f := n->round(evalf(sqrt(n))); [ seq(f(n), n=0..100) ];
    # More efficient:
    a := n -> isqrt(n): seq(a(n), n=0..98); # Peter Luschny, Mar 13 2019
  • Mathematica
    A000194[n_] := Floor[(1 + Sqrt[4 n - 3])/2]; (* Enrique Pérez Herrero, Apr 14 2010 *)
    Flatten[Table[PadRight[{}, 2 n, n], {n, 10}]] (* Harvey P. Dale, Nov 16 2011 *)
    CoefficientList[Series[x QPochhammer[-x^2, x^4] QPochhammer[x^8, x^8]/(1 - x), {x, 0, 50}], x] (* Eric W. Weisstein, Jan 10 2024 *)
  • PARI
    {a(n) = ceil( sqrtint(4*n) / 2)}; /* Michael Somos, Feb 11 2004 */
    
  • PARI
    a(n)=(sqrtint(4*n) + 1)\2 \\ Charles R Greathouse IV, Jun 08 2020
    
  • PARI
    apply( {A000194(n)=sqrtint(4*n)\/2}, [0..99]) \\ M. F. Hasler, Jun 22 2024
    
  • Python
    from math import isqrt
    def A000194(n): return (m:=isqrt(n))+int(n-m*(m+1)>=1) # Chai Wah Wu, Jul 30 2022

Formula

a(n) = A000037(n) - n.
G.f.: x * f(x^2, x^6)/(1-x) where f(,) is Ramanujan's two-variable theta function. - Michael Somos, May 31 2000
a(n) = a(n - 2*a(n - a(n-1))) + 1. - Benoit Cloitre, Oct 27 2002
a(n+1) = a(n) + A005369(n).
a(n) = floor((1/2)*(1 + sqrt(4*n - 3))). - Zak Seidov, Jan 18 2006
a(n) = A000037(n) - n. - Jaroslav Krizek, Jun 14 2009
a(n) = floor(A027434(n)/2). - Gregory R. Bryant, Apr 17 2013
From Mikael Aaltonen, Jan 17 2015: (Start)
a(n) = floor(sqrt(n) + 1/2).
a(n) = sqrt(A053187(n)). (End)
a(0) = 0, and a(n) = k for k from the closed interval [k^2 - k + 1, k*(k+1)] = [A002061(k), A002378(k)], for k >= 1. See A053187. - Wolfdieter Lang, Mar 12 2019
a(n) = floor(2*sqrt(n)) - floor(sqrt(n)). - Ridouane Oudra, Jun 08 2020
Sum_{n>=1} 1/a(n)^s = 2*zeta(s-1), for s > 2 (Borwein, 1994). - Amiram Eldar, Oct 31 2020

Extensions

Additional comments from Michael Somos, May 31 2000
Edited by M. F. Hasler, Mar 01 2014
Initial 0 added by N. J. A. Sloane, Nov 13 2017

A053188 Distance from n to nearest square.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 01 2000

Keywords

Examples

			a(7)=2 since 9 is the closest square to 7 and |9-7| = 2.
		

Crossrefs

Programs

  • Haskell
    a053188 0 = 0
    a053188 n = min (n - last xs) (head ys - n) where
       (xs,ys) = span (< n) a000290_list
    -- Reinhard Zumkeller, Nov 28 2011
    
  • Mathematica
    Flatten[Table[Abs[Nearest[Range[0,25]^2,n]-n],{n,0,120}]]  (* Harvey P. Dale, Mar 14 2011 *)
  • PARI
    a(n)=abs(((sqrtint(4*n) + 1)\2)^2 - n) \\ Charles R Greathouse IV, Nov 16 2022
  • Python
    from math import isqrt
    def A053188(n): return abs(((m:=isqrt(n))+int(n-m*(m+1)>=1))**2-n) # Chai Wah Wu, Aug 03 2022
    

Formula

a(n) = |floor(sqrt(n) + 1/2)^2 - n|. - Ridouane Oudra, May 01 2019
a(n) <= sqrt(n). - Charles R Greathouse IV, Nov 16 2022

A007607 Skip 1, take 2, skip 3, etc.

Original entry on oeis.org

2, 3, 7, 8, 9, 10, 16, 17, 18, 19, 20, 21, 29, 30, 31, 32, 33, 34, 35, 36, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130
Offset: 1

Views

Author

Keywords

Comments

Numbers k with the property that the smallest Dyck path of the symmetric representation of sigma(k) has a central peak. (Cf. A237593.) - Omar E. Pol, Aug 28 2018
Union of A317303 and A014105. - Omar E. Pol, Aug 29 2018

Examples

			From _Omar E. Pol_, Aug 29 2018: (Start)
Written as an irregular triangle in which the row lengths are the nonzero even numbers the sequence begins:
    2,   3;
    7,   8,   9,  10;
   16,  17,  18,  19,  20,  21;
   29,  30,  31,  32,  33,  34,  35,  36;
   46,  47,  48,  49,  50,  51,  52,  53,  54,  55;
   67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  78;
   92,  93,  94,  95,  96,  97,  98,  99, 100, 101, 102, 103, 104, 105;
  121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136;
...
Row sums give the nonzero terms of A317297.
Column 1 gives A130883, n >= 1.
Right border gives A014105, n >= 1.
(End)
		

References

  • R. Honsberger, Mathematical Gems III, M.A.A., 1985, p. 177.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Complement of A007606.
Similar to A360418.

Programs

  • Haskell
    a007607 n = a007607_list !! (n-1)
    a007607_list = skipTake 1 [1..] where
       skipTake k xs = take (k + 1) (drop k xs)
                       ++ skipTake (k + 2) (drop (2*k + 1) xs)
    -- Reinhard Zumkeller, Feb 12 2011
    
  • Haskell
    a007607_list' = f $ tail $ scanl (+) 0 [1..] where
       f (t:t':t'':ts) = [t+1..t'] ++ f (t'':ts)
    -- Reinhard Zumkeller, Feb 12 2011
  • Mathematica
    Flatten[ Table[i, {j, 2, 16, 2}, {i, j(j - 1)/2 + 1, j(j + 1)/2}]] (* Robert G. Wilson v, Mar 11 2004 *)
    With[{t=20},Flatten[Take[TakeList[Range[(t(t+1))/2],Range[t]],{2,-1,2}]]] (* Harvey P. Dale, Sep 26 2021 *)
  • PARI
    for(m=0,10,for(n=2*m^2+3*m+2,2*m^2+5*m+3,print1(n", "))) \\ Charles R Greathouse IV, Feb 12 2011
    

Formula

G.f.: 1/(1-x) * (1/(1-x) + x*Sum_{k>=1} (2k+1)*x^(k*(k+1))). - Ralf Stephan, Mar 03 2004
a(A000290(n)) = A001105(n). - Reinhard Zumkeller, Feb 12 2011
A057211(a(n)) = 0. - Reinhard Zumkeller, Dec 30 2011
a(n) = floor(sqrt(n) + 1/2)^2 + n = A053187(n) + n. - Ridouane Oudra, May 04 2019

A201053 Nearest cube.

Original entry on oeis.org

0, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 28 2011

Keywords

Comments

a(n) = if n-A048763(n) < A048762(n)-n then A048762(n) else A048763(n);
apart from 0, k^3 occurs 3*n^2+1 times, cf. A056107.

Crossrefs

Cf. A061023, A074989, A053187 (nearest square), A000578.

Programs

  • Haskell
    a201053 n = a201053_list !! n
    a201053_list = 0 : concatMap (\x -> replicate (a056107 x) (x ^ 3)) [1..]
    
  • Maple
    seq(k^3 $ (3*k^2+1), k=0..10); # Robert Israel, Jan 03 2017
  • Mathematica
    Module[{nn=70,c},c=Range[0,Ceiling[Surd[nn,3]]]^3;Flatten[Array[ Nearest[ c,#]&,nn,0]]] (* Harvey P. Dale, May 27 2014 *)
  • Python
    from sympy import integer_nthroot
    def A201053(n):
        a = integer_nthroot(n,3)[0]
        return a**3 if 2*n < a**3+(a+1)**3 else (a+1)**3 # Chai Wah Wu, Mar 31 2021

Formula

G.f.: (1-x)^(-1)*Sum_{k>=0} (3*k^2+3*k+1)*x^((k+1)*(k^2+k/2+1)). - Robert Israel, Jan 03 2017
Sum_{n>=1} 1/a(n)^2 = Pi^4/30 + Pi^6/945. - Amiram Eldar, Aug 15 2022

A074294 Integers 1 to 2*k followed by integers 1 to 2*k + 2 and so on.

Original entry on oeis.org

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

Views

Author

Michael Somos, Aug 20 2002

Keywords

Comments

From Cino Hilliard, Sep 13 2004: (Start)
Also the numerator of the fraction in the continued fraction expansion of sqrt(n) for nonsquare n = 2,3,5,6,7... . E.g., for n = 7,
sqrt(7).=.2.+.3................
...............4..+.3..........
.....................4..+.3....
...........................4.....
3 is the 5th entry in the table. sqrt(1) and sqrt(4) are not included because 1 and 4 are squares." (End)
A074294 is the natural fractal sequence of A002061; the corresponding natural interspersion is A194011; see A194029 for definitions. - Clark Kimberling, Aug 17 2011
It appears that this is also a triangle read by rows in which row n lists the first 2*n positive integers, n >= 1 (see example). - Omar E. Pol, May 29 2012

Examples

			From _Omar E. Pol_, May 29 2012: (Start)
Written as a triangle the sequence begins:
1, 2;
1, 2, 3, 4;
1, 2, 3, 4, 5, 6;
1, 2, 3, 4, 5, 6, 7, 8;
1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14;
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16;
Row n has length 2*n = A005843(n). (End)
		

Crossrefs

Programs

  • Haskell
    import Data.List (inits)
    a074294 n = a074294_list !! (n-1)
    a074294_list = f $ inits [1..] where
       f (xs:_:xss) = xs ++ f xss
    -- Reinhard Zumkeller, Apr 14 2014
    
  • Maple
    seq(seq((j-n^2-n),j=n^2+n+1..(n+1)^2+n+1),n=0..20); # Robert Israel, Jan 05 2015
  • Mathematica
    A074294[n_] := n - 2*Binomial[Floor[1/2 + Sqrt[n]], 2] (* Enrique Pérez Herrero, Apr 14 2010 *)
    Table[Range[2n],{n,10}]//Flatten (* Harvey P. Dale, Oct 20 2018 *)
  • PARI
    {a(n) = n - 2 * binomial( floor( 1/2 + sqrt(n)), 2)}
    
  • PARI
    c(n) = for(x=2,n,if(issquare(x)==0,a=floor(sqrt(x));print1(x-a^2", "))) /* Cino Hilliard, Sep 13 2004 */
    
  • Python
    from math import isqrt
    def A074294(n): return n+(k:=(m:=isqrt(n))+(n>m*(m+1)))*(1-k) # Chai Wah Wu, Jun 06 2025

Formula

a(n) = n - 2*binomial(floor(1/2 + sqrt(n)), 2).
a(n^2 + n) = 2*n.
a(n) = n - 2 - floor(sqrt(n)+3/2)*floor(sqrt(n)-3/2). - Mikael Aaltonen, Jan 02 2015
G.f.: x/(1-x)^2 - (2*x/(1-x))*Sum_{k>=1} k*x^(k^2+k). That sum is related to Jacobi theta functions. - Robert Israel, Jan 05 2015
a(n) = n + A000194(n) - A053187(n). - Robert Israel, Jan 05 2015

A061023 Difference between the closest square and the closest cube to n.

Original entry on oeis.org

0, 0, 0, 3, 3, 4, 4, 1, 1, 1, 1, 1, 1, 8, 8, 8, 8, 8, 11, 11, 11, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 22, 22, 22, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 17
Offset: 0

Views

Author

Hareendra Yalamanchili (hyalaman(AT)mit.edu), May 24 2001

Keywords

Comments

a(A201217(n)) = 0.

Examples

			a(46)=15 because the nearest square is 49 and the nearest cube is 64 and 64 - 49 = 15.
		

Crossrefs

Programs

  • Haskell
    a061023 n = abs (a053187 n - a201053 n)
    a061023_list = map a061023 [0..]
    -- Reinhard Zumkeller, Nov 28 2011
  • Mathematica
    dsc[n_]:=Module[{s=Floor[Sqrt[n]],c=Floor[Power[n, (3)^-1]],ns,nc}, ns= Nearest[{s^2,(s+1)^2},n]; nc=Nearest[{c^3,(c+1)^3},n];Abs[nc-ns]]; Flatten[ Array[dsc,100,0]] (* Harvey P. Dale, Aug 19 2011 *)
  • PARI
    { for (n=0, 10000, x=n^(1/2); s=floor(x)^2; t=ceil(x)^2; if (n-s > t-n, s=t); x=n^(1/3); c=floor(x)^3; d=ceil(x)^3; if (n-c > d-n, c=d); write("b061023.txt", n, " ", abs(c-s)) ) } \\ Harry J. Smith, Jul 16 2009
    

Formula

a(n) = abs(A053187(n) - A201053(n)). [Reinhard Zumkeller, Nov 28 2011]

Extensions

More terms from Harvey P. Dale, Aug 19 2011

A038759 a(n) = ceiling(sqrt(n))*floor(sqrt(n)).

Original entry on oeis.org

0, 1, 2, 2, 4, 6, 6, 6, 6, 9, 12, 12, 12, 12, 12, 12, 16, 20, 20, 20, 20, 20, 20, 20, 20, 25, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 36, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 49, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 64, 72, 72, 72, 72, 72, 72, 72
Offset: 0

Views

Author

Henry Bottomley, May 03 2000

Keywords

Comments

a(n) = n iff n is a square or a pronic (or heteromecic) number of form k(k+1). The sequence interleaves individual squares with 2k copies of each pronic.

Examples

			a(31) = 30 since 6 and 5 are on either side of the square root of 31 and 6*5 = 30.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Ceiling[Sqrt[n]]*Floor[Sqrt[n]]; Array[a, 70, 0] (* Amiram Eldar, Dec 04 2022 *)
  • PARI
    a(n) = my(r,s=sqrtint(n,&r)); if(r, n-r+s, n); \\ Kevin Ryde, Jul 30 2022
  • Python
    from math import isqrt
    def A038759(n): return m+n+k if (m:=(k:=isqrt(n))**2-n) else n # Chai Wah Wu, Jul 28 2022
    

Formula

a(n) = A003059(n)*A000196(n) = n - A038760(n).
a(A002620(n)) = A002620(n). - Bernard Schott, Nov 06 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/12 (A072691). - Amiram Eldar, Dec 04 2022

A198954 Expansion of the rotational partition function for a heteronuclear diatomic molecule.

Original entry on oeis.org

1, 3, 0, 5, 0, 0, 7, 0, 0, 0, 9, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Michael Somos, Oct 31 2011

Keywords

Comments

The partition function of a heteronuclear diatomic molecule is Sum_{J>=0} (2*J + 1) * exp( - J * (J + 1) * hbar^2 / (2 * I * k * T)) where I is the moment of inertia, hbar is reduced Planck's constant, k is Boltzmann's constant, and T is temperature. The degeneracy for the J-th energy level is 2*J + 1.
As triangle: triangle T(n,k), read by rows, given by (3,-4/3,1/3,0,0,0,0,0,0,0,...) DELTA (0,0,0,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 01 2011
Note that the g.f. theta_1'(0, q^(1/2)) / (2 * q^(1/8)) = 1 - 3*q + 5*q^3 - 7*q^6 + 9*q^10 + ... which is the same as this sequence except the signs alternate. - Michael Somos, Aug 26 2015

Examples

			G.f. = 1 + 3*x + 5*x^3 + 7*x^6 + 9*x^10 + 11*x^15 + 13*x^21 + 15*x^28 + ...
G.f. = 1 + 3*q^2 + 5*q^6 + 7*q^12 + 9*q^20 + 11*q^30 + 13*q^42 + 15*q^56 + ...
Triangle begins:
   1;
   3, 0;
   5, 0, 0;
   7, 0, 0, 0;
   9, 0, 0, 0, 0;
  11, 0, 0, 0, 0, 0;
  13, 0, 0, 0, 0, 0, 0;
  15, 0, 0, 0, 0, 0, 0, 0;
  17, 0, 0, 0, 0, 0, 0, 0, 0;
		

References

  • G. H. Wannier, Statistical Physics, Dover Publications, 1987, see p. 215 equ. (11.13).

Crossrefs

Programs

  • Maple
    seq(op([2*i+1,0$i]), i=0..10); # Robert Israel, Jan 15 2015
  • Mathematica
    a[ n_] := If[ n < 0, 0, With[ {m = Sqrt[8 n + 1]}, If[ IntegerQ[m], m KroneckerSymbol[ 4, m], 0]]]; (* Michael Somos, Aug 26 2015 *)
  • PARI
    {a(n) = my(m); if( issquare( 8*n + 1, &m), m, 0)};

Formula

G.f.: Sum_{k>=0} (2*k + 1) * x^( (k^2 + k) / 2). This is related to Jacobi theta functions.
a(n) = (t*(t+1)-2*n-1)*(t-r), where t = floor(sqrt(2*(n+1))+1/2) and r = floor(sqrt(2*n)+1/2). - Mikael Aaltonen, Jan 15 2015
a(n) = A053187(2n+1) - A053187(2n). - Robert Israel, Jan 15 2015
a(n) = abs(A010816(n)). - Joerg Arndt, Jan 16 2015

A002483 Expansion of Jacobi theta function {theta_1}'(q) in powers of q^(1/4).

Original entry on oeis.org

0, 2, 0, 0, 0, 0, 0, 0, 0, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -14, 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, 18, 0, 0, 0
Offset: 0

Views

Author

Keywords

Examples

			2*x - 6*x^9 + 10*x^25 - 14*x^49 + 18*x^81 - 22*x^121 + 26*x^169 - 30*x^225 + ...
		

References

  • J. Tannery and J. Molk, Eléments de la Théorie des Fonctions Elliptiques, Vol. 2, Gauthier-Villars, Paris, 1902; Chelsea, NY, 1972, see p. 27.
  • E. T. Whittaker and G. N. Watson, A Course of Modern Analysis, Cambridge Univ. Press, 4th ed., 1963, p. 464.

Crossrefs

Dividing by 2 gives (essentially) A245552.
See also the g.f. for A053187.

Programs

  • Maple
    Sum( (-1)^m*(2*m+1)*q^ ( ((2*m+1)/2)^2 ), m=-10,10);
  • Mathematica
    a[ n_] := SeriesCoefficient[ EllipticThetaPrime[ 1, 0, q], {q, 0, n/4}] (* Michael Somos, May 31 2012 *)
    s = 2q*QPochhammer[q^8]^3+O[q]^90; CoefficientList[s, q] (* Jean-François Alcover, Nov 30 2015, adapted from PARI *)
  • PARI
    {a(n) = local(m); if( issquare( n, &m) && m%2, 2 * (-1)^(m \ 2) * m, 0)} /* Michael Somos, May 31 2012 */
    
  • PARI
    {a(n) = if( n<1, 0, n--; polcoeff( 2 * eta(x^8 + x * O(x^n))^3, n))} /* Michael Somos, May 31 2012 */

Formula

Expansion of 2 * q^(-1/8) * eta(q)^3 in powers of q. - Michael Somos, May 31 2012
G.f.: 2 * x * Product_{k>0} (1 - x^(8*k))^3. - Michael Somos, May 31 2012
For n > 0, a(n) = (((1/8)*(4*t^2 + 4*t + 1 - n) - 1)*4 + 2)*(t-r)*(-1)^(t+1), where t = floor((sqrt(n)+1)/2) and r = floor((sqrt(n-1)+1)/2). - Mikael Aaltonen, Jan 16 2015

A201217 Numbers such that (closest square) = (closest cube).

Original entry on oeis.org

0, 1, 2, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 28 2011

Keywords

Comments

A061023(a(n)) = 0; A053187(a(n)) = A201053(a(n));
A001014 is a subsequence (6th powers).

Programs

  • Haskell
    import Data.List (elemIndices)
    a201217 n = a201217_list !! (n-1)
    a201217_list = elemIndices 0 a061023_list
    -- Reinhard Zumkeller, Nov 28 2011
Showing 1-10 of 14 results. Next