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.

A079962 Number of permutations satisfying -k <= p(i) - i <= r and p(i) - i not in I, i=1..n, with k=1, r=5, I={1,3}.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 9, 14, 22, 36, 58, 94, 153, 247, 399, 646, 1045, 1691, 2737, 4428, 7164, 11592, 18756, 30348, 49105, 79453, 128557, 208010, 336567, 544577, 881145, 1425722, 2306866, 3732588, 6039454, 9772042, 15811497, 25583539, 41395035
Offset: 0

Views

Author

Vladimir Baltic, Feb 19 2003

Keywords

Comments

Number of compositions (ordered partitions) of n into elements of the set {1,3,5,6}. - Mark Dols, Aug 20 2010

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.

Crossrefs

Programs

  • Magma
    [Round(Fibonacci(n+3)/4): n in [0..40]]; // G. C. Greubel, Jan 21 2022
    
  • Maple
    with(combinat,fibonacci): seq(round(fibonacci(n+3)/4),n=0..38) # Mircea Merca, Jan 04 2011
  • Mathematica
    LinearRecurrence[{1,0,1,0,1,1}, {1,1,1,2,3,5}, 41] (* G. C. Greubel, Jan 21 2022 *)
  • PARI
    a(n)=fibonacci(n+3)\/4 \\ Charles R Greathouse IV, Oct 07 2015
    
  • Sage
    [(1/4)*(fibonacci(n+3) + chebyshev_U(n,1/2) + chebyshev_U(2*n,1/2)) for n in (0..40)] # G. C. Greubel, Jan 21 2022

Formula

a(n) = a(n-1) + a(n-3) + a(n-5) + a(n-6).
G.f.: 1/((1+x+x^2)*(1-x+x^2)*(1-x-x^2)).
a(n+1)/a(n) -> golden ratio A001622. - Roger L. Bagula, Mar 13 2006
a(n) + a(n+2) + a(n+4) = Fibonacci(n+5). - Mark Dols, Aug 20 2010
a(n) = round(Fibonacci(n+3)/4). - Mircea Merca, Jan 04 2011
a(n+6) - a(n) = A000045(n+6). - Paul Curtz, Jun 29 2013
a(n) + a(n+1) + a(n+2) = A024490(n+6). - R. J. Mathar, Jun 30 2013
a(n) - a(n-1) + a(n-2) = A094686(n). - R. J. Mathar, Jun 30 2013
4*a(n) = A057078(n) + A010892(n) + A000045(n+3). - R. J. Mathar, Nov 02 2016