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.

A226431 The number of permutations of length n in a particular geometric grid class.

Original entry on oeis.org

1, 2, 6, 21, 73, 244, 786, 2458, 7510, 22527, 66579, 194408, 561988, 1610900, 4584426, 12966225, 36476173, 102132412, 284785878, 791182318, 2190833086, 6048706947, 16655647911, 45752451536, 125405039368, 343040546984, 936651104466, 2553146783253, 6948573570145
Offset: 1

Views

Author

Jay Pantone, Jun 06 2013

Keywords

Comments

This geometric grid class is given by the array [[0,0,1,0],[0,0,0,1],[0,1,-1,0],[1,0,0,-1]]. A picture is given in the LINKS section.
The simple permutations in this class are A226432.

Programs

  • Mathematica
    LinearRecurrence[{9, -31, 51, -41, 15, -2}, {1, 2, 6, 21, 73, 244}, 29] (* Jean-François Alcover, Oct 30 2018 *)
  • PARI
    x=x='x+O('x^66); Vec((x-7*x^2+19*x^3-22*x^4+9*x^5-x^6)/((1-x)*(1-2*x)*(1-3*x+x^2)^2) ) \\ Joerg Arndt, Jun 19 2013

Formula

G.f.: x*(1-7*x+19*x^2-22*x^3+9*x^4-x^5)/((1-x)*(1-2*x)*(1-3*x+x^2)^2).
a(n) = 3*A001871(n-1)-A001871(n) +2*A001906(n) +2^(n-1)+1. - R. J. Mathar, Aug 31 2013

A240847 a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4) for n>3, a(0)=a(1)=a(3)=0, a(2)=1.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 0, -2, -5, -12, -25, -50, -96, -180, -331, -600, -1075, -1908, -3360, -5878, -10225, -17700, -30509, -52390, -89664, -153000, -260375, -442032, -748775, -1265832, -2136000, -3598250, -6052061, -10164540
Offset: 0

Views

Author

Paul Curtz, Apr 13 2014

Keywords

Comments

F1(m, n) is the difference table of a(n):
0, 0, 1, 0, 1, 0, 0, -2, ...
0, 1, -1, 1, -1, 0, -2, -3, ...
1, -2, 2, -2, 1, -2, -1, -4, ...
-3, 4, -4, 3, -3, 1, -3, -2, ...
7, -8, 7, -6, 4, -4, 1, -4, ...
-15, 15, -13, 10, -8, 5, -5, 1, ...
30, -28, 23, -18, 13, -10, 6, -6, ...
The recurrence holds for every row and every signed column.
Main diagonal: F1(n, n) = A001477(n).
First upper diagonal: F1(n, n+1) = -A001477(n).
F1(m, n) = F1(m, n-1) + F1(m+1, n-1).
Inverse binomial transform: 0, 0, 1, -3, 7, -15, 30, ... = 0, 0, followed by (-1)^n*A023610(n). Without signs: F2(0, n) = 0, 0, 1, 3, 7, 15, 30, ... = b(n) has the same recurrence.
F1(0, n) + F2(0, n) = 0, followed by A099920(n).
a(n) and b(n) are reciprocal by their inverse binomial transform.
0, followed by A001629(n) is an autosequence.
F1(m, 1) = (-1)^n*A029907(n).
F1(1, n) = 0, 1, -1, 1, -1, followed by -A226432(n+3).
F1(m, 2) = (-1)^n*A208354(n).

Crossrefs

Cf. A000032, A000045, A001629 (main sequence for the recurrence), A067331.

Programs

  • GAP
    List([0..40], n-> (6*Fibonacci(n-3) - (n-3)*Lucas(1,-1,n-3)[2])/5 ); # G. C. Greubel, Feb 06 2020
  • Magma
    [(6*Fibonacci(n-3) - (n-3)*Lucas(n-3))/5: n in [0..40]]; // G. C. Greubel, Feb 06 2020
    
  • Maple
    with(combinat): seq( ((n+3)*fibonacci(n-3) - 2*(n-3)*fibonacci(n-2))/5, n=0..40); # G. C. Greubel, Feb 06 2020
  • Mathematica
    a[n_]:= a[n]= 2*a[n-1] +a[n-2] -2*a[n-3] -a[n-4]; a[0]= a[1]= a[3]= 0; a[2]= 1; Table[a[n], {n, 0, 33}] (* Jean-François Alcover, Apr 17 2014 *)
    CoefficientList[Series[x^2*(1-2*x)/(1-x-x^2)^2, {x, 0, 40}], x] (* Vincenzo Librandi, May 09 2014 *)
    nxt[{a_,b_,c_,d_}]:={b,c,d,2d+c-2b-a}; NestList[nxt,{0,0,1,0},40][[All,1]] (* Harvey P. Dale, Sep 17 2022 *)
  • PARI
    Vec(x^2*(1-2*x)/(1-x-x^2)^2 + O(x^100)) \\ Colin Barker, Apr 13 2014
    
  • PARI
    vector(41, n, my(m=n-1); ((m+3)*fibonacci(m-3) - 2*(m-3)*fibonacci(m-2) )/5 ) \\ G. C. Greubel, Feb 06 2020
    
  • Sage
    [((n+3)*fibonacci(n-3) - 2*(n-3)*fibonacci(n-2))/5 for n in (0..40)] # G. C. Greubel, Feb 06 2020
    

Formula

a(n) = 0, 0, 1, 0, 1, 0, 0, followed by -A067331.
G.f.: x^2*(1-2*x)/(1-x-x^2)^2. - Colin Barker, Apr 13 2014
a(n) = ( (10*n + (3-5*n)*t)*(1+t)^n + (10*n-(3-5*n)*t)*(1-t)^n )/(25*2^n), where t=sqrt(5). - Bruno Berselli, Apr 17 2014
a(n) = (6*Fibonacci(n-3) - (n-3)*Lucas(n-3))/5 = ((n+3)*Fibonacci(n-3) - 2*(n-3)*Fibonacci(n-2))/5. - G. C. Greubel, Feb 06 2020

A271785 a(n) = Sum_{k=0..(n-1)/2} (n+2-k)*binomial(n-1-k,k).

Original entry on oeis.org

0, 3, 4, 9, 16, 30, 54, 97, 172, 303, 530, 922, 1596, 2751, 4724, 8085, 13796, 23478, 39858, 67517, 114140, 192603, 324454, 545714, 916536, 1537275, 2575204, 4308897, 7201912, 12025038, 20058990, 33430297, 55667596, 92622471, 153992954, 255842890
Offset: 0

Views

Author

R. J. Mathar, Apr 14 2016

Keywords

Comments

This is a sibling to the expansions A001629(n+1) = Sum_{k=0..(n-1)/2} (n-k) *binomial(n-1-k,k) and A226432(n+3) = Sum_{k=0..(n-1)/2} (n+1-k) *binomial(n-1-k,k).

Crossrefs

Cf. A001629.

Programs

  • Maple
    A271785 := proc(n)
        add( (n+2-k)*binomial(n-1-k,k),k=0..(n-1)/2) ;
    end proc:
  • Mathematica
    LinearRecurrence[{2,1,-2,-1},{0,3,4,9},40] (* Harvey P. Dale, May 05 2020 *)
  • PARI
    concat(0, Vec(x*(3-2*x-2*x^2)/(1-x-x^2)^2 + O(x^50))) \\ Colin Barker, Apr 14 2016

Formula

G.f.: x*(3-2*x-2*x^2) / (1-x-x^2)^2.
a(n) = 3*A001629(n+1) -2*A001629(n) -2*A001629(n-1).
From Colin Barker, Apr 14 2016: (Start)
a(n) = (2^(-1-n)*(-24*sqrt(5)*((1-sqrt(5))^n-(1+sqrt(5))^n)+5*((1-sqrt(5))^(1+n)+(1+sqrt(5))^(1+n))*n))/25.
a(n) = 2*a(n-1)+a(n-2)-2*a(n-3)-a(n-4) for n>3. (End)
E.g.f.: (1/25)*(sqrt(5)*(5*x + 24)*sinh((sqrt(5)*x)/2) + 15*x*cosh((sqrt(5)*x)/2))*exp(x/2). - Ilya Gutkovskiy, Apr 14 2016
a(n) = A006355(n+1)+A001629(n+1). - R. J. Mathar, May 20 2016
Showing 1-3 of 3 results.