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.

A158411 Maximum number of colors required to paint a map having n regions.

Original entry on oeis.org

0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 0

Views

Author

Jaume Oliver Lafont, Mar 18 2009

Keywords

Comments

The generating function can be arranged to have four zeros at the fourth roots of unity. - Jaume Oliver Lafont, Mar 23 2009
Also, the arithmetic function uhat(n,4,3) as defined in A291041. - Robert Price, Aug 25 2017
Decimal expansion of 1111/90000. - Elmo R. Oliveira, May 06 2024

Crossrefs

Programs

  • Mathematica
    PadRight[Range[0, 3], 100, 4] (* Paolo Xausa, Aug 22 2024 *)
  • PARI
    a(n)=if(n<4,n,4)

Formula

G.f.: x*(1+x+x^2+x^3)/(1-x).
G.f.: x*(1-x^4)/(1-x)^2. - Jaume Oliver Lafont, Mar 20 2009
G.f.: Product_{k=0..3} (1-I^k*x)*x/(1-x)^2. - Jaume Oliver Lafont, Mar 23 2009
a(n) = A130130(n) + A130130(n-2). - Jaume Oliver Lafont, Mar 24 2009
a(n) = min(n,4). - Wesley Ivan Hurt, Apr 16 2014
E.g.f.: 4*exp(x) - 4 - 3*x - x^2 - x^3/6. - Stefano Spezia, May 19 2024

A131561 Period 3: repeat [1, 1, -1].

Original entry on oeis.org

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

Views

Author

Paul Curtz, Aug 27 2007

Keywords

Comments

Other than the first term, this sequence represents numerators in a fraction expansion of log(2) - Pi/8. - Mohammad K. Azarian, Sep 27 2011
Also, the arithmetic function uhat(n,3,3) as defined in A291041. - Robert Price, Aug 25 2017

Examples

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

References

  • Mohammad K. Azarian, Problem 1218, Pi Mu Epsilon Journal, Vol. 13, No. 2, Spring 2010, p. 116. Solution published in Vol. 13, No. 3, Fall 2010, pp. 183-185.

Crossrefs

Programs

Formula

a(n) = (4*cos((2*n - 1) * Pi/3) + 1) / 3. - Federico Acha Neckar (f0383864(AT)hotmail.com), Sep 02 2007
G.f.: (1+x-x^2)/((1-x)*(x^2+x+1)). - R. J. Mathar, Nov 14 2007
G.f.: (1+x-x^2)/(1-x^3). - Jaume Oliver Lafont, Mar 24 2009
a(n) = (-1)^((n-1) mod 3). - Christopher Richmond, Oct 07 2011
a(n) = a(n-1)^2 - a(n-1) - a(n-2), for a(0),a(1) = 1,1; or same repeating pattern with 1,-1 or -1,1 as initial values. - Richard R. Forberg, Jun 13 2013
a(n+1) = A257075(n) for all n in Z. - Michael Somos, May 13 2015
a(n) = a(n-3) for n>2. - Wesley Ivan Hurt, Jul 02 2016
Product_{n >= 1} (1 + a(n-1)*x^n) = 1 + x + x^2 + x^5 + x^7 + x^12 + x^15 + ... = Sum_{n >= 0} x^A001318(n), a companion identity to Euler's pentagonal number theorem. - Peter Bala, Aug 30 2017
E.g.f.: (exp(x) + 2*exp(-x/2)*(cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)))/3. - Stefano Spezia, Oct 19 2024

Extensions

Edited by N. J. A. Sloane, Sep 15 2007

A230074 Period 4: repeat [1, -2, 1, 0].

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Oct 21 2013

Keywords

Comments

The o.g.f. for this sequence is obtained from the o.g.f.'s of the bisection of the sequence including a(0) = 0.
For the cos product formula below use Product_{k=1..n-1} 2*cos(2*k*Pi/n) = 1 if n is odd, and Product_{k=1..n-1} 2*cos(2*k*Pi/n) = -(1-(-1)^(n/2)) if n is even (see Gradstein-Rhyzik, p.62, 1.393 1., with x=0).
Also, the arithmetic function uhat(n,4,4) as defined in A291041. - Robert Price, Aug 25 2017

References

  • I. S. Gradstein and I. M. Ryshik, Tables of series, products, and integrals, Volume 1, Verlag Harri Deutsch, 1981.

Crossrefs

Cf. A291041.

Programs

Formula

a(n) = 1 if n is odd, and a(n) = -(1-(-1)^(n/2)) if n is even.
a(n+4*k) = a(n), n = 1, 2, 3, 4, k >= 1.
G.f.: -2*x/(1-x^4) + 1/(1-x^2) = (1-x)/((1+x)*(1+x^2)).
a(n) = Product_{k=1..n-1} 2*cos(2*k*Pi/n).
a(n) = sqrt(n^2 mod 8)*(-1)^(n+1). - Wesley Ivan Hurt, Jan 01 2014
From Wesley Ivan Hurt, Jun 22 2015: (Start)
a(n) + a(n-1) + a(n-2) + a(n-3) = 0, n>3.
a(n) = (1+(-1)^n)*(-1)^(n/2)/2-(-1)^n. (End)
From Wesley Ivan Hurt, Jul 09 2016: (Start)
a(n) = a(n-4) for n>4.
a(n) = cos(n*Pi/2) - (-1)^n. (End)
E.g.f.: cos(x) - exp(-x). - Ilya Gutkovskiy, Jul 09 2016
From Werner Schulte, Aug 29 2020: (Start)
Multiplicative with a(2^e) = (-2)^e if e<2 and 0 if e>1, and a(p^e) = 1 for prime p > 2.
Dirichlet g.f.: zeta(s) * (1-2^(-s)) * (1-2^(1-s)).
Dirichlet inverse b(n) is multiplicative with b(2^e) = 2^e and, for prime p>2, b(p^e) = (-1)^e if e<2 and 0 if e>1. (End)
Showing 1-3 of 3 results.