OFFSET
0,2
COMMENTS
Row sums of Riordan array (1/(1-x), x*(1+x^2)). - Paul Barry, Feb 16 2005
a(n) is the number of partitions of {1, ..., n+3} into two blocks in which only 1- or 3-strings of consecutive integers can appear in a block and there is at least one 3-string. E.g., a(3)=5 because the enumerated partitions of {1,2,3,4,5,6} are 1235/46, 1345/26, 15/2346, 13/2456, 123/456. - Augustine O. Munagi, Apr 11 2005
REFERENCES
Chu, Hung Viet. "Various Sequences from Counting Subsets." Fib. Quart., 59:2 (May 2021), 150-157.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Kassie Archer and Aaron Geary, Powers of permutations that avoid chains of patterns, arXiv:2312.14351 [math.CO], 2023. See p. 15.
Hung Viet Chu, Various sequences from counting subsets, arXiv:2005.10081 [math.CO], 2020-2021.
A. O. Munagi, Set Partitions with Successions and Separations, IJMMS 2005:3 (2005), 451-463.
Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-1).
FORMULA
Partial sums of A000930. a(n-1) = Sum_{k=0..floor(n/2)} binomial(n-2*k, k+1). - Paul Barry, Jul 07 2004
a(n-3) = Sum(binomial(n-r, r)), r=1, 2, ... which is the case t=3 and k=2 in the general case of t-strings and k blocks: a(n-3, k, t) = Sum(binomial(n-r*(t-1), r)*S2(n-r*(t-1)-1, k-1)), r=1, 2, ... - Augustine O. Munagi, Apr 11 2005
From Paul Weisenhorn, Oct 28 2011: (Start)
a(n) = a(n-1) + a(n-2) - a(n-5) for n > 4.
a(n) = a(n-2) + a(n-3) + a(n-4) + 2 for n > 3.
G.f.: 1/((1-x)*(1-x-x^3)). (End)
a(n) = 1 + a(n-1) + a(n-3), a(1)=1, a(2)=2, a(3)=3. - Gerry Martens, Jun 10 2018
a(n) = -A077888(-4-n) for all n in Z. - Michael Somos, Jun 17 2018
a(n) = A000930(n+3) - 1. - Greg Dresden, Jun 20 2021
a(n) = A099567(n+3, 4). - G. C. Greubel, Jul 27 2022
MAPLE
a:= n-> (Matrix(4, (i, j)-> if i=j-1 then 1 elif j=1 then [2, -1, 1, -1][i] else 0 fi)^n)[1, 1]: seq(a(n), n=0..41); # Alois P. Heinz, Sep 05 2008
g:=(1+z+z^2)/(1-z-z^3): gser:=series(g, z=0, 43): seq(coeff(gser, z, n)-1, n=1..42); # Zerinvary Lajos, Jan 09 2009
MATHEMATICA
LinearRecurrence[{1, 1, 0, 0, -1}, {1, 2, 3, 5, 8, 12}, 42] (* or *)
CoefficientList[Series[1/((1-x)(1-x-x^3)), {x, 0, 41}], x] (* Michael De Vlieger, Jun 06 2018 *)
PROG
(PARI) Vec(1/(1-x)/(1-x-x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012
(PARI) {a = vector(50);
a[1] = 1; a[2] = 2; a[3] = 3;
for(n=4, 50,
a[n] = 1 + a[n-1] + a[n-3];
); a} \\ Gerry Martens, Jun 03 2018
(PARI) {a(n) = if( n<0, n=-4-n; polcoeff( -1 / (1 - x) / (1 + x^2 - x^3) + x * O(x^n), n), polcoeff( 1 / (1 - x) / (1 - x - x^3) + x * O(x^n), n))}; /* Michael Somos, Jun 17 2018 */
(Magma)
A077868:= func< n | n eq 0 select 0 else (&+[Binomial(n-2*j+, j+1): j in [0..Floor((n+1)/3)]]) >;
[A077868(n): n in [0..40]]; // G. C. Greubel, Jul 27 2022
(SageMath)
def A077868(n): return sum(binomial(n-2*j+1, j+1) for j in (0..((n+1)//3)))
[A077868(n) for n in (0..40)] # G. C. Greubel, Jul 27 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
EXTENSIONS
More terms from Augustine O. Munagi, Apr 11 2005
STATUS
approved