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.

A010892 Inverse of 6th cyclotomic polynomial. A period 6 sequence.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Any sequence b(n) satisfying the recurrence b(n) = b(n-1) - b(n-2) can be written as b(n) = b(0)*a(n) + (b(1)-b(0))*a(n-1).
a(n) is the determinant of the n X n matrix M with m(i,j)=1 if |i-j| <= 1 and 0 otherwise. - Mario Catalani (mario.catalani(AT)unito.it), Jan 25 2003
Also row sums of triangle in A108299; a(n)=L(n-1,1), where L is also defined as in A108299; see A061347 for L(n,-1). - Reinhard Zumkeller, Jun 01 2005
Pisano period lengths: 1, 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, ... - R. J. Mathar, Aug 10 2012
Periodic sequences of this type can also be calculated as a(n) = c + floor(q/(p^m-1)*p^n) mod p, where c is a constant, q is the number representing the periodic digit pattern and m is the period. c, p and q can be calculated as follows: Let D be the array representing the number pattern to be repeated, m = size of D, max = maximum value of elements in D, min = minimum value of elements in D. Then c := min, p := max - min + 1 and q := p^m*Sum_{i=1..m} (D(i)-min)/p^i. Example: D = (1, 1, 0, -1, -1, 0), c = -1, m = 6, p = 3 and q = 676 for this sequence. - Hieronymus Fischer, Jan 04 2013
B(n) = a(n+5) = S(n-1, 1) appears, together with a(n) = A057079(n+1), in the formula 2*exp(Pi*n*i/3) = A(n) + B(n)*sqrt(3)*i with i = sqrt(-1). For S(n, x) see A049310. See also a Feb 27 2014 comment on A099837. - Wolfdieter Lang, Feb 27 2014
a(n) (for n>=1) is the difference between numbers of even and odd permutations p of 1,2,...,n such that |p(i)-i|<=1 for i=1,2,...,n. - Dmitry Efimov, Jan 08 2016
From Tom Copeland, Jan 31 2016: (Start)
Specialization of the o.g.f. 1 / ((x - w1)(x-w2)) = (1/(w1-w2)) ((w1-w2) + (w1^2 - w2^2) x + (w1^3-w2^3) x^2 + ...) with w1*w2 = (1/w1) + (1/w2) = 1. Then w1 = q = e^(i*Pi/3) and w2 = 1/q = e^(-i*Pi/3), giving the o.g.f. 1 /(1-x+x^2) for this entry with a(n) = (2/sqrt(3)) sin((n+1)Pi/3). See the Copeland link for more relations.
a(n) = (q^(n+1) - q^(-(n+1))) / (q - q^(-1)), so this entry gives the o.g.f. for an instance of the quantum integers denoted by [m]_q in Morrison et al. and Tingley. (End)

Examples

			G.f. = 1 + x - x^3 - x^4 + x^6 + x^7 - x^9 - x^10 + x^12 + x^13 - x^15 + ...
		

Crossrefs

a(n) = row sums of signed triangle A049310.
Differs only by a shift from A128834.
a(n+1) = row sums of triangle A130777: repeat(1,0,-1,-1,0,1).

Programs

  • Magma
    &cat[[1,1,0,-1,-1,0]: n in [0..20]]; // Vincenzo Librandi, Apr 03 2014
  • Maple
    a:=n->coeftayl(1/(x^2-x+1), x=0, n);
    a:=n->2*sin(Pi*(n+1)/3)/sqrt(3);
    A010892:=n->[1,1,0,-1,-1,0][irem(n,6)+1];
    A010892:=n->Array(0..5,[1,1,0,-1,-1,0])[irem(n,6)];
    A010892:=n->table([0=1,1=1,2=0,3=-1,4=-1,5=0])[irem(n,6)];
    with(numtheory,cyclotomic); c := series(1/cyclotomic(6,x),x,102): seq(coeff(c,x,n),n=0..101); # Rainer Rosenthal, Jan 01 2007
  • Mathematica
    a[n_] := {1, 1, 0, -1, -1, 0}[[Mod[n, 6] + 1]]; Table[a[n], {n, 0, 101}] (* Jean-François Alcover, Jul 19 2013 *)
    CoefficientList[Series[1/Cyclotomic[6, x], {x, 0, 100}], x] (* Vincenzo Librandi, Apr 03 2014 *)
    PadRight[{},120,{1,1,0,-1,-1,0}] (* Harvey P. Dale, Jul 07 2020 *)
  • PARI
    {a(n) = (-1)^(n\3) * sign((n + 1)%3)}; /* Michael Somos, Sep 23 2005 */
    
  • PARI
    {a(n) = subst( poltchebi(n) + poltchebi(n-1), 'x, 1/2) * 2/3}; /* Michael Somos, Sep 23 2005 */
    
  • PARI
    {a(n) = [1, 1, 0, -1, -1, 0][n%6 + 1]}; /* Michael Somos, Feb 14 2006 */
    
  • PARI
    {a(n) = my(A, p, e); if( n<0, 0, n++; A = factor(n); prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, -(-1)^e, p==3, 0, p%6 == 1, 1, (-1)^e)))}; /* Michael Somos, Oct 29 2006 */
    
  • Python
    def A010892(n): return [1,1,0,-1,-1,0][n%6] # Alec Mihailovs, Jan 01 2007
    
  • Sage
    [lucas_number1(n,1,+1) for n in range(-5, 97)] # Zerinvary Lajos, Apr 22 2009
    
  • Sage
    def A010892():
        x, y = -1, -1
        while True:
            yield -x
            x, y = y, -x + y
    a = A010892()
    [next(a) for i in range(40)]  # Peter Luschny, Jul 11 2013
    

Formula

G.f.: 1 / (1 - x + x^2).
a(n) = a(n-1) - a(n-2), a(0)=1, a(1)=1.
a(n) = ((-1)^floor(n/3) + (-1)^floor((n+1)/3))/2.
a(n) = 0 if n mod 6 = 2 or 5, a(n) = +1 if n mod 6 = 0 or 1, a(n) = -1 otherwise. a(n) = S(n, 1) = U(n, 1/2) (Chebyshev U(n, x) polynomials).
a(n) = sqrt(4/3)*Im((1/2 + i*sqrt(3/4))^(n+1)). - Henry Bottomley, Apr 12 2000
Binomial transform of A057078. a(n) = Sum_{k=0..n} C(k, n-k)*(-1)^(n-k). - Paul Barry, Sep 13 2003
a(n) = 2*sin(Pi*n/3 + Pi/3)/sqrt(3). - Paul Barry, Jan 28 2004
a(n) = Sum_{k=0..floor(n/2)} C(n-k, k)*(-1)^k. - Paul Barry, Jul 28 2004
Euler transform of length 6 sequence [1, -1, -1, 0, 0, 1]. - Michael Somos, Sep 23 2005
a(n) = a(1 - n) = -a(-2 - n) for all n in Z. - Michael Somos, Feb 14 2006
a(n) = Sum_{k=0..n} (-2)^(n-k) * A085838(n,k). - Philippe Deléham, Oct 26 2006
a(n) = b(n+1) where b(n) is multiplicative with b(2^e) = -(-1)^e if e>0, b(3^e) = 0^e, b(p^e) = 1 if p == 1 (mod 6), b(p^e) = (-1)^e if p == 5 (mod 6). - Michael Somos, Oct 29 2006
Given g.f. A(x), then, B(x) = x * A(x) satisfies 0 = f(B(x), B(x^2)) where f(u, v) = u^2 - v - 2*u*v * (1 - u). - Michael Somos, Oct 29 2006
a(2*n) = A057078(n), a(2*n+1) = A049347(n).
a(n) = Sum_{k=0..n} A109466(n,k). - Philippe Deléham, Nov 14 2006
a(n) = Sum_{k=0..n} A133607(n,k). - Philippe Deléham, Dec 30 2007
a(n) = A128834(n+1). - Jaume Oliver Lafont, Dec 05 2008
a(n) = Sum_{k=0..n} C(n+k+1,2k+1) * (-1)^k. - Paul Barry, Jun 03 2009
a(n) = A101950(n,0) = (-1)^n * A049347(n). - Philippe Deléham, Feb 10 2012
a(n) = Product_{k=1..floor(n/2)} 1 - 4*(cos(k*Pi/(n+1)))^2. - Mircea Merca, Apr 01 2012
G.f.: 1 / (1 - x / (1 + x / (1 - x))). - Michael Somos, Apr 02 2012
a(n) = -1 + floor(181/819*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 03 2013
a(n) = -1 + floor(13/14*3^(n+1)) mod 3. - Hieronymus Fischer, Jan 04 2013
a(n) = 1/(1+r2)*(1/r1)^n + 1/(1+r1)*(1/r2)^n, with r1=(1-i*sqrt(3))/2 and r2=(1+i*sqrt(3))/2. - Ralf Stephan, Jul 19 2013
a(n) = ((n+1)^2 mod 3) * (-1)^floor((n+1)/3). - Wesley Ivan Hurt, Mar 15 2015
a(n-1) = n - Sum_{i=1..n-1} i*a(n-i). - Derek Orr, Apr 28 2015
a(n) = S(2*n+1, sqrt(3))/sqrt(3) = S(n, 1) with S(n, x) coefficients given in A049310. The S(n, 1) formula appeared already above. S(2*n, sqrt(3)) = A057079(n). See also a Feb 27 2014 comment above. - Wolfdieter Lang, Jan 16 2018
E.g.f.: sqrt(exp(x)*4/3) * cos(x*sqrt(3/4) - Pi/6). - Michael Somos, Jul 05 2018
a(n) = Determinant(Tri(n)), for n >= 1, with Tri(n) the n X n tridiagonal matrix with entries 1 (a special Toeplitz matrix). - Wolfdieter Lang, Sep 20 2019
a(n) = Product_{k=1..n}(1 + 2*cos(k*Pi/(n+1))). - Peter Luschny, Nov 28 2019

Extensions

Entry revised by N. J. A. Sloane, Jul 16 2004

A090365 Shifts 1 place left under the INVERT transform of the BINOMIAL transform of this sequence.

Original entry on oeis.org

1, 1, 3, 11, 47, 225, 1177, 6625, 39723, 251939, 1681535, 11764185, 86002177, 655305697, 5193232611, 42726002123, 364338045647, 3215471252769, 29331858429241, 276224445794785, 2682395337435723, 26832698102762435, 276221586866499839, 2923468922184615897
Offset: 0

Views

Author

Paul D. Hanna, Nov 26 2003

Keywords

Comments

The Hankel transform of this sequence is A000178(n+1); example: det([1,1,3; 1,3,11; 3,11,47]) = 12. - Philippe Deléham, Mar 02 2005
a(n) appears to be the number of indecomposable permutations (A003319) of [n+1] that avoid both of the dashed patterns 32-41 and 41-32. - David Callan, Aug 27 2014
This is true: A nonempty permutation avoids 32-41 and 41-32 if and only if all its components do so. So if A(x) denotes the g.f. for indecomposable {32-41,41-32}-avoiders, then F(x):=1/(1-A(x)) is the g.f. for all {32-41,41-32}-avoiders. From A074664, F(x)=1/x(1-1/B(x)) where B(x) is the o.g.f. for the Bell numbers. Solve for A(x). - David Callan, Jul 21 2017
The Hankel transform of this sequence without the a(0)=1 term is also A000178(n+1). - Michael Somos, Oct 02 2024

Crossrefs

Programs

  • Maple
    bintr:= proc(p) proc(n) add(p(k) *binomial(n,k), k=0..n) end end:
    invtr:= proc(p) local b;
               b:= proc(n) option remember; local i;
                    `if`(n<1, 1, add(b(n-i) *p(i-1), i=1..n+1))
                   end;
            end:
    b:= invtr(bintr(a)):
    a:= n-> `if`(n<0, 0, b(n-1)):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jun 28 2012
  • Mathematica
    a[n_] := Module[{A, B}, A = 1+x; For[k=1, k <= n, k++, B = (A /. x -> x/(1 - x))/(1-x) + O[x]^n // Normal; A = 1 + x*A*B]; SeriesCoefficient[A, {x, 0, n}]]; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Oct 23 2016, adapted from PARI *)
  • PARI
    {a(n)=local(A); if(n<0,0,A=1+x+x*O(x^n); for(k=1,n,B=subst(A,x, x/(1-x))/(1-x)+x*O(x^n); A=1+x*A*B);polcoeff(A,n,x))}

Formula

G.f.: A(x) satisfies A(x) = 1/(1 - A(x/(1-x))*x/(1-x) ).
a(n) = Sum_{k = 0..n} A085838(n, k). - Philippe Deléham, Jun 04 2004
G.f.: 1/x-1-1/(B(x)-1) where B(x) = g.f. for A000110 the Bell numbers. - Vladeta Jovovic, Aug 08 2004
a(n) = Sum_{k=0..n} A094456(n,k). - Philippe Deléham, Nov 07 2007
G.f.: 1/(1-x/(1-2x/(1-x/(1-3x/(1-x/(1-4x/(1-x/(1-5x/(1-... (continued fraction). - Paul Barry, Feb 25 2010
From Sergei N. Gladkovskii, Jan 06 2012 - May 12 2013: (Start)
Continued fractions:
G.f.: 1 - x/(G(0)+x); G(k) = x - 1 + x*k + x*(x-1+x*k)/G(k+1).
G.f.: 1/x - 1/2 + (x^2-4)/(4*U(0)-2*x^2+8) where U(k) = k*(2*k+3)*x^2 + x - 2 - (2-x+2*k*x)*(2+3*x+2*k*x)*(k+1)*x^2/U(k+1).
G.f.: 1/x+1/(U(0)-1) where U(k) = -x*k + 1 - x - x^2*(k+1)/U(k+1).
G.f.: (1 - U(0))/x - 1 where U(k) = 1 - x*(k+2) - x^2*(k+1)/U(k+1).
G.f.: (1 - U(0))/x where U(k) = 1 - x*(k+1)/(1-x/U(k+1)).
G.f.: 1/x + 1/( G(0)-1) where G(k) = 1 - x/(1 - x*(2*k+1)/(1 - x/(1 - x*(2*k+2)/ G(k+1) ))).
G.f.:1/x + 1/( G(0) - 1 ) where G(k) = 1 - x/(1 - x*(k+1)/G(k+1) ).
G.f.: (1 - Q(0))/x where Q(k) = 1 + x/(x*k - 1 )/Q(k+1).
G.f.: 1/x - 1/x/Q(0), where Q(k) = 1 + x/(1 - x + x*(k+1)/(x - 1/Q(k+1))).
(End)
Conjecture: a(n) = b(2^(n-1) - 1) for n > 0 with a(0) = 1 where b(n) = b((n - 2^f(n))/2) + b(floor((2n - 2^f(n))/2)) + b(A025480(n-1)) for n > 0 with b(0) = 1 and where f(n) = A007814(n). - Mikhail Kurkov, Jan 11 2022

A085791 Triangle T(n,k) read by rows; given by [0,1,0,1,0,1,0,1,...] DELTA [1,0,1,1,1,2,1,3,1,4,1,5,...], where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 6, 7, 1, 0, 1, 10, 24, 16, 1, 0, 1, 15, 60, 86, 40, 1, 0, 1, 21, 125, 301, 312, 116, 1, 0, 1, 28, 231, 826, 1443, 1215, 395, 1, 0, 1, 36, 392, 1932, 4992, 7055, 5187, 1551, 1, 0, 1, 45, 624, 4032, 14274, 29629, 36242, 24280
Offset: 0

Views

Author

Philippe Deléham, Jul 23 2003

Keywords

Examples

			1;
0, 1;
0, 1, 1;
0, 1, 3, 1;
0, 1, 6, 7, 1;
0, 1, 10, 24, 16, 1; ....
		

Crossrefs

Formula

Sum_{k>=0} T(n,k) = A000110(n).
T(n + 1; 2) = A000217(n).
T(n + 2; 3) = A014205(n)= (1/12)*(n + 5)*(n + 1)*n^2.
T(n + 2; n + 1) = A029761(n).
Showing 1-3 of 3 results.