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 10 results.

A049347 Period 3: repeat [1, -1, 0].

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

Views

Author

Keywords

Comments

G.f. 1/cyclotomic(3, x) (the third cyclotomic polynomial).
Self-convolution yields (-1)^n*A099254(n). - R. J. Mathar, Apr 06 2008
Hankel transform of A099324. - Paul Barry, Aug 10 2009
A057083(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0..n. - Michael Somos, Apr 29 2012
a(n) appears, together with b(n) = A099837(n+3) in the formula 2*exp(2*Pi*n*I/3) = b(n) + a(n)*sqrt(3)*I, n >= 0, with I = sqrt(-1). See A164116 for the case N=5. - Wolfdieter Lang, Feb 27 2014
The binomial transform is 1, 0, -1, -1, 0, 1, 1, 0, -1, -1.. (see A010891). The inverse binom. transform is 1, -2, 3, -3, 0, 9, -27, 54, -81.. (see A057682). - R. J. Mathar, Feb 25 2023

Examples

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

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 175.

Crossrefs

Alternating row sums of A049310 (Chebyshev-S). [Wolfdieter Lang, Nov 04 2011]

Programs

Formula

G.f.: 1/(1+x+x^2).
a(n) = +1 if n mod 3 = 0, a(n) = -1 if n mod 3 = 1, else 0.
a(n) = S(n, -1) = U(n, -1/2) (Chebyshev's U(n, x) polynomials.)
a(n) = 2*sqrt(3)*cos(2*Pi*n/3 + Pi/6)/3. - Paul Barry, Mar 15 2004
a(n) = Sum_{k >= 0} (-1)^(n-k)*C(n-k, k).
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. - Michael Somos, Oct 03 2006
Euler transform of length 3 sequence [-1, 0, 1]. - Michael Somos, Oct 03 2006
a(n) = b(n+1) where b(n) is multiplicative with b(3^e) = 0^e, b(p^e) = 1 if p == 1 (mod 3), b(p^e) = (-1)^e if p == 2 (mod 3). - Michael Somos, Oct 03 2006
From Michael Somos, Oct 03 2006: (Start)
G.f.: (1 - x) /(1 - x^3).
a(n) = -a(1-n) = -a(n-1) - a(n-2) = a(n-3). (End)
From Michael Somos, Apr 29 2012: (Start)
G.f.: 1 / (1 + x / ( 1 - x / (1 + x))).
a(n) = (-1)^n * A010892(n).
a(n) * n! = A194770(n+1).
Revert transform of A001006. Convolution inverse of A130716. MOBIUS transform of A002324. EULER transform is A111317. BIN1 transform of itself. STIRLING transform is A143818(n+2). (End)
a(-n) = A057078(n). a(n) = A106510(n+1) unless n=0. - Michael Somos, Oct 15 2008
G.f. A(x) = 1/(1+x+x^2) = Q(0); Q(k) = 1- x/(1 - x^2/(x^2 - 1 + x/(x - 1 + x^2/(x^2 - 1/Q(k+1))))); (continued fraction 3 kind, 5-step ). - Sergei N. Gladkovskii, Jun 19 2012
a(n) = -1 + floor(67/333*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 03 2013
a(n) = -1 + floor(19/26*3^(n+1)) mod 3. - Hieronymus Fischer, Jan 03 2013
a(n) = ceiling((n-1)/3) - ceiling(n/3) + floor(n/3) - floor((n-1)/3). - Wesley Ivan Hurt, Dec 06 2013
a(n) = n + 1 - 3*floor((n+2)/3). - Mircea Merca, Feb 04 2014
a(n) = A102283(n+1) for all n in Z. - Michael Somos, Sep 24 2019
E.g.f.: exp(-x/2)*(3*cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2))/3. - Stefano Spezia, Oct 26 2022

Extensions

Edited by Charles R Greathouse IV, Mar 23 2010

A099837 Expansion of (1 - x^2) / (1 + x + x^2) in powers of x.

Original entry on oeis.org

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

Views

Author

Paul Barry, Oct 27 2004

Keywords

Comments

A transform of (-1)^n.
Row sums of Riordan array ((1-x)/(1+x), x/(1+x)^2), A110162.
Let b(n) = Sum_{k=0..floor(n/2)} binomial(n-k,k)(-1)^(n-2k). Then a(n) = b(n) - b(n-2) = A049347(n) - A049347(n-2) (n > 0). The g.f. 1/(1+x) of (-1)^n is transformed to (1-x^2)/(1+x+x^2) under the mapping G(x)->((1-x^2)/(1+x^2))G(x/(1+x^2)). Partial sums of A099838.
A(n) = a(n+3) (or a(n) if a(0) is replaced by 2) appears, together with B(n) = A049347(n) in the formula 2*exp(2*Pi*n*i/3) = A(n) + B(n)*sqrt(3)*i, n >= 0, with i = sqrt(-1). See A164116 for the case N=5. - Wolfdieter Lang, Feb 27 2014

Examples

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

Crossrefs

Programs

  • Maple
    A099837 := proc(n)
        option remember;
        if n <=2 then
            op(n+1,[1,-1,-1]) ;
        else
            -procname(n-1)-procname(n-2) ;
        end if;
    end proc:
    seq(A099837(n),n=0..80) ; # R. J. Mathar, Apr 26 2022
  • Mathematica
    a[0] = 1; a[n_] := Mod[n+2, 3] - Mod[n, 3]; A099837 = Table[a[n], {n, 0, 71}](* Jean-François Alcover, Feb 15 2012, after Michael Somos *)
    LinearRecurrence[{-1, -1}, {1, -1, -1}, 50] (* G. C. Greubel, Aug 08 2017 *)
  • Maxima
    A099837(n) := block(
            if n = 0 then 1 else [2,-1,-1][1+mod(n,3)]
    )$ /* R. J. Mathar, Mar 19 2012 */
    
  • PARI
    {a(n) = [2, -1, -1][n%3 + 1] - (n == 0)}; /* Michael Somos, Jan 19 2012 */
    
  • PARI
    Vec((1-x^2)/(1+x+x^2) + O(x^20)) \\ Felix Fröhlich, Aug 08 2017

Formula

G.f.: (1-x^2)/(1+x+x^2).
Euler transform of length 3 sequence [-1, -1, 1]. - Michael Somos, Mar 21 2011
Moebius transform is length 3 sequence [-1, 0, 3]. - Michael Somos, Mar 22 2011
a(n) = -b(n) where b(n) = A061347(n) is multiplicative with b(3^e) = -2 if e > 0, b(p^e) = 1 otherwise. - Michael Somos, Jan 19 2012
a(n) = a(-n). a(n) = c_3(n) if n > 1 where c_k(n) is Ramanujan's sum. - Michael Somos, Mar 21 2011
G.f.: (1 - x) * (1 - x^2) / (1 - x^3). a(n) = -a(n-1) - a(n-2) unless n = 0, 1, 2. - Michael Somos, Jan 19 2012
Dirichlet g.f.: Sum_{n>=1} a(n)/n^s = zeta(s)*(3^(1-s)-1). - R. J. Mathar, Apr 11 2011
a(n+3) = R(n,-1) for n >= 0, with the monic Chebyshev T-polynomials R with coefficient table A127672. - Wolfdieter Lang, Feb 27 2014
For n > 0, a(n) = 2*cos(n*Pi/3)*cos(n*Pi). - Wesley Ivan Hurt, Sep 25 2017
From Peter Bala, Apr 20 2024: (Start)
a(n) is equal to the n-th order Taylor polynomial (centered at 0) of 1/c(x)^(2*n) evaluated at x = 1, where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the o.g.f. of the Catalan numbers A000108. Cf. A333093.
Row sums of the Riordan array A110162. (End)

A080891 Period 5: repeat [0, 1, -1, -1, 1].

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 23 2003

Keywords

Comments

a(n) = (5/n), where (k/n) is the Kronecker symbol.
L(1;5) (Dirichlet L-series) is the integral from 0 to 1 of the g.f. of a(n+1). Partial sums are A092202. - Paul Barry, Apr 01 2005
From R. J. Mathar, Jul 15 2010, simplified Jul 27 2010: (Start)
The sequence is the real non-principal Dirichlet character mod 5. (The principal character mod 5 is A011558.)
Associated Dirichlet L-functions are, for example, L(1,chi) = Sum_{n>=1} a(n)/n = A086466 or L(2,chi) = Sum_{n>=1} a(n)/n^2 = 0.7062114... = 4*Pi^2/(25*sqrt(5)). (End)
This sequence {a(n)} appears in the formula 2*exp(2*Pi*n*i/5) = (A(n) + a(n)*phi) + (C(n) + D(n)*phi)*sqrt(2 + phi)*i, with the golden section phi, i = sqrt(-1) and A(n) = A164116(n+5), C(n) = A156174(n+4) and D(n) = A010891(n+3) for n >= 0. See a comment on A164116. - Wolfdieter Lang, Feb 26 2014
In Gil and Robins 2003 on page 33 the g.f. is denoted by f_{4, 4}(x). - Michael Somos, Sep 04 2015

Examples

			G.f. = x - x^2 - x^3 + x^4 + x^6 - x^7 - x^8 + x^9 + x^11 - x^12 - x^13 + ...
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1986, page 139, k=5, Chi_2(n).
  • H. Cohn, Advanced Number Theory, Dover Publications, Inc., 1962, p. 173.

Crossrefs

Programs

  • Magma
    &cat [[0, 1, -1, -1, 1]^^30]; // Wesley Ivan Hurt, Dec 26 2016
  • Maple
    A080891 := proc(n) numtheory[jacobi](n,5) ; end proc: seq(A080891(n),n=0..100) ; # R. J. Mathar, Jul 29 2010
  • Mathematica
    a[ n_] := Mod[n^2 + 1, 5] - 1; (* Michael Somos, May 24 2015 *)
    a[ n_] := KroneckerSymbol[ n, 5]; (* Michael Somos, May 24 2015 *)
    a[ n_] := {1, -1, -1, 1, 0}[[Mod[n, 5, 1]]]; (* Michael Somos, May 24 2015 *)
    PadRight[{},120,{0,1,-1,-1,1}] (* Harvey P. Dale, Nov 30 2023 *)
  • MuPAD
    numlib::jacobi(n,5)$ n=0..100 // Zerinvary Lajos, May 13 2008
    
  • PARI
    a(n)=kronecker(5,n) /* Also, a(n)=kronecker(n,5) */
    
  • PARI
    {a(n) = (n^2 + 1)%5 - 1}; /* Michael Somos, Dec 01 2004 */
    

Formula

If n == 0 (mod 5) a(n)=0; if n == 1 or 4 (mod 5) a(n)=1; if n == 2 or 3 (mod 5) a(n)=-1.
G.f.: x*(1-x^2)/(1+x+x^2+x^3+x^4). - Paul Barry, Apr 01 2005
G.f.: x * (1 - x) * (1 - x^2) / (1 - x^5). a(n) = a(-n) = a(n+5) for all n in Z. - Michael Somos, Jun 17 2005
Euler transform of length 5 sequence [-1, -1, 0, 0, 1]. - Michael Somos, Jun 17 2005
Transform of the Fibonacci numbers by the Riordan array A102587. - Paul Barry, Jul 14 2005
a(n) = -1 + floor(12002/99999*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 04 2013
a(n) = -1 + floor(137/242*3^(n+1)) mod 3. - Hieronymus Fischer, Jan 04 2013
|A011558(n)| = |a(n)| = |A100047(n)|. - Michael Somos, May 24 2015
a(n) is completely multiplicative with a(p) = Kronecker(5, p). - Michael Somos, Jun 17 2015
From Wesley Ivan Hurt, Dec 26 2016: (Start)
a(n) = a(n-5) for n > 4.
a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4) = 0 for n > 3.
a(n) = 1 + 2*floor((n-4)/5) - 2*floor((n-2)/5) + floor((n-1)/5) - floor(n/5). (End)
a(n) = 2*(cos(2*n*Pi/5) - cos(4*n*Pi/5))/sqrt(5). - Wesley Ivan Hurt, Sep 26 2018
a(n) = a(n-1)*a(n-4) - a(n-2)*a(n-3) for n > 3. - Nicolas Bělohoubek, May 21 2024
a(n) = n^2 - 5*floor((n^2+1)/5). - Aaron J Grech, Aug 28 2024

Extensions

Name specified by Wolfdieter Lang, Feb 26 2014

A010891 Inverse of 5th cyclotomic polynomial.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

D(n):= a(n+3) appears in the formula 2*exp(2*Pi*n*i/5) = (A(n) + B(n)*phi) + (C(n) + D(n)*phi)*sqrt(2 + phi)*i, with the golden section phi, i = sqrt(-1) and A(n) = A164116(n+5), B(n) = A080891(n) and C(n) = A156174(n+4) for n >= 0. See one of the comments on A164116. - Wolfdieter Lang, Feb 26 2014
Periodic with period length 5. - Ray Chandler, Apr 03 2017

Programs

  • Magma
    &cat[[1,-1,0,0,0]: n in [0..20]]; // Vincenzo Librandi, Apr 03 2014
  • Maple
    with(numtheory,cyclotomic); c := n->series(1/cyclotomic(n,x),x,80);
    # alternative
    A010891 := proc(n)
        op(1+(n mod 5),[1,-1,0,0,0]) ;
    end proc:
    seq(A010891(n),n=0..20) ; # R. J. Mathar, Feb 27 2025
  • Mathematica
    CoefficientList[Series[1/Cyclotomic[5, x], {x, 0, 100}], x] (* Vincenzo Librandi, Apr 03 2014 *)
  • PARI
    Vec(1/polcyclo(5)+O(x^99)) \\ Charles R Greathouse IV, Mar 24 2014
    

Formula

G.f.: 1/ ( 1+x+x^2+x^3+x^4 ). - R. J. Mathar, Mar 11 2011

A184535 a(n) = floor(3/5 * n^2), with a(1)=1.

Original entry on oeis.org

1, 2, 5, 9, 15, 21, 29, 38, 48, 60, 72, 86, 101, 117, 135, 153, 173, 194, 216, 240, 264, 290, 317, 345, 375, 405, 437, 470, 504, 540, 576, 614, 653, 693, 735, 777, 821, 866, 912, 960, 1008, 1058, 1109, 1161, 1215, 1269, 1325, 1382, 1440, 1500, 1560, 1622, 1685, 1749, 1815, 1881, 1949, 2018, 2088, 2160, 2232, 2306, 2381
Offset: 1

Views

Author

Clark Kimberling, Jan 16 2011

Keywords

Comments

Apart from the initial term this is the elliptic troublemaker sequence R_n(2,5) in the notation of Stange (see Table 1, p.16). For other elliptic troublemaker sequences see the cross references below. - Peter Bala, Aug 08 2013

Crossrefs

Elliptic troublemaker sequences: A000212 (= R_n(1,3) = R_n(2,3)), A002620 (= R_n(1,2)), A007590 (= R_n(2,4)), A030511 (= R_n(2,6) = R_n(4,6)), A033436 (= R_n(1,4) = R_n(3,4)), A033437 (= R_n(1,5) = R_n(4,5)), A033438 (= R_n(1,6) = R_n(5,6)), A184535 (= R_n(2,5) = R_n(3,5)).

Programs

  • GAP
    Concatenation([1], List([2..10^3], n->Int(3/5 * n^2))); # Muniru A Asiru, Feb 04 2018
    
  • Maple
    1,seq(floor(3/5*n^2), n=2..10^3); # Muniru A Asiru, Feb 04 2018
  • Mathematica
    p[n_] := FractionalPart[(n^3 + 5)^(1/3)]; q[n_] := Floor[1/p[n]]; Table[q[n], {n, 1, 120}]
    Join[{1},LinearRecurrence[{2, -1, 0, 0, 1, -2, 1},{2, 5, 9, 15, 21, 29, 38},62]] (* Ray Chandler, Aug 31 2015 *)
  • PARI
    a(n) = if(n==1, 1, 3*n^2\5); \\ Altug Alkan, Mar 03 2018
    
  • Python
    def A184535(n): return 3*n**2//5 if n>1 else 1 # Chai Wah Wu, Aug 04 2025

Formula

a(n) = floor(1/{(5+n^3)^(1/3)}), where {}=fractional part.
a(n)= +2*a(n-1) -a(n-2) +a(n-5) -2*a(n-6) +a(n-7), for n>8, with g.f. 1-x^2*(1+x)*(2*x^2-x+2)/ ((x^4+x^3+x^2+x+1) *(x-1)^3), so a(n) is (3n^2-2)/5 plus a fifth of A164116 for n>1. [Bruno Berselli, Jan 30 2011. See the following Bala's comment.]
From Peter Bala, Aug 08 2013: (Start)
a(n) = floor(3/5*n^2) for n >= 2.
The sequence b(n) := floor(3/5*n^2) - 3/5*n^2, n >= 1, is periodic with period [-3/5, -2/5, -2/5, -3/5, 0] of length 5. The generating function and recurrence equation given above easily follow from these observations.
The sequence c(n) := 5/2*( (2*n/5 - floor(2*n/5))^2 - (2*n/5 - floor(2*n/5)) ) is also periodic with period 5, and calculation shows it has the same period as the sequence b(n). Thus b(n) = c(n), yielding the alternative formula a(n) = 3/5*n^2 + 5/2*( (2*n/5 - floor(2*n/5))^2 - (2*n/5 - floor(2*n/5)) ), which is one of the formulas for the elliptic troublemaker sequence R_n(2,5) given in Stange (see Section 7, equation (21)). (End)

Extensions

Better name from Peter Bala, Aug 08 2013

A156174 Period 5: repeat [1,-1,1,-1,0].

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 06 2009

Keywords

Comments

C(n) := a(n+4) appears in the formula 2*exp(2*Pi*n*i/5) = (A(n) + B(n)*phi) + (C(n) + D(n)*phi)*sqrt(2 + phi)*i, with the golden section phi, i = sqrt(-1) and A(n) = A164116(n+5), B(n) = A080891(n) and D(n) = A010891(n+3) for n >= 0. See a comment on A164116(n+5). - Wolfdieter Lang, Feb 26 2014
With offset 1 this is a strong elliptic divisibility sequence t_n as given in [Kimberling, p. 16] where x = -1, y = 1, z = 1. - Michael Somos, Oct 17 2018

Examples

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

References

  • Arthur Gill, Linear Sequential Circuits, McGraw-Hill, 1966, Eq. (17-10).

Crossrefs

Cf. A010874, A011558 (this read mod 2), A099443, A198517.

Programs

Formula

G.f.: (1+x^2)/(1 + x + x^2 + x^3 + x^4).
Sum_{i=0..n} a(i) = A198517(n). - Bruno Berselli, Nov 02 2011
From Wesley Ivan Hurt, May 31 2015: (Start)
a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4) = 0 for n > 4.
a(n) = Sum_{i=0..3} A011558(n+2+i)*(-1)^i. (End)
Euler transform of length 5 sequence [-1, 1, 0, -1, 1]. - Michael Somos, Jun 17 2015
G.f.: (1-x)*(1-x^4)/((1-x^2)*(1-x^5)). - Michael Somos, Jun 17 2015
a(n) = -a(-2-n) = a(n+5) for all n in Z. - Michael Somos, Jun 17 2015
a(n) = (2/5) * (cos(4*(n-2)*Pi/5) + cos(2*n*Pi/5) + cos(4*n*Pi/5) - cos(2*(n-3)*Pi/5) - cos(4*(n-3)*Pi/5) - cos(2*(n-1)*Pi/5) - cos(4*(n-1)*Pi/5) - cos((2*n+1)*Pi/5)). - Wesley Ivan Hurt, Sep 26 2018
a(n) = (-1)^n * A099443(n). - Michael Somos, Oct 17 2018
a(5*n) = a(5*n + 2) = 1, a(5*n + 1) = a(5*n + 3) = -1, a(5*n + 4) = 0 for all n in Z. - Michael Somos, Nov 27 2019

A234044 Period 7: repeat [2, -2, 1, 0, 0, 1, -2].

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Feb 27 2014

Keywords

Comments

This is a member of the six sequences which appear for the instance N=7 of the general formula 2*exp(2*Pi*n*I/N) = R(n, x^2-2) + x*S(n-1, x^2-2)*s(N)*I, for n >= 0, with I = sqrt(-1), s(N) = sqrt(2-x)*sqrt(2+x), x = rho(N) := 2*cos(Pi/N) and R and S are the monic Chebyshev polynomials whose coefficient tables are given in A127672 and A049310. If powers x^k with k >= delta(N) = A055034(N) enter in R or x*S then C(N, x), the minimal polynomial of x = rho(N) (see A187360) is used for a reduction. If delta(N) = 2 it may happen that sqrt(2+x) or sqrt(2-x) is an integer in the number field Q(rho(N)). See the N=5 case comment on A164116.
For N=7 with delta(7) = 3, and C(7, x) = x^3 - x^2 - 2*x + 1 the final result becomes 2*exp(2*Pi*n*I/7) = (a(n) + b(n)*x + c(n)*x^2) + (A(n) + B(n)*x + C(n)*x^2)*s(7)*I, with x = rho(7) = 2*cos(Pi/7), a(n) the present sequence, b(n) = A234045(n), c(n) = A234046(n), A(n) = A238468(n), B(n) = A238469(n) and C(n) = A238470(n). The a, b, c and A, B, C brackets are integers in Q(rho(7)).

Examples

			n = 4: 2*exp(8*Pi*I/7) = (2-16*x^2+20*x^4-8*x^6+x^8) + (4*x+10*x^3-6*x^5+x^7)*s(7)*I, reduced with C(7, x) = x^3 - x^2 - 2*x + 1 = 0 this becomes = (-x) + (-1)*s(7)*I with x= 2*cos(Pi/7) and s(7) = 2*sin(Pi/7).The power basis coefficients are thus (a(4), b(4), c(4)) = (0, -1, 0) and (A(4), B(4), C(4)) = (-1, 0, 0).
		

Crossrefs

Cf. A234045, A234046, A238468, A238469, A238470, A099837 (N=3), A056594 (N=4), A164116 (N=5), A057079 (N=6).

Programs

Formula

G.f.: (2 - 2*x + x^2 + x^5 - 2*x^6)/(1 - x^7).
a(n+7) = a(n) for n>=0, with a(0) = -a(1) = -a(6) = 2, a(3) = a(4) =0 and a(2) = a(5) = 1.
From Wesley Ivan Hurt, Jul 16 2016: (Start)
a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5) + a(n-6) = 0 for n>5.
a(n) = (1/7) * Sum_{k=1..6} 2*cos((2k)*n*Pi/7) - 2*cos((2k)*(1+n)*Pi/7) + cos((2k)*(2+n)*Pi/7) + cos((2k)*(5+n)*Pi/7) - 2*cos((2k)*(6+n)*Pi/7).
a(n) = 2 + 4*floor(n/7) - 3*floor((1+n)/7) + floor((2+n)/7) - floor((4+n)/7) + 3*floor((5+n)/7) - 4*floor((6+n)/7). (End)

A164115 Expansion of (1 - x^5) / ((1 - x) * (1 - x^4)) in powers of x.

Original entry on oeis.org

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

Views

Author

Michael Somos, Aug 10 2009

Keywords

Comments

The sequence A107453 has the same terms but different offset.
Convolution inverse of A164116.
Decimal expansion of 11111/99990. - Elmo R. Oliveira, Feb 18 2024

Examples

			1 + x + x^2 + x^3 + 2*x^4 + x^5 + x^6 + x^7 + 2*x^8 + x^9 + x^10 + ...
		

Crossrefs

Programs

  • Magma
    m:=100; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+x+x^2+x^3+x^4)/(1-x^4))); // G. C. Greubel, Sep 22 2018
  • Mathematica
    CoefficientList[Series[(1+x+x^2+x^3+x^4)/(1-x^4), {x, 0, 100}], x] (* G. C. Greubel, Sep 22 2018 *)
    LinearRecurrence[{0,0,0,1},{1,1,1,1,2},120] (* or *) PadRight[{1},120,{2,1,1,1}] (* Harvey P. Dale, Aug 24 2019 *)
  • PARI
    {a(n) = 2 - (n==0) - (n%4>0)}
    
  • PARI
    x='x+O('x^99); Vec((1-x^5)/((1-x)*(1-x^4))) \\ Altug Alkan, Sep 23 2018
    

Formula

Euler transform of length-5 sequence [ 1, 0, 0, 1, -1].
a(n) is multiplicative with a(2) = 1, a(2^e) = 2 if e>1, a(p^e) = 1 if p>2.
a(n) = (-1)^n * A164117(n).
a(4*n) = 2 unless n=0. a(2*n + 1) = a(4*n + 2) = 1.
a(-n) = a(n). a(n+4) = a(n) unless n=0 or n=-4.
G.f.: (1 + x + x^2 + x^3 + x^4) / ((1+x)*(1-x)*(1+x^2)).
a(n) = A138191(n+2), n>0. - R. J. Mathar, Aug 17 2009
Dirichlet g.f. (1+1/4^s)*zeta(s). - R. J. Mathar, Feb 24 2011
a(n) = (i^n + (-i)^n + (-1)^n + 5)/4 for n > 0 where i is the imaginary unit. - Bruno Berselli, Feb 25 2011

A164118 Expansion of (1 - x^2) * (1 - x^4) * (1 - x^5) / ((1 - x) * (1 - x^10)) in powers of x.

Original entry on oeis.org

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

Views

Author

Michael Somos, Aug 10 2009

Keywords

Crossrefs

A164116(n) = (-1)^n * a(n). Convolution inverse of A164117.

Programs

  • Mathematica
    CoefficientList[Series[(1 - x^4) / (1 - x + x^2 - x^3 + x^4), {x, 0, 50}], x] (* G. C. Greubel, Sep 12 2017 *)
  • PARI
    {a(n) = -(n==0) + [2, 1, 0, 0, -1, -2, -1, 0, 0, 1][n%10 + 1]}

Formula

Euler transform of length 10 sequence [ 1, -1, 0, -1, -1, 0, 0, 0, 0, 1].
a(-n) = a(n). a(n + 5) = -a(n) unless n=0 or n=-5.
G.f.: (1 - x^4) / (1 - x + x^2 - x^3 + x^4).

A257181 Expansion of (1 - x) * (1 + x^4) / (1 + x^5) in powers of x.

Original entry on oeis.org

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

Views

Author

Michael Somos, Apr 17 2015

Keywords

Examples

			G.f. = 1 - x + x^4 - 2*x^5 + x^6 - x^9 + 2*x^10 - x^11 + x^14 - 2*x^15 + ...
		

Crossrefs

Programs

  • Magma
    m:=60; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x)*(1+x^4)/(1+x^5))); // G. C. Greubel, Aug 02 2018
  • Mathematica
    a[ n_] := -Boole[n == 0] + {-1, 0, 0, 1, -2, 1, 0, 0, -1, 2}[[Mod[n, 10, 1]]];
    a[ n_] := SeriesCoefficient[ (1 - x) * (1 + x^4) / (1 + x^5), {x, 0, Abs@n}];
    CoefficientList[Series[(1-x)*(1+x^4)/(1+x^5), {x, 0, nmax}], x] (* G. C. Greubel, Aug 02 2018 *)
  • PARI
    {a(n) = if( n==0, 1, (-1)^(n\5) * [2, -1, 0, 0, 1][n%5 + 1])};
    
  • PARI
    {a(n) = polcoeff( (1 - x) * (1 + x^4) / (1 + x^5) + x * O(x^abs(n)), abs(n))};
    
  • PARI
    x='x+O('x^60); Vec((1-x)*(1+x^4)/(1+x^5)) \\ G. C. Greubel, Aug 02 2018
    

Formula

Euler transform of length 10 sequence [-1, 0, 0, 1, -1, 0, 0, -1, 0, 1].
a(n) = a(-n) for all n in Z. a(n+5) = -a(n) unless n = 0 or -5. a(5*n) = 2 * (-1)^n unless n = 0. a(5*n + 2) = a(5*n + 3) = 0. a(5*n + 1) = a(5*n - 1) = -(-1)^n.
G.f.: (1 - x) * (1 + x^4) / (1 + x^5).
G.f.: (1 - x) * (1 - x^5) * (1 - x^8) / ((1 - x^4) * (1 - x^10)).
Convolution inverse is A257179.
a(n) = (-1)^floor( (n+4) / 5) * A164116(n).
Showing 1-10 of 10 results.