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.

A131028 Periodic sequence (7, 4, 1, 1, 4, 7).

Original entry on oeis.org

7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 10 2007

Keywords

Comments

Fourth column of triangular array T defined in A131022.
Continued fractions of (131 + sqrt(18530))/37 = 7.2195930... - R. J. Mathar, Mar 08 2012

Crossrefs

Cf. A131022, A084104. Other columns of T are in A088911, A131026, A131027, A131029, A131030.

Programs

  • Magma
    m:=105; [ [7, 4, 1, 1, 4, 7][(n-1) mod 6 + 1]: n in [1..m] ];
  • Mathematica
    PadRight[{},120,{7,4,1,1,4,7}] (* Harvey P. Dale, Jul 15 2013 *)
  • PARI
    {m=105; for(n=1, m, r=(n-1)%6; print1(if(r==0||r==5, 7, if(r==1||r==4, 4, 1)), ","))}
    

Formula

a(1) = a(6) = 7, a(2) = a(5) = 4, a(3) = a(4) = 1; for n > 6, a(n) = a(n-6).
G.f.: x*(7-10*x+7*x^2)/((1-x)*(1-x+x^2)).
a(n) = A084104(n+2).
a(n) = 4+2*sqrt(3)*cos(Pi/6*(2*n-1)). - Werner Schulte, Jul 21 2017

A084103 Expansion of (1+x)^3/(1+x^3).

Original entry on oeis.org

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

Views

Author

Paul Barry, May 15 2003

Keywords

Comments

Partial sums are A084104.

Examples

			1 + 3*x + 3*x^2 - 3*x^4 - 3*x^5 + 3*x^7 + 3*x^8 - 3*x^10 - 3*x^11 + ...
		

Crossrefs

Programs

  • Magma
    I:=[1,3,3]; [n le 3 select I[n] else Self(n-1)-Self(n-2): n in [1..100]]; // Vincenzo Librandi, May 16 2015
  • Maple
    1, seq(op((-1)^i*[3, 3, 0]), i=0..20); # Robert Israel, May 17 2015
  • Mathematica
    CoefficientList[Series[(1 + x)^3/(1 + x^3), {x, 0, 100}], x] (* Vincenzo Librandi, May 16 2015 *)
    Join[{1}, LinearRecurrence[{1,-1}, {3,3}, 30]] (* G. C. Greubel, Jan 15 2018 *)
  • PARI
    {a(n) = (n==0) + [0, 3, 3, 0, -3, -3][n%6 + 1]} /* Michael Somos, Feb 13 2011 */
    
  • PARI
    {a(n) = (n==0) - 3 * (-1)^n * kronecker(-3, n)} /* Michael Somos, Feb 13 2011 */
    

Formula

G.f.: (1+x)^3/(1+x^3).
a(n) = Sum_{k=0..n} binomial(2n-k-1, k)(-1)^k*3(n-k). - Paul Barry, Jan 21 2005
a(0) = 1 and a(n) = 2*sqrt(3)*sin(n*Pi/3). - N-E. Fahssi, Mar 04 2010
Euler transform of length 6 sequence [3, -3, -1, 0, 0, 1]. - Michael Somos, Feb 13 2011
a(n) = -a(-n) = 3 * A128834(n) except a(0) = 1. - Michael Somos, Feb 13 2011
a(n) = 3*(n^2 mod 3)*(-1)^floor(n/3), n>0. - Wesley Ivan Hurt, May 15 2015
The periodic sequence b(n) = a(n+1) has the o.g.f. 3 + G(x) = 3 + 3x(1-x) / (1-x(1-x)) = 3 + 3 L(Cinv(x)) = 3 + 3 x - 3 x^3 - 3 x^4 + ... , where L(x) = x/(1-x) with inverse Linv(x) = x/(1+x) and Cinv(x) = x(1-x), the inverse of the o.g.f. for the shifted Catalan numbers of A000108, C(x) = (1-sqrt(1-4x))/2. Then Ginv(x) = C(Linv(x/3)) = [1 - sqrt[1-4x/(3+x)]]/2. Cf. A267633. - Tom Copeland, Jan 25 2016
Showing 1-2 of 2 results.