A023434 Dying rabbits: a(n) = a(n-1) + a(n-2) - a(n-4).
0, 1, 1, 2, 3, 4, 6, 8, 11, 15, 20, 27, 36, 48, 64, 85, 113, 150, 199, 264, 350, 464, 615, 815, 1080, 1431, 1896, 2512, 3328, 4409, 5841, 7738, 10251, 13580, 17990, 23832, 31571, 41823, 55404, 73395, 97228, 128800, 170624, 226029, 299425, 396654, 525455
Offset: 0
Examples
G.f. = x + x^2 + 2*x^3 + 3*x^4 + 4*x^5 + 6*x^6 + 8*x^7 + 11*x^8 + ... a(7)=8, with (n-1)=6. The partially ordered partitions of 6 are (33),(321,312,132=one),(231,213,123=one),(3111,1311,1131,1113=one),(222),(2211,1122,1221,2112,1212,2121=one),(21111,12111,11211,11121,11112=one),(111111). - _David Neil McGrath_, Apr 26 2015
Links
- Robert Israel, Table of n, a(n) for n = 0..7360
- O. Bouillot, The Algebra of Multitangent Functions, arXiv:1404.0992 [math.NT], 2014.
- O. Bouillot, The Algebra of Multitangent Functions, Journal of Algebra, Volume 410, 15 July 2014, Pages 148-238.
- J. H. E. Cohn, Letter to the editor, Fib. Quart. 2 (1964), 108.
- V. E. Hoggatt, Jr. and D. A. Lind, The dying rabbit problem, Fib. Quart. 7 (1969), 482-487.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 1070
- Index entries for linear recurrences with constant coefficients, signature (1,1,0,-1).
Programs
-
Magma
[0,1] cat [ n le 4 select (n) else Self(n-1)+Self(n-2)-Self(n-4): n in [1..45] ]; // Vincenzo Librandi, Apr 27 2015
-
Maple
f:= gfun:-rectoproc({a(n)=a(n-1)+a(n-2)-a(n-4),seq(a(i)=[0,1,1,2][i+1],i=0..3)},a(n),remember): seq(f(i),i=0..100); # Robert Israel, May 04 2015
-
Mathematica
a[ n_] := If[ n < 0, SeriesCoefficient[ -x^3 / (1 - x^2 - x^3 + x^4), {x, 0, -n}], SeriesCoefficient[ x / (1 - x - x^2 + x^4), {x, 0, n}]]; (* Michael Somos, Nov 29 2013 *) LinearRecurrence[{1, 1, 0, -1}, {0, 1, 1, 2}, 50] (* Vincenzo Librandi, Apr 27 2015 *)
-
PARI
{a(n) = polcoeff( if( n<0, -x^3 / (1 - x^2 - x^3 + x^4), x / (1 - x - x^2 + x^4)) + x * O(x^abs(n)), abs(n))}; /* Michael Somos, Nov 29 2013 */
-
PARI
x='x+O('x^99); concat(0, Vec(x/((1-x)*(1-x^2-x^3)))) \\ Altug Alkan, Apr 09 2018
Formula
a(n) = A000931(n+7)-1.
a(0)=0, a(1)=1, a(2)=1 then for n>2 a(n)=ceiling(r*a(n-1)) where r is the positive root of x^3-x-1=0. - Benoit Cloitre, Jun 19 2004
G.f.: x/((1-x)*(1-x^2-x^3)). - Jon Perry, Jul 04 2004
For n>2 a(n) = floor(sqrt(a(n-3)*a(n-2) + a(n-2)*a(n-1) + a(n-1)*a(n-3))) + 1. - Gerald McGarvey, Sep 19 2004
a(n) = Sum_{k=1..floor((n+2)/3)} binomial(floor((n+2-k)/2),k). This formula counts even run-types by length. - David Callan, Jul 14 2006
a(n) = a(n-2) + a(n-3) + 1. - Mark Dols, Feb 01 2010
a(-3-n) = -A077905(n) for all n in Z. - Michael Somos, Sep 25 2014
Comments