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

A057711 a(0)=0, a(1)=1, a(n) = n*2^(n-2) for n >= 2.

Original entry on oeis.org

0, 1, 2, 6, 16, 40, 96, 224, 512, 1152, 2560, 5632, 12288, 26624, 57344, 122880, 262144, 557056, 1179648, 2490368, 5242880, 11010048, 23068672, 48234496, 100663296, 209715200, 436207616, 905969664, 1879048192, 3892314112, 8053063680
Offset: 0

Views

Author

Bernhard Wolf (wolf(AT)cs.tu-berlin.de), Oct 24 2000

Keywords

Comments

Number of states in the planning domain FERRY, when n-3 cars are at one of two shores while the (n-2)nd car may be on the ferry or at one of the shores.
If the ferry could board any number of cars (instead of only one), the number of states would form the Pisot sequence P(2,6) (A008776). In addition, if k shores existed, the sequence would form the Pisot sequence P(k,k(k+1)). This corresponds to the BRIEFCASE planning domain.
a(i) is the number of occurrences of the number 1 in all palindromic compositions of n = 2*(i+1). - Silvia Heubach (sheubac(AT)calstatela.edu), Jan 10 2003. E.g., there are 5 palindromic compositions of 6, namely 111111 11211 2112 1221 141, containing a total of 16 1's.
Number of occurrences of 00's in all circular binary words of length n. Example: a(3)=6 because in the circular binary words 000, 001, 010, 011, 100, 101, 110 and 111 we have a total of 3+1+1+0+1+0+0+0=6 occurrences of 00. a(n) = Sum_{k=0..n} k*A119458(n,k). - Emeric Deutsch, May 20 2006
a(n) is the number of permutations on [n] for which the entries of each left factor form a circular subinterval of [n]. A subset I of [n] forms a circular subinterval of [n] if it is an ordinary interval [a,b] or has the form [1,a]-union-[b,n] for 1 <= a < b <= n. For example, (5,4,2) is a left factor of the permutation (5,4,2,1,3) which does not form a circular subinterval of [5] and a(4)=16 counts all 24 permutations of [4] except the eight whose first two entries are 1,3 (in either order) or 2,4. - David Callan, Mar 30 2007
a(n) is the total number of runs in all Boolean (n-1)-strings. For example, the 8 Boolean 3-strings, 000, 001, 010, 011, 100, 101, 110, 111 have 1, 2, 3, 2, 2, 3, 2, 1 runs respectively. - David Callan, Jul 22 2008
From Gary W. Adamson, Jul 31 2010: (Start)
Starting with "1" = (1, 2, 4, 8, ...) convolved with (1, 0, 2, 4, 8, ...).
Example: a(6) = 96 = (32, 16, 8, 4, 2, 1) dot (1, 0, 2, 4, 8, 16) = (32 + 0 + 16 + 16 + 16, + 16) = 32 + 4*16 (End)
An elephant sequence, see A175654. For the corner squares 24 A[5] vectors, with decimal values between 27 and 432, lead to this sequence (without the leading 0). For the central square these vectors lead to the companion sequence A087447 (without the first leading 1). - Johannes W. Meijer, Aug 15 2010
Starting with 1 = (1, 1, 2, 4, 8, 16, ...) convolved with (1, 1, 3, 7, 15, 31, ...). - Gary W. Adamson, Oct 26 2010
a(n) is the number of ways to draw simple polygonal chains for n vertices lying on a circle. - Anton Zakharov, Dec 31 2016
Also the number of edges, maximal cliques, and maximum cliques in the n-folded cube graph for n > 3. - Eric W. Weisstein, Dec 01 2017 and Mar 21 2018
Number of pairs of compositions of n corresponding to a seaweed algebra of index n-2 for n > 2. - Nick Mayers, Jun 25 2018
Starting with 1, 2, 6, 16, ..., number of permutations of length n>0 avoiding the partially ordered pattern (POP) {1>2, 1>3} of length 4. That is, number of length n permutations having no subsequences of length 4 in which the first element is larger than the second and third elements. - Sergey Kitaev, Dec 08 2020

Examples

			a(1)=6 because the palindromic compositions of n=4 are 4, 1+2+1, 1+1+1+1 and 2+2 and they contain 6 ones. - Silvia Heubach (sheubac(AT)calstatela.edu), Jan 10 2003
		

Crossrefs

Pisot sequence P(2, 6) (A008776), Pisot sequence P(k, k(k+1))
Cf. A119458.

Programs

  • Magma
    [Ceiling(n*2^(n-2)) : n in [0..40]]; // Vincenzo Librandi, Sep 22 2011
    
  • Mathematica
    Join[{0, 1}, Table[n 2^(n - 2), {n, 2, 30}]] (* Eric W. Weisstein, Dec 01 2017 *)
    Join[{0, 1}, LinearRecurrence[{4, -4}, {2, 6}, 20]] (* Eric W. Weisstein, Dec 01 2017 *)
    CoefficientList[Series[x (1 - 2 x + 2 x^2)/(1 - 2 x)^2, {x, 0, 20}], x] (* Eric W. Weisstein, Dec 01 2017 *)
  • PARI
    a(n)=ceil(n*2^(n-2)) \\ Charles R Greathouse IV, Oct 31 2011
    
  • PARI
    x='x+O('x^50); concat(0, Vec(x*(1-2*x+2*x^2)/(1-2*x)^2)) \\ Altug Alkan, Nov 01 2015

Formula

a(n) = ceiling(n*2^(n-2)).
Binomial transform of (0, 1, 0, 3, 0, 5, 0, 7, ...).
From Paul Barry, Apr 06 2003: (Start)
a(0)=0, a(n) = n*(0^(n-1) + 2^(n-1))/2, n > 0.
a(n) = Sum_{k=0..n} binomial(n, 2k+1)*(2k+1).
E.g.f.: x*exp(x)*cosh(x). (End)
The sequence 1, 1, 6, 16, ... is the binomial transform of A016813 with interpolated zeros. - Paul Barry, Jul 25 2003
For n > 1, a(n) = Sum_{k=0..n} (k-n/2)^2 C(n, k). (n+1)*a(n) = A001788(n). - Mario Catalani (mario.catalani(AT)unito.it), Nov 26 2003
From Paul Barry, May 07 2004: (Start)
a(n) = n*2^(n-2) - Sum_{k=0..n} binomial(n, k)*k*(-1)^k.
G.f.: x*(1-2*x+2*x^2)/(1-2*x)^2. (End)
a(n+1) = ceiling(binomial(n+1,1)*2^(n-1)). - Zerinvary Lajos, Nov 01 2006
a(n+1) = Sum_{k=0..n} A196389(n,k)*2^k. - Philippe Deléham, Oct 31 2011
a(0)=0, a(1)=1, a(2)=2, a(3)=6, a(n+1) = 4*a(n)-4*a(n-1) for n >= 3. - Philippe Deléham, Feb 20 2013
a(n) = A002064(n-1) - A002064(n-2), for n >= 2. - Ivan N. Ianakiev, Dec 29 2013
From Amiram Eldar, Aug 05 2020: (Start)
Sum_{n>=1} 1/a(n) = 4*log(2) - 1.
Sum_{n>=1} (-1)^(n+1)/a(n) = 4*log(3/2) - 1. (End)

A006490 a(1) = 1, a(2) = 0; for n > 2, a(n) = n*Fibonacci(n-2) (with the convention Fibonacci(0)=0, Fibonacci(1)=1).

Original entry on oeis.org

1, 0, 3, 4, 10, 18, 35, 64, 117, 210, 374, 660, 1157, 2016, 3495, 6032, 10370, 17766, 30343, 51680, 87801, 148830, 251758, 425064, 716425, 1205568, 2025675, 3399004, 5696122, 9534330, 15941099, 26625280, 44426877, 74062506, 123360230, 205303932, 341416205, 567353376
Offset: 1

Views

Author

Keywords

Comments

Number of circular binary words of length n having exactly one occurrence of 00. Example: a(5)=10 because we have 00111, 10011, 11001, 11100, 01110, 00101, 10010, 01001, 10100 and 01010. Column 1 of A119458. - Emeric Deutsch, May 20 2006

References

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

Crossrefs

Programs

  • Magma
    [n*Fibonacci(n-2): n in [1..40]]; // Vincenzo Librandi, Aug 07 2017
    
  • Maple
    with(combinat): a[1]:=1: a[2]:=0: for n from 3 to 40 do a[n]:=n*fibonacci(n-2) od: seq(a[n],n=1..40); # Emeric Deutsch, May 20 2006
    A006490:=(1-2*z+2*z**2)/(z**2+z-1)**2; # conjectured by Simon Plouffe in his 1992 dissertation
  • Mathematica
    Table[Sum[Fibonacci[n - 1], {i, 0, n}], {n, 0, 34}] (* Zerinvary Lajos, Jul 12 2009 *)
    CoefficientList[Series[(1 - 2 x + 2 x^2) / (1 - x - x^2)^2, {x, 0, 33}], x] (* or *) LinearRecurrence[{2, 1, -2, -1}, {1, 0, 3, 4}, 40] (* Vincenzo Librandi, Aug 07 2017 *)
  • PARI
    a(n) = n*fibonacci(n-2); \\ Michel Marcus, Aug 07 2017

Formula

G.f.: x(1-2x+2x^2)/(1-x-x^2)^2. - Emeric Deutsch, May 20 2006
a(n) = 2*a(n-1)+a(n-2)-2*a(n-3)-a(n-4). - Vincenzo Librandi, Aug 07 2017

Extensions

Better definition from Ralf Stephan, Nov 18 2004
More terms from Emeric Deutsch, May 20 2006

A320341 Triangle read by rows: T(n,k) is the number of unmarked circular binary words (necklaces) of length n having k occurrences of the pattern 00 (n >= 0 and 0 <= k <= n).

Original entry on oeis.org

1, 1, 1, 2, 0, 1, 2, 1, 0, 1, 3, 1, 1, 0, 1, 3, 2, 1, 1, 0, 1, 5, 3, 3, 1, 1, 0, 1, 5, 5, 4, 3, 1, 1, 0, 1, 8, 8, 8, 5, 4, 1, 1, 0, 1, 10, 13, 13, 11, 6, 4, 1, 1, 0, 1, 15, 21, 24, 19, 14, 7, 5, 1, 1, 0, 1, 19, 34, 40, 36, 26, 17, 8, 5, 1, 1, 0, 1, 31, 55, 71, 67, 54, 34, 22, 9, 6, 1, 1, 0, 1
Offset: 0

Views

Author

Petros Hadjicostas, Jan 07 2019

Keywords

Comments

The array T(n,k) is the number of unmarked circular binary words (necklaces) of length n having exactly k occurrences of 00 (n >= 0 and 0 <= k <= n). Let V(n,k) be the number of marked circular binary words of length n with exactly k occurrences of the pattern 00 provided wrapping around the circle is allowed when n=1. More precisely, when n=1, we allow the string to wrap around itself on the circle to form a circular string of length 2. It turns out that V(n,k) = A119458(n,k). The properties of the array V(n,k) were studied by Carlitz and Scoville (1977).
Both for this array and for array V(n,k) = A119458(n,k) we have T(n=1, k=0) = T(n=1, k=1) = V(n=1, k=0) = V(n=1, k=1) = 1, which means in both arrays we (indirectly) assume that the string 0 has one occurrence of the pattern 00 (if allowed to wrap around itself on the circle only once), while the string 1 has zero occurrences of the pattern 00.
It makes sense to define T(n,k) = 0 = V(n,k) when k > n. Using the theory in Flajolet and Soria (1991), Flajolet and Sedgewick (2009), and Hadjicostas and Zhang (2018), we can prove that the g.f. of the numbers T(n,k) is F(z,t) = Sum_{n >= 0, k >= 0} T(n,k)*z^n*t^k = 1 - Sum_{d>=1} (phi(d)/d)*log(1-A(z^d,t^d)) while the g.f. of the numbers V(n,k) is K(z,t) = 1 - z*(d(1-A(z,t))/dz)/(1-A(z,t)), where A(z,t) = z*(t+1) + z^2*(1-t). (The latter g.f. was proved in Carlitz and Scoville (1977).)
We can also prove that T(n,k) = (1/n)*Sum_{d|gcd(n,k)} phi(d)*V(n/d, k/d) for n>=1 and 0 <= k <= n.
For k=0, we get that T(n, k=0) = A000358(n) and V(n, k=0) = A000204(n) and for n >= 1. To get univariate g.f.'s of the sequences (T(n,k): n >= 1) and (V(n, k): n >= 1) when k >= 1, we have to differentiate the previous two g.f.'s k times with respect to t, set t=0, and divide by k!. (Obviously, the log now disappears from the g.f. of T(n,k).)
For k=1, we get T(n, k=1) = A212804(n-1) = A006490(n)/n and V(n, k=1) = A006490(n) for n >= 1.
For k=2, we get T(n, k=2) = (1/n)*(V(n,2) + I(2|n)*V(n/2,1)) for n >= 1, where I(2|n) = 1 if 2|n, and 0 otherwise. Also, V(n, k=2) = A006491(n-1) for n >= 1 (with A006491(0) := 0).
For k=3, we get T(n, k=3) = (1/n)*(V(n,3) + 2*I(3|n)*V(n/3, 1)) for n >= 1. Also,
V(n, k=3) = A006492(n-2) for n >=1 (with A006492(m) = 0 for m = 1, 2). To get the g.f. for (T(n,k=3): n >= 0), we differentiate F(z,t) three times w.r.t. t, set t=0, and divide by 3! = 6. We get: 2*z^3*(1-z^3)/(3*(1-z^3-z^6)) + z^3*(1-z)^3/(3*(1-z-z^2)^3) = z^3 + 0*z^4 + z^5 + z^6 + 3*z^7 + 5*z^8 + 11*z^9 + 19*z^10 + 36*z^11 + 67*z^12 + 122*z^13 + 222*z^14 + ...
For 0 <= k <= n, T(n,k) - I(k=0) is the number of cyclic compositions of n with exactly k ones, where I(k=0) is 1 if k=0, and 0 otherwise. This can be proved using MacMahon's bijection between binary necklaces of length n and (unmarked) cyclic compositions of n. (We exclude the binary necklace consisting only of 1's, and that is why we need the term I(k=0).)
Given a binary necklace of 0's and 1's with length n (with at least one 0), starting with a 0 and going clockwise, let b_1 be the number of 1's until before the next zero plus one (for the initial 0); starting with the next zero, let b_2 be the number of 1's plus one (for the 2nd 0); continue this process until you reach the last 0 (say the m-th 0), and denote by b_m the number of 1's plus one before the first 0. Then b_1 + b_2 + ... + b_m is a cyclic composition of n. The process can be reversed (since b_1, b_2, ..., b_m >= 1). The only necklace that cannot be obtained from a cyclic composition is the one having all 1's, which we exclude. In the above process, b_i = 1 if and only if the i-th 0 in the above process is followed by 0 (to the right of it on the circle). Hence, for 0 <= k <= n, T(n,k) - I(k=0) is the number of cyclic compositions of n with exactly k ones.
Note that array A105422(n,k) is the linear version of this array: A105422(n,k) is the number of (linear) compositions of n having exactly k parts equal to 1. The denominator of the bivariate g.f. of array A105422(n,k) is indeed 1 - A(z,t), where A(z,t) = z*(t+1) + z^2*(1-t) (see above), and this is no coincidence.

Examples

			Triangle for T(n,k) begins:
n=0:    1;
n=1:    1,  1;
n=2:    2,  0,  1;
n=3:    2,  1,  0,  1;
n=4:    3,  1,  1,  0,  1;
n=5:    3,  2,  1,  1,  0,  1;
n=6:    5,  3,  3,  1,  1,  0,  1;
n=7:    5,  5,  4,  3,  1,  1,  0,  1;
n=8:    8,  8,  8,  5,  4,  1,  1,  0,  1;
n=9:   10, 13, 13, 11,  6,  4,  1,  1,  0, 1;
n=10:  15, 21, 24, 19, 14,  7,  5,  1,  1, 0, 1;
...
If we take the Taylor expansion of g.f. F(z,t) of T(n,k) around z=0, we get F(z,t) = 1 + (1+t)*z + (2+0*t+t^2)*z^2 + (2+t+0*t^2+t^3)*z^3 + (3+t+t^2+0*t^3+t^4)*z^4 + (3+2*t+t^2+t^3+0*t^4+t^5)*z^5 + ...
For example, for n=4, we have the following marked and unmarked circular binary words (the square brackets denote equivalence classes):
k=0: [1111], [1110,1101,1011,0111], [1010,0101], V(4,0) = 7 and T(4,0) = 3;
k=1: [1100,1001,0011,0110], V(4,1) = 4 and T(4,1) = 1;
k=2: [0001,0010,0100,1000], V(4,2) = 4 and T(4,2) = 1;
k=3: none, V(4,3) = 0 = T(4,3);
k=4: [0000], V(4,4) = 1 = T(4,4).
The corresponding cyclic compositions of n=4 under MacMahon's bijection are the following:
k=0 (no 1's): [none], [4], [2+2], T(4,1) - 1 = 3 - 1 = 2;
k=1 (one 1): [1+3], T(4,1) = 1;
k=2 (two 1's): [1+1+2], T(4,2) = 1;
k=3 (three 1's): none, T(4,3) = 0;
k=4 (four 1's): [1+1+1+1], T(4,4) = 1.
		

Crossrefs

Formula

T(n,k) = (1/n)*Sum_{d|gcd(n,k)} phi(d)*A119458(n/d, k/d) for n>=1 and 0 <= k <= n.
G.f.: F(z,t) = Sum_{n >= 0, k >= 0} T(n,k)*z^n*t^k = 1 - Sum_{d>=1} (phi(d)/d)*log(1-A(z^d,t^d)), where A(z,t) = z*(t+1) + z^2*(1-t).

A322057 Array read by upwards antidiagonals: T(i,n) is the number of binary necklaces of length n that avoid 00...0 (i 0's).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 3, 1, 1, 2, 3, 4, 3, 1, 1, 2, 3, 5, 5, 5, 1, 1, 2, 3, 5, 6, 9, 5, 1, 1, 2, 3, 5, 7, 11, 11, 8, 1, 1, 2, 3, 5, 7, 12, 15, 19, 10, 1, 1, 2, 3, 5, 7, 13, 17, 27, 29, 15, 1, 1, 2, 3, 5, 7, 13, 18, 31, 43, 48, 19, 1
Offset: 1

Views

Author

N. J. A. Sloane, Dec 25 2018

Keywords

Comments

T(i,n) is the number of necklace compositions with sum n and parts at most i. For example, the T(3,5) = 5 compositions up to cyclic equivalence are 11111, 1112, 113, 122, 23. - Andrew Howroyd, Jan 08 2024

Examples

			The first few antidiagonals are:
  1;
  1,  1;
  1,  2,  1;
  1,  2,  2,  1;
  1,  2,  3,  3,  1;
  1,  2,  3,  4,  3,  1;
  1,  2,  3,  5,  5,  5,  1;
  1,  2,  3,  5,  6,  9,  5,  1;
  1,  2,  3,  5,  7, 11, 11,  8,  1;
  1,  2,  3,  5,  7, 12, 15, 19, 10,  1;
  ...
From _Petros Hadjicostas_, Jan 16 2019: (Start)
In the above triangle (first few antidiagonals, read upwards), the j-th row corresponds to T(j,1), T(j-1,2), T(j-2,3), ..., T(1,j).
This, however, is not the j-th row of the square array (see the scanned page above).
For example, the sixth row of the square array is as follows:
T(6,1) = 1, T(6,2) = 2, T(6,3) = 3, T(6,4) = 5, T(6, 5) = 7, T(6, 6) = 13, ...
To generate these numbers, we use T(6, n) = (1/n)*Sum_{d|n} phi(n/d)*L(6,d), where
L(6,1) = 1, L(6,2) = 3, L(6,3) = 7, L(6,4) = 15, L(6,5) = 31, L(6,6) = 63, ...
See the sixth row of A125127. See also the Sage program below by Freddy Barrera.
(End)
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 520.

Crossrefs

Rows 2, 3, 4 and 5 are A000358, A093305, A280218, A280303.
The rows converge to A008965.
Cf. A119458.

Programs

  • PARI
    T(i,n) = {my(p=1/(1 - x*(1 - x^i)/(1 - x))); polcoef(sum(d=1, n, eulerphi(d)*log(subst(p + O(x*x^(n\d)), x, x^d))/d), n)} \\ Andrew Howroyd, Jan 08 2024
  • SageMath
    # uses the L method from A125127
    def T(i, n):
        return sum(euler_phi(n//d)*L(i, d) for d in n.divisors()) // n
    [T(i, n) for d in (1..12) for i, n in zip((d..1, step=-1), (1..d))] # Freddy Barrera, Jan 15 2019
    

Formula

T(i,n) = (1/n) * Sum_{d divides n} totient(n/d)*L(i,d), where L(i,d) = A125127(i,d). See Zhang and Hadjicostas link. - Freddy Barrera, Jan 15 2019
G.f. for row i: Sum_{k>=1} (phi(k)/k) * log(1/(1-B(i, x^k))) where B(i, x) = x*(1 + x + x^2 + ... + x^(i-1)). (This is a generalization of Joerg Arndt's formulae for the g.f.'s of rows 2 and 3.) - Petros Hadjicostas, Jan 24 2019

A006491 Generalized Lucas numbers.

Original entry on oeis.org

1, 0, 4, 5, 15, 28, 60, 117, 230, 440, 834, 1560, 2891, 5310, 9680, 17527, 31545, 56468, 100590, 178395, 315106, 554530, 972564, 1700400, 2964325, 5153868, 8938300, 15465497, 26700915, 46004620, 79112304, 135801105, 232715006, 398151740
Offset: 1

Views

Author

Keywords

Comments

For n>2 note that (n+1)|a(n) unless n is prime, in which case (n+1)|2*a(n). This sequence is not the better-known generalized Lucas numbers V(n,a,b) defined for fixed integers a and b such that D = a^2 + 4*b is nonnegative, V(0) = 2, V(1) = a and for n>1 the recurrence V(n) = V(n-1) + V(n-2). The a = b = 1 case gives the Lucas Numbers. - Jonathan Vos Post, Mar 16 2005
Number of circular binary words of length n+1 having exactly two occurrences of 00. Example: a(4) = 5 because we have 00011, 10001, 11000, 00110 and 01100. Column 2 of A119458. - Emeric Deutsch, May 20 2006
From Petros Hadjicostas, Jan 10 2019: (Start)
In view of the comment by Emeric Deutsch above, we clarify the previous comment by Jonathan Vos Post. We have that 25 + 1 = 26 does not divide a(25) = 2964325 even though n = 25 is not a prime. What he probably meant is that, for n >= 1, we have (n+1) | a(n) unless n is odd, in which case (n+1)|2*a(n). (Of course, for some odd numbers n, we do have (n+1)|a(n), but not for all of them.)
From Emeric Deutsch's comment above, we have a(n) = A119458(n+1, k=2), while from the theory of marked and unmarked circular words, we have A320341(n+1, k=2) = (1/(n+1))*Sum_{d|gcd(n+1, 2)} phi(d)*A119458((n+1)/d, 2/d).
If n is even, then n+1 is odd, and hence A320341(n+1, k=2) = (1/(n+1)) * A119458(n+1, 2) = a(n)/(n+1), i.e., (n+1)|a(n).
If n=1, then (1+1)|2*a(1). Let n be odd >= 3, in which case n+1 is even and 2*A320341(n+1, k=2) = (1/(n+1))*(2*A119458(n+1, k=2) + 2*A119458((n+1)/2, k=1)). Thus, 2*A320341(n+1, k=2) = (1/(n+1))*(2*a(n) + 2*A006490((n+1)/2)) = (1/(n+1))*(2*a(n) + 2*((n+1)/2)*Fibonacci((n-3)/2)). It follows that 2*A320341(n+1, k=2) = 2*a(n)/(n+1) + Fibonacci((n-3)/2). Thus, 2*a(n)/(n+1) = 2*A320341(n+1, k=2) - Fibonacci((n-3)/2), and thus, (n+1)|2*a(n). (End)

References

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

Crossrefs

Programs

  • Magma
    I:=[1,0,4,5,15,28]; [n le 6 select I[n] else 3*Self(n-1) -5*Self(n-3) +3*Self(n-5)+Self(n-6): n in [1..30]]; // G. C. Greubel, Jan 01 2018
  • Maple
    G:=x*(1-x)*(1-2*x+2*x^2)/(1-x-x^2)^3: Gser:=series(G,x=0,45): seq(coeff(Gser,x^n),n=1..40); # Emeric Deutsch, Feb 07 2006
    with(combinat): a[1]:=1: a[2]:=0: for n from 3 to 40 do a[n]:=a[n-1]+a[n-2]+n*fibonacci(n-2)-(n-1)*fibonacci(n-3) od: seq(a[n],n=1..40); # Emeric Deutsch, May 20 2006
    A006491:=(z-1)*(1-2*z+2*z**2)/(z**2+z-1)**3; # conjectured by Simon Plouffe in his 1992 dissertation
  • Mathematica
    LinearRecurrence[{3, 0, -5, 0, 3, 1}, {1, 0, 4, 5, 15, 28}, 50] (* G. C. Greubel, Jan 01 2018 *)
  • PARI
    x='x+O('x^30); Vec(x*(1-x)*(1-2*x+2*x^2)/(1-x-x^2)^3) \\ G. C. Greubel, Jan 01 2018
    

Formula

G.f.: x*(1-x)*(1-2*x+2*x^2)/(1-x-x^2)^3. - Ralf Stephan, Apr 23 2004, corrected Feb 08 2006
a(n) = a(n-1) + a(n-2) + n*Fibonacci(n-2) - (n-1)*Fibonacci(n-3) for n >= 3; a(1)=1, a(2)=0. - Emeric Deutsch, May 20 2006
a(n) = 3*a(n-1) - 5*a(n-3) + 3*a(n-5) + a(n-6). - G. C. Greubel, Jan 01 2018

Extensions

More terms from Emeric Deutsch, Feb 07 2006
Showing 1-5 of 5 results.