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

A023434 Dying rabbits: a(n) = a(n-1) + a(n-2) - a(n-4).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Limit_{n->infinity} a(n)/a(n-1) = positive root of 1+x-x^3 (smallest Pisot-Vijayaraghavan number, A060006). - Gerald McGarvey, Sep 19 2004
a(n) is the number of distinct even run-types taken over nonempty subsets of [n+1]. The run-type of a set of positive integers is the sequence of lengths when the set is decomposed into maximal runs of consecutive integers and it is even if all its entries are even. For example, the set {2,3,5,6,9,10,11} has run-type (2,2,3) and a(6)=6 counts (2),(4),(6),(2,2),(2,4),(4,2). - David Callan, Jul 14 2006
Partial sums of the sequence obtained by deleting the first 2 terms of A000931. Example: 0+1+0+1+1 = 3 = a(4). - David Callan, Jul 14 2006
One less than the sequence obtained by deleting the first 7 terms of A000931. - Ira M. Gessel, May 02 2007
This sequence counts ordered partitions of (n-1) into parts less than or equal to 3, in which the order of 1's are unimportant. Alternately, the order of 2's and 3's are important (see example). - David Neil McGrath, Apr 26 2015
Interleaving of A289692 and A077855. - Bruce J. Nicholson, Apr 09 2018

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
		

Crossrefs

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(n) + a(n+1) = A054405(n). Partial sums is A054405. - Michael Somos, Dec 01 2013
a(-3-n) = -A077905(n) for all n in Z. - Michael Somos, Sep 25 2014

A289693 The number of partitions of [n] with exactly 3 blocks without peaks.

Original entry on oeis.org

0, 0, 1, 3, 9, 27, 75, 197, 503, 1263, 3132, 7695, 18784, 45649, 110585, 267276, 644907, 1554208, 3742321, 9005265, 21659603, 52078400, 125186565, 300870586, 723010749, 1737273406, 4174084259, 10028409724, 24092769583, 57880137331
Offset: 1

Views

Author

R. J. Mathar, Jul 09 2017

Keywords

Crossrefs

Programs

  • Maple
    with(orthopoly) :
    nmax := 10:
    tpr := 1+x^2/2 :
    k := 3:
    g := x^k ;
    for j from 1 to k do
            if j> 1 then
                    g := g*( U(j-1,tpr)-(1+x)*U(j-2,tpr)) / ((1-x)*U(j-1,tpr)-U(j-2,tpr)) ;
            else
                    # note that U(-1,.)=0, U(0,.)=1
                    g := g* U(j-1,tpr) / ((1-x)*U(j-1,tpr)) ;
            end if;
    end do:
    simplify(%) ;
    taylor(g,x=0,nmax+1) ;
    gfun[seriestolist](%) ; # R. J. Mathar, Mar 11 2021

Formula

From Colin Barker, Nov 07 2017: (Start)
G.f.: x^3*(1 - x + x^2)*(1 - 2*x + 3*x^2 - x^3 + x^4) / ((1 - x)*(1 - 2*x + x^2 - x^3)*(1 - 3*x + 3*x^2 - 4*x^3 + x^4 - x^5)).
a(n) = 6*a(n-1) - 15*a(n-2) + 24*a(n-3) - 29*a(n-4) + 25*a(n-5) - 17*a(n-6) + 9*a(n-7) - 3*a(n-8) + a(n-9) for n>9.
(End)

A289694 The number of partitions of [n] with exactly 4 blocks without peaks.

Original entry on oeis.org

0, 0, 0, 1, 4, 16, 64, 236, 818, 2736, 8934, 28622, 90324, 281792, 871556, 2677750, 8184383, 24913238, 75593383, 228793147, 691094857, 2084237036, 6277871658, 18890568921, 56798001639, 170665733660, 512554832309, 1538718547049
Offset: 1

Views

Author

R. J. Mathar, Jul 09 2017

Keywords

Crossrefs

Cf. A289692 (2 blocks), A289693 (3 blocks).

Programs

  • Maple
    with(orthopoly) :
    nmax := 15:
    tpr := 1+x^2/2 :
    k := 4:
    g := x^k ;
    for j from 1 to k do
        if j> 1 then
            g := g*( U(j-1,tpr)-(1+x)*U(j-2,tpr)) / ((1-x)*U(j-1,tpr)-U(j-2,tpr)) ;
        else
            # note that U(-1,.)=0, U(0,.)=1
            g := g* U(j-1,tpr) / ((1-x)*U(j-1,tpr)) ;
        end if;
    end do:
    simplify(%) ;
    taylor(g,x=0,nmax+1) ;
    gfun[seriestolist](%) ; # R. J. Mathar, Mar 11 2021

Formula

G.f. x^4*(x^2-x+1)*(x^4-x^3+3*x^2-2*x+1)*(x^6-x^5+5*x^4-4*x^3+6*x^2-3*x+1) / ( (x-1)*(x^5-x^4+4*x^3-3*x^2+3*x-1)*(x^7-x^6+6*x^5-5*x^4+10*x^3-6*x^2+4*x-1)*(x^3-x^2+2*x-1) ). - R. J. Mathar, Mar 11 2021
a(n)= 10*a(n-1) -45*a(n-2) +130*a(n-3) -280*a(n-4) +471*a(n-5) -643*a(n-6) +734*a(n-7) -701*a(n-8) +575*a(n-9) -400*a(n-10) +237*a(n-11) -121*a(n-12) +49*a(n-13) -18*a(n-14) +4*a(n-15) -a(n-16). - R. J. Mathar, Mar 11 2021
Showing 1-3 of 3 results.