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

A061347 Period 3: repeat [1, 1, -2].

Original entry on oeis.org

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

Views

Author

Jason Earls, Jun 07 2001

Keywords

Comments

WARNING: It is unclear whether this sequence should start at offset 1 (as written) or offset 0 (in analogy to many similar sequences, which seems to be assumed in many of the given formulas).
Inverse binomial transform of A057079. - Paul Barry, May 15 2003
The unsigned version, with g.f. (1 + x + 2*x^2)/(1 - x^3), has a(n) = 4/3 -cos(2*Pi*n/3)/3 - sqrt(3)*sin(2*Pi*n/3)/3 = gcd(Fib(n+4), Fib(n+1)). - Paul Barry, Apr 02 2004
a(n) = L(n-2,-1), where L is defined as in A108299; see also A010892 for L(n,+1). - Reinhard Zumkeller, Jun 01 2005
From the Taylor expansion of log(1 + x + x^2) at x = 1, Sum_{k > 0} a(k)/k = log(3) = A002391. This is case n = 3 of the general expression Sum_{k > 0} (1-n*!(k mod n))/k = log(n). - Jaume Oliver Lafont, Oct 16 2009
If used with offset zero, a non-simple continued fraction representation of 2+sqrt(2). - R. J. Mathar, Mar 08 2012
Periodic sequences of this type can be also calculated by 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 length. 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. Than c := min, p := max - min + 1 and q := p^m*Sum_{i=1..m} (D(i)-min)/p^i. Example: D = (1, 1, -2), c = -2, p = 4 and q = 60 for this sequence. - Hieronymus Fischer, Jan 04 2013
This is the Dirichlet inverse of A117997. - Petros Hadjicostas, Jul 25 2020

Examples

			G.f.: x + x^2 - 2*x^3 + x^4 + x^5 - 2*x^6 + x^7 + x^8 - 2*x^9 + ... - _Michael Somos_, Nov 27 2019
		

Crossrefs

Apart from signs, same as A057079 (also bin. Transf), A100063. Cf. A000045, A010892 for the rules a(n) = a(n - 1) + a(n - 2), a(n) = a(n - 1) - a(n - 2). a(n) = - a(n - 1) + a(n - 2) gives a signed version of Fibonacci numbers.
Alternating row sums of A130777: repeat(1,-2,1).

Programs

  • GAP
    Flat(List([1..50],n->[1,1,-2])); # Muniru A Asiru, Aug 02 2018
  • Magma
    &cat [[1, 1, -2]^^30]; // Wesley Ivan Hurt, Jul 01 2016
    
  • Maple
    seq(op([1, 1, -2]), n=1..50); # Wesley Ivan Hurt, Jul 01 2016
  • Mathematica
    a[n_] := {1, 1, -2}[[Mod[n - 1, 3] + 1]]; Table[a[n], {n, 108}] (* Jean-François Alcover, Jul 19 2013 *)
    PadRight[{}, 90, {1, 1, -2}] (* After Harvey P. Dale, or *)
    CoefficientList[ Series[(2x + 1)/(x^2 + x + 1), {x, 0, 89}], x]  (* or *)
    LinearRecurrence[{-1, -1}, {1, 1}, 90] (* Robert G. Wilson v, Jul 30 2018 *)
  • PARI
    a(n)=1-3*!(n%3) \\ Jaume Oliver Lafont, Oct 16 2009
    
  • Sage
    def A061347():
        x, y = -1, -1
        while True:
            yield -x
            x, y = y, -x -y
    a = A061347(); [next(a) for i in range(40)] # Peter Luschny, Jul 11 2013
    

Formula

With offset zero, a(n) = A057079(2n). a(n) = -a(n-1) - a(n-2) with a(0) = a(1) = 1.
From Mario Catalani (mario.catalani(AT)unito.it), Jan 07 2003: (Start)
G.f.: x*(1 + 2*x)/(1 + x + x^2).
a(n) = (-1)^floor(2n/3) + ((-1)^floor((2n-1)/3) + (-1)^floor((2n+1)/3))/2. (End)
a(n) = -2*cos(2*Pi*n/3). - Jaume Oliver Lafont, May 06 2008
Dirichlet g.f.: zeta(s)*(1-1/3^(s-1)). - R. J. Mathar, Feb 09 2011
a(n) = n * Sum_{k=1..n} binomial(k,n-k)/k*(-1)^(k+1). - Dmitry Kruchinin, Jun 03 2011
a(n) = -2 + floor(110/333*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 04 2013
a(n) = -2 + floor(20/21*4^(n+1)) mod 4. - Hieronymus Fischer, Jan 04 2013
a(n) = a(n-3) for n > 3. - Wesley Ivan Hurt, Jul 01 2016
E.g.f.: 2 - 2*cos(sqrt(3)*x/2)*exp(-x/2). - Ilya Gutkovskiy, Jul 01 2016
a(n) = (-1)^n*hypergeom([-n/2-1, -n/2-3/2], [-n-2], 4). - Peter Luschny, Dec 17 2016
a(n) = A000032(n) - A007040(n), for n > 1. - Wojciech Florek, Feb 20 2018

Extensions

Better definition from M. F. Hasler, Jan 13 2013

A007039 Number of cyclic binary n-bit strings with no alternating substring of length > 2.

Original entry on oeis.org

2, 2, 2, 6, 12, 20, 30, 46, 74, 122, 200, 324, 522, 842, 1362, 2206, 3572, 5780, 9350, 15126, 24474, 39602, 64080, 103684, 167762, 271442, 439202, 710646, 1149852, 1860500, 3010350, 4870846, 7881194, 12752042, 20633240, 33385284, 54018522, 87403802, 141422322
Offset: 1

Views

Author

Keywords

Comments

John W. Layman observes that the second differences give the sequence shifted to the right.

Examples

			G.f. = 2*x + 2*x^2 + 2*x^3 + 6*x^4 + 12*x^5 + 20*x^6 + 30*x^7 + 46*x^8 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[2*(1+x)*(1-2*x+2*x^2)/((1-x+x^2)*(1-x-x^2)),{x,0,40}],x] (* Vincenzo Librandi, Apr 16 2012 *)
    a[n_ /; n<4] = 2; a[4] = 6; a[n_] := a[n] = 2*a[n-1] - a[n-2] + a[n-4]; Array[a, 39] (* Jean-François Alcover, Oct 08 2017 *)
  • PARI
    Vec(2*x*(1-x+2*x^3)/((1-x-x^2)*(1-x+x^2))+O(x^66)) \\ Joerg Arndt, Oct 27 2015

Formula

For n >= 5, a(n) = 2a(n-1) - a(n-2) + a(n-4). - David W. Wilson
G.f.: 2*x*(1+x)*(1-2*x+2*x^2)/((1-x+x^2)*(1-x-x^2)). - Colin Barker, Mar 28 2012
a(n) = A000032(n) + A057079(n + 1). - John M. Campbell, Dec 29 2016
a(n) = abs(A111734(n)). - Alois P. Heinz, Oct 08 2017
E.g.f.: 2*exp(x/2)*(cos(sqrt(3)*x/2) + cosh(sqrt(5)*x/2)) - 4. - Stefano Spezia, Mar 09 2025

A100886 Expansion of x*(1+3*x+2*x^2)/((1+x+x^2)*(1-x-x^2)).

Original entry on oeis.org

0, 1, 3, 3, 5, 10, 14, 23, 39, 61, 99, 162, 260, 421, 683, 1103, 1785, 2890, 4674, 7563, 12239, 19801, 32039, 51842, 83880, 135721, 219603, 355323, 574925, 930250, 1505174, 2435423, 3940599, 6376021, 10316619, 16692642, 27009260, 43701901
Offset: 0

Views

Author

Creighton Dement, Nov 21 2004

Keywords

Comments

This sequence was investigated in cooperation with Paul Barry.
Generating floretion: - 0.5'i - 0.5'k - 0.5j' - 0.5'ii' + 0.5'jj' - 0.5'kk' + 0.5'ik' - 0.5'ki' ("tes").
From Joshua P. Bowman, Sep 28 2023: (Start)
a(n) is equal to the number of circular binary sequences of length n+1 with an even number of 0's and no consecutive 1's. A circular binary sequence is a finite sequence of 0's and 1's for which the first and last digits are considered to be adjacent. Rotations are distinguished from each other.
a(n) is also equal to the number of matchings in the cycle graph C_{n+1} for which the number of edges plus the number of unmatched vertices is even.
a(n) is also equal to the number of circular compositions of n+1 into an even number of 1's and 2's. (End)

Examples

			When counting circular binary sequences with an even number of 0's and no consecutive 1's, the sequence "1" is not allowed because the 1 is considered to be adjacent to itself. Thus a(0)=0. For n=2, the a(2)=3 allowed sequences of length 3 are 001, 010, and 100. For n=3, the a(3)=3 allowed sequences of length 4 are 0000, 0101, and 1010. - _Joshua P. Bowman_, Sep 28 2023
		

Crossrefs

Programs

  • Magma
    I:=[0,1,3,3]; [n le 4 select I[n] else Self(n-2)+2*Self(n-3)+Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jul 30 2015
  • Mathematica
    a[0] = 0; a[1] = 1; a[2] = 3; a[3] = 3; a[n_] := a[n] = a[n - 2] + 2a[n - 3] + a[n - 4]; Table[ a[n], {n, 0, 36}]
    (* Or *) CoefficientList[ Series[x(1 + 3x + 2x^2)/((1 + x + x^2)(1 - x - x^2)), {x, 0, 36}], x] (* Robert G. Wilson v, Nov 26 2004 *)
    LinearRecurrence[{0,1,2,1},{0,1,3,3},40] (* Harvey P. Dale, Apr 04 2016 *)
  • Maxima
    a(n):=n*sum(binomial(k,n-k)*(if oddp(k) then 0 else 1/k),k,1,n); /* Vladimir Kruchinin, Apr 09 2011 */
    
  • PARI
    a(n)=n*sum(j=1,n\2,k=2*j;binomial(k,n-k)/k);
    vector(66,n,a(n)) /* Joerg Arndt, Apr 09 2011 */
    
  • PARI
    concat([0],Vec(x*(1+3*x+2*x^2)/((1+x+x^2)*(1-x-x^2))+O(x^66))) /* Joerg Arndt, Apr 09 2011 */
    

Formula

(1/2)*(a(n) + A100887(n) - A100888(n)) = A061347(n+3).
a(n) = (L(n+1)-A061347(n+1))/2, L=A000032; [corrected by Wojciech Florek, Feb 26 2018]
a(n) = a(n-2) + 2*a(n-3) + a(n-4), a(0) = 0, a(1) = 1, a(2) = 3, a(3) = 3.
a(n) = n*Sum_{j=1..floor(n/2)} binomial(2*j,n-2*j)/(2*j). - Vladimir Kruchinin, Apr 09 2011 (with offset 1, cf. PARI code)
a(n) = floor(phi^(n+1)/2), n mod 3 = 0,1; a(n) = floor((phi^(n+1)+3)/2), n mod 3 = 2, phi = (1 + sqrt(5))/2; from Binet's formula or the relation to the Lucas numbers A000032. - Wojciech Florek, Mar 03 2018
a(n) = A000032(n+1) - A366043(n+1). - Joshua P. Bowman, Sep 28 2023

Extensions

More terms from Robert G. Wilson v, Nov 26 2004

A294627 Expansion of x*(1 + x)/((1-2*x)*(1+x+x^2)).

Original entry on oeis.org

0, 1, 2, 3, 7, 14, 27, 55, 110, 219, 439, 878, 1755, 3511, 7022, 14043, 28087, 56174, 112347, 224695, 449390, 898779, 1797559, 3595118, 7190235, 14380471, 28760942, 57521883, 115043767, 230087534, 460175067, 920350135, 1840700270, 3681400539, 7362801079, 14725602158, 29451204315
Offset: 0

Views

Author

Wojciech Florek, Feb 12 2018

Keywords

Comments

A generalized tribonacci (A001590) sequence.
For n > 2, 6*a(n) is the number of quaternary sequences of length n in which all triples (q(i),q(i+1),q(i+2)) contain two (arbitrarily chosen) digits, e.g., 0 and 3.
Similarly, recurrences a(n) = a(n-1) + a(n-2) + k*a(n-3) are related to binary (k=0, the Fibonacci sequence A000045), ternary (k=1, the tribonacci sequence A001590), quinary (k=3) and so on sequences with all triples (t(i),t(i+1),t(i+2)) containing two (arbitrarily chosen) digits (usually 0 and k+1).
For n > 0, a(n) is the number of ways to tile a strip of length n with squares, dominoes, and two colors of trominoes, with the restriction that the first tile cannot be a tromino. - Greg Dresden and Bora Bursalı, Aug 31 2023
For n > 1, a(n) is the number of ways to tile a strip of length n-2 with squares, dominoes, and two colors of trominoes, where the strip begins with an upper level of two cells. For example, when n=7 we have this strip of length 5:
_
|||_____
|||_|||. - Guanji Chen and Greg Dresden, Jun 17 2024

Examples

			For n=4 there are 6*7=42 quaternary sequences of length 4 such that each triple (i.e., exactly two of them: q1,q2,q3 and q2,q3,q4) contain both 0 and 3. They are 003x, 030x, 03y0, 0330, 330x, 303x, 30y3, 3003, 0y30, 3y03, y03x, y30x, where x=0,1,2,3 and y=1,2.
		

Crossrefs

Cf. A000045, A001590, A007040, A033129 (partial sums), A078043, A167373.

Programs

  • Mathematica
    LinearRecurrence[{1, 1, 2}, {0, 1, 2}, 50] (* Paolo Xausa, Aug 28 2024 *)
  • PARI
    my(x='x+O('x^99)); concat(0, Vec(x*(1+x)/(1-x-x^2-2*x^3))) \\ Altug Alkan, Mar 03 2018

Formula

a(n) = a(n-1) + a(n-2) + 2*a(n-3) for n > 2.
a(n+1)/a(n) tends to 2, the unique real root of x^3 - x^2 - x - 2 = 0.
a(n+1) = abs(A078043(n)).
7*a(n) = 3*2^n - A167373(n+1). - R. J. Mathar, Mar 24 2018
E.g.f.: exp(-x/2)*(9*exp(5*x/2) - 9*cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2))/21. - Stefano Spezia, Aug 29 2024

A316660 Number of n-bit binary necklaces (unmarked cyclic n-bit binary strings) containing no runs of length > 2.

Original entry on oeis.org

0, 1, 2, 2, 2, 5, 4, 7, 10, 14, 18, 31, 40, 63, 94, 142, 210, 329, 492, 765, 1170, 1810, 2786, 4341, 6712, 10461, 16274, 25414, 39650, 62075, 97108, 152287, 238838, 375166, 589526, 927555, 1459960, 2300347, 3626242, 5721044, 9030450, 14264309, 22542396, 35646311, 56393862
Offset: 1

Views

Author

Petros Hadjicostas, Jul 09 2018

Keywords

Comments

This is the "unmarked" version of sequence A007040. An unmarked cyclic string is a necklace. Notice that we define a(1) = 0 and a(2) = 1 because wrapping around the circle is allowed here (otherwise we would have to let a(1) = 2 and a(2) = 3).
Let q and m be positive integers. We denote by f1(m,q,n) the number of marked cyclic q-ary strings of length n that contain no runs of lengths > m when no wrapping around is allowed, and by f2(m,q,n) when wrapping around is allowed.
It is clear that f1(m,q,n) = f2(m,q,n) for n > m, but f1(m,q,n) = q^n and f2(m,q,n) = q^n - q when 1 <= n <= m.
Burstein and Wilf (1997) and Edlin and Zeilberger (2000) considered f1(m,q,n) while Hadjicostas and Zhang considered f2(m,q,n).
Let g(m, q, x) = (m+1-m*q*x)/(1-q*x+(q-1)*x^(m+1)) - (m+1)/(1-x^(m+1)).
By generalizing Moser (1993), Burstein and Wilf (1997) proved that the g.f. of the numbers f1(m,q,n) is F1(m,q,x) = ((1-x^m)/(1-x))*(q*x + (q-1)*x* g(m, q, x)).
Using the above formula by Burstein and Wilf (1997), Hadjicostas and Zhang (2018) proved that the g.f. of the numbers f2(m,q,n) is F2(m,q,x) = ((q-1)*x*(1-x^m)/(1-x))*g(m, q, x).
If f3(m,q,n) is the number of q-ary necklaces (= unmarked cyclic strings) of length n with no runs of length > m (and wrapping around is allowed), then f3(m,q,n) = (1/n)*Sum_{d|n} phi(n/d)*f2(m,q,d), where phi(.) is Euler's totient function. Using this formula and F2(m,q,x), Hadjicostas and Zhang (2018) proved that the g.f. of the numbers f3(m,q,n) is given by F3(m,q,x) = -(q-1)*x*(1-x^m)/((1-x)*(1-x^(m+1))) - Sum_{s>=1} (phi(s)/s)*log(1 - (q-1)*(x^s - x^(s*(m+1)))/(1-x^s)).
If A(x) is the g.f. of the current sequence (a(n): n >= 1), we have A(x) = F3(m=2, q=2, x). Also, a(n) = f3(m=2, q=2, n) = (1/n)*Sum_{d|n} phi(n/d)*f2(m=2, q=2, d). Note that f2(m=2, q=2, n=1) = 0 and f2(m=2, q=2, n) = A007040(n) for n >= 2.

Examples

			For n=1 we have no allowable necklaces (because the strings 0 and 1 can be wrapped around themselves on a circle, and thus they contain runs of length > 2).
For n=2, the only allowable necklace is 01 (because 00 and 11 can be wrapped around themselves on a circle, and thus they contain runs of length > 2).
For n=3, the allowable necklaces are 011 and 100.
For n=4, the allowable necklaces are 0011 and 1010.
For n=5, the allowable necklaces are 01010 and 10101.
For n=6, the allowable necklaces are 010101, 001001, 110110, 101001, and 010110.
		

Crossrefs

Programs

  • PARI
    a(n) = (1/n) * sumdiv(n, d, eulerphi(n/d)*(fibonacci(d-1)+fibonacci(d+1))) - sign(n%3); \\ Michel Marcus, Jul 10 2018; using 2nd formula

Formula

For proofs of the following formulae, see the comments above.
a(n) = (1/n)*Sum_{d|n} phi(n/d)*A007040(d)*I(d > 1), where I(condition) = 1 if the condition holds, and 0 otherwise.
a(n) = A000358(n) - A011655(n). (This formula is the "unmarked" version of E. W. Weisstein's formula that can be found in the comments for sequence A007040.)
a(p) = A007040(p)/p for p prime >= 2.
G.f.: A(x) = -x*(1+x)/(1-x^3) - Sum_{s>=1} (phi(s)/s)*log(1 - x^s - x^(2*s)) = (g.f. of A000358) - (g.f. of A011655).

Extensions

More terms from Michel Marcus, Jul 10 2018

A316699 Number of (marked) cyclic n-bit binary strings containing no runs of length > 3.

Original entry on oeis.org

2, 4, 8, 14, 20, 38, 70, 134, 240, 442, 814, 1502, 2756, 5070, 9326, 17158, 31552, 58034, 106742, 196334, 361108, 664182, 1221622, 2246918, 4132720, 7601258, 13980894, 25714878, 47297028, 86992798
Offset: 1

Views

Author

Petros Hadjicostas, Jul 10 2018

Keywords

Comments

Let q and m be positive integers. We denote by f1(m,q,n) the number of (marked) cyclic q-ary strings of length n that contain no runs of lengths > m when no wrapping around is allowed, and by f2(m,q,n) when wrapping around is allowed.
It is clear that f1(m,q,n) = f2(m,q,n) for n > m, but f1(m,q,n) = q^n and f2(m,q,n) = q^n - q when 1 <= n <= m.
Burstein and Wilf (1997) and Edlin and Zeilberger (2000) considered f1(m,q,n) while Hadjicostas and Zhang considered f2(m,q,n).
Let g(m, q, x) = (m+1-m*q*x)/(1-q*x+(q-1)*x^(m+1)) - (m+1)/(1-x^(m+1)).
Burstein and Wilf (1997) proved that the g.f. of the numbers f1(m,q,n) is F1(m,q,x) = ((1-x^m)/(1-x))*(q*x + (q-1)*x* g(m, q, x)).
Using the above formula by Burstein and Wilf (1997), Hadjicostas and Zhang (2018) proved that the g.f. of the numbers f2(m,q,n) is F2(m,q,x) = ((q-1)*x*(1-x^m)/(1-x))*g(m, q, x).
A necklace is an unmarked cyclic string. If f3(m,q,n) is the number of q-ary necklaces of length n with no runs of length > m (and wrapping around is allowed), then f3(m,q,n) = (1/n)*Sum_{d|n} phi(n/d)*f2(m,q,d), where phi(.) is Euler's totient function. Using this formula and F2(m,q,x), Hadjicostas and Zhang (2018) proved that the g.f. of the numbers f3(m,q,n) is given by F3(m,q,x) = -(q-1)*x*(1-x^m)/((1-x)*(1-x^(m+1))) - Sum_{s>=1} (phi(s)/s)*log(1 - (q-1)*(x^s - x^(s*(m+1)))/(1-x^s)).
For the current sequence, we have q = 2 and m = 3. We have a(n) = f1(m=3, q=2, n) = f2(m=3, q=2, n) for n >= 4, but we have f1(m=3, q=2, n) = 2^n and f2(m=3, q=2, n) = 2^n - 2 for n = 1,2,3.
If A(x) is the g.f. of the current sequence, we have A(x) = F1(m=3,q=2, x) = F2(m=3, q=2, x) + 2*(x+x^2+x^3).
When m = 1 and q = 3, we have f1(m=1, q=3, n) = number of marked cyclic words on three letters with no two consecutive like letters. We have f1(m=1, q=3, n) = A092297(n) for n >= 2. This was first stated in the comments of that sequence by G. Critzer.
When m = 1 and q = 4, we have f1(m=1, q=4, n) = number of marked cyclic words on four letters with no two consecutive like letters. We have f1(m=1, q=4, n) = A218034(n) for n >= 1. This was first stated in the comments of that sequence by J. Arndt.
When m=2 and q=2, we have f1(m=2, q=2, n) = number of marked cyclic words on two letters containing no runs of length > 2. We have f1(m=2, q=2, n) = A007040(n) for n >= 3.
A generalization of the above formula by Burstein and Wilf (1997) was given by Taylor (2014) in Section 5 of his paper.

Examples

			For n=4, we have a(4) = 2^4 - 2 = 14 because we exclude 0000 and 1111.
For n=5, we have a(5) = 2^5 - 12 = 20 because we exclude 11111, 11110, 11101, 11011, 10111, 01111, and the same 6 strings with 0 switched with 1.
For n=6, we have a(6) = 2^6 - 26 = 38 because we exclude 111100, 111001, 110011, 100111, 001111, 011110, 111110, 111101, 111011, 110111, 101111, 011111, 111111, and the same 13 strings with 0 switched with 1.
		

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 2*x*(1+ x+x^2)*(1+x+x^2+x^3-3*x^4-2*x^5-x^6)/( (1+x)*(1+x^2)*(1-x-x^2-x^3)) )); // G. C. Greubel, Apr 23 2019
    
  • Mathematica
    Rest[CoefficientList[Series[2*x*(1+x+x^2)*(1+x+x^2+x^3-3*x^4-2*x^5-x^6)/( (1+x)*(1+x^2)*(1-x-x^2-x^3)), {x, 0, 40}], x]] (* G. C. Greubel, Apr 23 2019 *)
  • PARI
    my(x='x+O('x^40)); Vec(2*x*(1+x+x^2)*(1+x+x^2+x^3-3*x^4-2*x^5-x^6)/( (1+x)*(1+x^2)*(1-x-x^2-x^3))) \\ G. C. Greubel, Apr 23 2019
    
  • Sage
    a=(2*x*(1+x+x^2)*(1+x+x^2+x^3-3*x^4-2*x^5-x^6)/( (1+x)*(1+x^2)*(1-x-x^2-x^3))).series(x, 40).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Apr 23 2019

Formula

a(n) = A001644(n) + cos(n*Pi) + 2*cos(n*Pi/2) = A001644(n) - A176563(n+1) for n >= 4.
G.f.: 2*x*(1+x+x^2)*(1+x+x^2+x^3-3*x^4-2*x^5-x^6)/( (1+x)*(1+x^2)*(1-x-x^2-x^3) ).
a(n) = a(n-2) + 2*a(n-3) + 3*a(n-4) + 2*a(n-5) + a(n-6) for n>9. - Colin Barker, Jul 28 2019

A294429 Number of zero-energy ground states for one-dimensional periodic fermions with n sites.

Original entry on oeis.org

1, 2, 4, 6, 12, 20, 36, 54, 108, 172, 324, 530, 984, 1672, 3028, 5232, 9388
Offset: 0

Views

Author

N. J. A. Sloane, Nov 07 2017

Keywords

Crossrefs

Showing 1-7 of 7 results.