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

A080995 Characteristic function of generalized pentagonal numbers A001318.

Original entry on oeis.org

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

Views

Author

Michael Somos, Feb 27 2003

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Repeatedly [1,[0,]^2k,1,[0,]^k], k>=0; characteristic function of generalized pentagonal numbers: a(A001318(n))=1, a(A090864(n))=0. - Reinhard Zumkeller, Apr 22 2006
Starting with offset 1 with 1's signed (++--++,...), i.e., (1, 1, 0, 0, -1, 0, -1, 0, ...); is the INVERTi transform of A000041 starting (1, 2, 3, 5, 7, 11, ...). - Gary W. Adamson, May 17 2013
Number 9 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^2 + x^5 + x^7 + x^12 + x^15 + x^22 + x^26 + x^35 + x^40 + x^51 + ...
G.f. = q + q^25 + q^49 + q^121 + q^169 + q^289 + q^361 + q^529 + q^625 + ...
		

References

  • Percy A. MacMahon, Combinatory Analysis, Cambridge Univ. Press, London and New York, Vol. 1, 1915 and Vol. 2, 1916; see vol. 2, p. 81, Article 331.

Crossrefs

Programs

  • Haskell
    a080995 = a033683 . (+ 1) . (* 24)  -- Reinhard Zumkeller, Nov 14 2015
  • Mathematica
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ (Series[ EllipticTheta[ 3, Log[y] / (2 I), x^(3/2)], {x, 0, n + Floor@Sqrt[n]}] // Normal // TrigToExp) /. {y -> x^(1/2)}, {x, 0, n}]]; (* Michael Somos, Nov 18 2011 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 4, 0, x^3] / QPochhammer[ x, x^2], {x, 0, n}]; (* Michael Somos, Jun 08 2013 *)
    a[ n_] := If[ n < 0, 0, Boole[ IntegerQ[ Sqrt[ 24 n + 1]]]]; (* Michael Somos, Jun 08 2013 *)
  • PARI
    {a(n) = if( n<0, 0, abs( polcoeff( eta(x + x * O(x^n)), n)))};
    
  • PARI
    {a(n) = issquare( 24*n + 1)}; /* Michael Somos, Apr 13 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)), n))};
    

Formula

Expansion of phi(-x^3) / chi(-x) in powers of x where phi(), chi() are Ramanujan theta functions. - Michael Somos, Sep 14 2007
Expansion of psi(x) - x * psi(x^9) in powers of x^3 where psi() is a Ramanujan theta function. - Michael Somos, Sep 14 2007
Expansion of f(x, x^2) in powers of x where f() is Ramanujan's two-variable theta function.
Expansion of q^(-1/24) * eta(q^2) * eta(q^3)^2 / (eta(q) * eta(q^6)) in powers of q.
a(n) = b(24*n + 1) where b() is multiplicative with b(2^e) = b(3^e) = 0^e, b(p^e) = (1 + (-1)^e) / 2 if p>3. - Michael Somos, Jun 06 2005
Euler transform of period 6 sequence [ 1, 0, -1, 0, 1, -1, ...].
G.f. is a period 1 Fourier series which satisfies f(-1 / (144 t)) = 2^(1/2) (t/i)^(1/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A089810.
G.f.: Product_{k>0} (1 - x^(3*k)) / (1 - x^k + x^(2*k)). - Michael Somos, Jan 26 2008
G.f.: Sum x^(n*(3n+1)/2), n=-inf..inf [the exponents are the pentagonal numbers, A000326].
a(n) = |A010815(n)| = A089806(2*n) = A033683(24*n + 1).
For n > 0, a(n) = b(n) - b(n-1) + c(n) - c(n-1), where b(n) = floor(sqrt(2n/3+1/36)+1/6) (= A180447(n)) and c(n) = floor(sqrt(2n/3+1/36)-1/6) (= A085141(n)). - Mikael Aaltonen, Mar 08 2015
a(n) = (-1)^n * A133985(n). - Michael Somos, Jul 12 2015
a(n) = A000009(n) (mod 2). - John M. Campbell, Jun 29 2016
Sum_{k=1..n} a(k) ~ c * sqrt(n), where c = 2*sqrt(2/3) = 1.632993... . - Amiram Eldar, Jan 13 2024

Extensions

Minor edits by N. J. A. Sloane, Feb 03 2012

A047838 a(n) = floor(n^2/2) - 1.

Original entry on oeis.org

1, 3, 7, 11, 17, 23, 31, 39, 49, 59, 71, 83, 97, 111, 127, 143, 161, 179, 199, 219, 241, 263, 287, 311, 337, 363, 391, 419, 449, 479, 511, 543, 577, 611, 647, 683, 721, 759, 799, 839, 881, 923, 967, 1011, 1057, 1103, 1151, 1199, 1249, 1299, 1351, 1403
Offset: 2

Views

Author

Michael Somos, May 07 1999

Keywords

Comments

Define the organization number of a permutation pi_1, pi_2, ..., pi_n to be the following. Start at 1, count the steps to reach 2, then the steps to reach 3, etc. Add them up. Then the maximal value of the organization number of any permutation of [1..n] for n = 0, 1, 2, 3, ... is given by 0, 1, 3, 7, 11, 17, 23, ... (this sequence). This was established by Graham Cormode (graham(AT)research.att.com), Aug 17 2006, see link below, answering a question raised by Tom Young (mcgreg265(AT)msn.com) and Barry Cipra, Aug 15 2006
From Dmitry Kamenetsky, Nov 29 2006: (Start)
This is the length of the longest non-self-intersecting spiral drawn on an n X n grid. E.g., for n=5 the spiral has length 17:
1 0 1 1 1
1 0 1 0 1
1 0 1 0 1
1 0 0 0 1
1 1 1 1 1 (End)
It appears that a(n+1) is the maximum number of consecutive integers (beginning with 1) that can be placed, one after another, on an n-peg Towers of Hanoi, such that the sum of any two consecutive integers on any peg is a square. See the problem: http://online-judge.uva.es/p/v102/10276.html. - Ashutosh Mehra, Dec 06 2008
a(n) = number of (w,x,y) with all terms in {0,...,n} and w = |x+y-w|. - Clark Kimberling, Jun 11 2012
The same sequence also represents the solution to the "pigeons problem": maximal value of the sum of the lengths of n-1 line segments (connected at their end-points) required to pass through n trail dots, with unit distance between adjacent points, visiting all of them without overlaping two or more segments. In this case, a(0)=0, a(1)=1, a(2)=3, and so on. - Marco Ripà, Jan 28 2014
Also the longest path length in the n X n white bishop graph. - Eric W. Weisstein, Mar 27 2018
a(n) is the number of right triangles with sides n*(h-floor(h)), floor(h) and h, where h is the hypotenuse. - Andrzej Kukla, Apr 14 2021

Examples

			x^2 + 3*x^3 + 7*x^4 + 11*x^5 + 17*x^6 + 23*x^7 + 31*x^8 + 39*x^9 + 49*x^10 + ...
		

Crossrefs

Complement of A047839. First difference is A052928.
Partial sums: A213759(n-1) for n > 1. - Guenther Schrack, May 12 2018

Programs

  • Magma
    [Floor(n^2/2)-1 : n in [2..100]]; // Wesley Ivan Hurt, Aug 06 2015
  • Maple
    seq(floor((n^2+4*n+2)/2), n=0..20) # Gary Detlefs, Feb 10 2010
  • Mathematica
    Table[Floor[n^2/2] - 1, {n, 2, 60}] (* Robert G. Wilson v, Aug 31 2006 *)
    LinearRecurrence[{2, 0, -2, 1}, {1, 3, 7, 11}, 60] (* Harvey P. Dale, Jan 16 2015 *)
    Floor[Range[2, 20]^2/2] - 1 (* Eric W. Weisstein, Mar 27 2018 *)
    Table[((-1)^n + 2 n^2 - 5)/4, {n, 2, 20}] (* Eric W. Weisstein, Mar 27 2018 *)
    CoefficientList[Series[(-1 - x - x^2 + x^3)/((-1 + x)^3 (1 + x)), {x, 0, 20}], x] (* Eric W. Weisstein, Mar 27 2018 *)
  • PARI
    a(n) = n^2\2 - 1
    

Formula

a(2)=1; for n > 2, a(n) = a(n-1) + n - 1 + (n-1 mod 2). - Benoit Cloitre, Jan 12 2003
a(n) = T(n-1) + floor(n/2) - 1 = T(n) - floor((n+3)/2), where T(n) is the n-th triangular number (A000217). - Robert G. Wilson v, Aug 31 2006
Equals (n-1)-th row sums of triangles A134151 and A135152. Also, = binomial transform of [1, 2, 2, -2, 4, -8, 16, -32, ...]. - Gary W. Adamson, Nov 21 2007
G.f.: x^2*(1+x+x^2-x^3)/((1-x)^3*(1+x)). - R. J. Mathar, Sep 09 2008
a(n) = floor((n^2 + 4*n + 2)/2). - Gary Detlefs, Feb 10 2010
a(n) = abs(A188653(n)). - Reinhard Zumkeller, Apr 13 2011
a(n) = (2*n^2 + (-1)^n - 5)/4. - Bruno Berselli, Sep 14 2011
a(n) = a(-n) = A007590(n) - 1.
a(n) = A080827(n) - 2. - Kevin Ryde, Aug 24 2013
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4), n > 4. - Wesley Ivan Hurt, Aug 06 2015
a(n) = A000217(n-1) + A004526(n-2), for n > 1. - J. Stauduhar, Oct 20 2017
From Guenther Schrack, May 12 2018: (Start)
Set a(0) = a(1) = -1, a(n) = a(n-2) + 2*n - 2 for n > 1.
a(n) = A000982(n-1) + n - 2 for n > 1.
a(n) = 2*A033683(n) - 3 for n > 1.
a(n) = A061925(n-1) + n - 3 for n > 1.
a(n) = A074148(n) - n - 1 for n > 1.
a(n) = A105343(n-1) + n - 4 for n > 1.
a(n) = A116940(n-1) - n for n > 1.
a(n) = A179207(n) - n + 1 for n > 1.
a(n) = A183575(n-2) + 1 for n > 2.
a(n) = A265284(n-1) - 2*n + 1 for n > 1.
a(n) = 2*A290743(n) - 5 for n > 1. (End)
E.g.f.: 1 + x + ((x^2 + x - 2)*cosh(x) + (x^2 + x - 3)*sinh(x))/2. - Stefano Spezia, May 06 2021
Sum_{n>=2} 1/a(n) = 3/2 + tan(sqrt(3)*Pi/2)*Pi/(2*sqrt(3)) - cot(Pi/sqrt(2))*Pi/(2*sqrt(2)). - Amiram Eldar, Sep 15 2022

Extensions

Edited by Charles R Greathouse IV, Apr 23 2010

A099392 a(n) = floor((n^2 - 2*n + 3)/2).

Original entry on oeis.org

1, 1, 3, 5, 9, 13, 19, 25, 33, 41, 51, 61, 73, 85, 99, 113, 129, 145, 163, 181, 201, 221, 243, 265, 289, 313, 339, 365, 393, 421, 451, 481, 513, 545, 579, 613, 649, 685, 723, 761, 801, 841, 883, 925, 969, 1013, 1059, 1105, 1153, 1201, 1251, 1301, 1353, 1405
Offset: 1

Views

Author

Ralf Stephan following a suggestion from Luke Pebody, Oct 20 2004

Keywords

Crossrefs

Differs from A085913 at n = 61. Apart from leading term, identical to A080827.
Cf. A000217, A001844, A002522, A007494, A007590, A058331 (bisections).
From Guenther Schrack, Apr 17 2018: (Start)
First differences: A052928.
Partial sums: A212964(n) + n for n > 0.
Also A058331 and A001844 interleaved. (End)

Programs

  • Mathematica
    Array[Floor[(#^2 - 2 # + 3)/2] &, 54] (* or *)
    Rest@ CoefficientList[Series[x (-1 + x - x^2 - x^3)/((1 + x) (x - 1)^3), {x, 0, 54}], x] (* Michael De Vlieger, Apr 21 2018 *)
  • PARI
    a(n)=(n^2+3)\2-n \\ Charles R Greathouse IV, Aug 01 2013

Formula

a(n) = ceiling(n^2/2)-n+1. - Paul Barry, Jul 16 2006; index shifted by R. J. Mathar, Jul 29 2007
a(n) = ceiling(A002522(n-1)/2). - Branko Curgus, Sep 02 2007
From R. J. Mathar, Feb 20 2011: (Start)
G.f.: x *( -1+x-x^2-x^3 ) / ( (1+x)*(x-1)^3 ).
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
a(n+1) = (3 + 2*n^2 + (-1)^n)/4. (End)
a(n) = A007590(n-1) + 1 for n >= 2. - Richard R. Forberg, Aug 01 2013
a(n) = A000217(n) - A007494(n-1). - Bui Quang Tuan, Mar 27 2015
From Guenther Schrack, Apr 17 2018: (Start)
a(n) = (2*n^2 - 4*n + 5 -(-1)^n)/4.
a(n+2) = a(n) + 2*n for n > 0.
a(n) = 2*A033683(n-1) - 1 for n > 0.
a(n) = A047838(n-1) + 2 for n > 2.
a(n) = A074148(n-1) - n + 2 for n > 1.
a(n) = A183575(n-3) + 3 for n > 3.
a(n) = 2*A290743(n-1) - 3 for n > 0.
a(n) = 2*A290743(n-2) + A109613(n-5) for n > 4.
a(n) = A074148(n) - A014601(n-1) for n > 0. (End)
Sum_{n>=1} 1/a(n) = tanh(Pi/2)*Pi/2 + coth(Pi/sqrt(2))*Pi/(2*sqrt(2)) + 1/2. - Amiram Eldar, Sep 16 2022
E.g.f.: ((2 - x + x^2)*cosh(x) + (3 - x + x^2)*sinh(x) - 2)/2. - Stefano Spezia, Jan 28 2024

A104777 Integer squares congruent to 1 mod 6.

Original entry on oeis.org

1, 25, 49, 121, 169, 289, 361, 529, 625, 841, 961, 1225, 1369, 1681, 1849, 2209, 2401, 2809, 3025, 3481, 3721, 4225, 4489, 5041, 5329, 5929, 6241, 6889, 7225, 7921, 8281, 9025, 9409, 10201, 10609, 11449, 11881, 12769, 13225, 14161, 14641, 15625, 16129
Offset: 1

Views

Author

Michael Somos, Mar 24 2005

Keywords

Comments

Exponents of powers of q in expansion of eta(q^24).
Odd squares not divisible by 3. - Reinhard Zumkeller, Nov 14 2015
From Peter Bala, Jan 03 2025: (Start)
Exponents of q in the expansion of q*Product_{n >= 1} (1 - q^(24*n))^5/(1 - q^(48*n))^2 = q - 5*q^(5^2) + 7*q^(7^2) - 11*q^(11^2) + 13*q^(13^2) - 17*q^(17^2) + 19*q^(19)^2 - + ... (a consequence of the quintuple product identity).
Also, exponents in the expansion of q*Product_{n >= 1} (1 - q^(48*n))^13 / ( (1 - q^(24*n))*(1 - q^(96*n)) )^5 = q + 5*q^(5^2) + 7*q^(7^2) + 11*q^(11^2) - 13*q^(13^2) - 17*q^(17^2) - 19*q^(19^2) - 23*q^(23^2) + + + + - - - - ... (see Oliver, Theorem 1.1). (End)

Examples

			eta(q^24) = q - q^25 - q^49 + q^121 + q^169 - q^289 - q^361 + ...
		

Crossrefs

Disjoint union of A016922 and A016970.

Programs

  • Haskell
    a104777 = (^ 2) . a007310  -- Reinhard Zumkeller, Nov 14 2015
  • Maple
    seq(9*(n-1/2)^2 + 1/4 + (-1)^n * (3*n - 3/2), n = 1 .. 100); # Robert Israel, Dec 12 2014
  • Mathematica
    Select[Range[130]^2,Mod[#,6]==1&] (* or *) LinearRecurrence[{1,2,-2,-1,1},{1,25,49,121,169},50] (* Harvey P. Dale, Mar 09 2017 *)
  • PARI
    {a(n) = (3*n - 1 - n%2)^2};
    

Formula

A033683(a(n)) = 1.
G.f.: ( -1-24*x-22*x^2-24*x^3-x^4 ) / ( (1+x)^2*(x-1)^3 ). - R. J. Mathar, Feb 20 2011
a(n) = A007310(n)^2 = 1 + 24*A001318(n-1).
a(n) = 9*n^2 - 9*n + 5/2 + (-1)^n * (3*n - 3/2). a(n+4) = 2*a(n+2) - a(n) + 72. - Robert Israel, Dec 12 2014
a(n) == 1 (mod 24). - Joerg Arndt, Jan 03 2017
Sum_{n>=1} 1/a(n) = Pi^2/9 (A100044). - Amiram Eldar, Dec 19 2020

A033684 1 iff n is a square not divisible by 3.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n)=1 iff n-1 is in the list A057780. - Jason Kimberley, Nov 13 2012

References

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

Crossrefs

Programs

  • Maple
    A033684 := proc(n)
            if issqr(n) then
                    if n mod 3 = 0 then
                            0;
                    else
                            1;
                    end if;
            else
                    0;
            end if;
    end proc:
    seq(A033684(n),n=0..80) ; # R. J. Mathar, Oct 07 2011
  • Mathematica
    Table[If[IntegerQ[Sqrt[n]]&&Mod[n,3]!=0,1,0],{n,0,130}] (* Harvey P. Dale, Oct 19 2018 *)
  • PARI
    A033684(n) = (issquare(n)&&(n%3)); \\ Antti Karttunen, Sep 13 2017

Formula

Essentially the series psi_3(z)=(1/2)(theta_3(z/9)-theta_3(z)).
a(n) * A000035(n) = A033683(n).
Multiplicative with a(p^e) = 1 if 2 divides e and p != 3, 0 otherwise. - Mitch Harris, Jun 09 2005
Dirichlet g.f.: zeta(2*s)*(1-3^(-2*s)). - R. J. Mathar, Mar 10 2011
a(n) = A010052(n)*A011655(n). - Antti Karttunen, Sep 13 2017
Sum_{k=1..n} a(k) ~ 2*sqrt(n)/3. - Amiram Eldar, Jan 14 2024

Extensions

Data-section extended up to a(121) by Antti Karttunen, Sep 13 2017
Showing 1-5 of 5 results.