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-10 of 35 results. Next

A053808 Partial sums of A001891.

Original entry on oeis.org

1, 5, 15, 36, 76, 148, 273, 485, 839, 1424, 2384, 3952, 6505, 10653, 17383, 28292, 45964, 74580, 120905, 195885, 317231, 513600, 831360, 1345536, 2177521, 3523733, 5701983, 9226500, 14929324, 24156724, 39087009, 63244757, 102332855, 165578768, 267912848
Offset: 0

Views

Author

Barry E. Williams, Mar 27 2000

Keywords

Comments

Antidiagonal sums of the convolution array A213579 and row 1 of the convolution array A213590. - Clark Kimberling, Jun 18 2012
Also number CG(n,2) of complete games with n players of 2 types. - N. J. A. Sloane, Dec 29 2012

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 194-196.

Crossrefs

Convolution of A000290 (squares) with A000045, n >= 1. (Fibonacci) - Wolfdieter Lang, Apr 10 2000
Right-hand column 7 of triangle A011794.

Programs

  • GAP
    List([0..40], n-> Fibonacci(n+8) - (n^2 +8*n+20)); # G. C. Greubel, Jul 06 2019
  • Magma
    [Fibonacci(n+8) - (n^2+8*n+20): n in [0..40]]; // G. C. Greubel, Jul 06 2019
    
  • Mathematica
    Table[Fibonacci[n+8] -(n^2 +8*n+20), {n,0,40}] (* G. C. Greubel, Jul 06 2019 *)
    LinearRecurrence[{4,-5,1,2,-1},{1,5,15,36,76},40] (* Harvey P. Dale, Apr 14 2022 *)
  • PARI
    vector(40, n, n--; fibonacci(n+8) - (n^2 +8*n+20)) \\ G. C. Greubel, Jul 06 2019
    
  • Sage
    [fibonacci(n+8) - (n^2 +8*n+20) for n in (0..20)] # G. C. Greubel, Jul 06 2019
    

Formula

a(n) = a(n-1) + a(n-2) + (n+1)^2, a(-n)=0.
G.f.: (1+x)/((1-x-x^2)*(1-x)^3).
a(n) = Fibonacci(n+6) - (n^2 + 4*n + 8), n >= 2 (see p. 184 of FQ reference).
a(n-2) = Sum_{i=0..n} Fibonacci(i)*(n-i)^2. - Benoit Cloitre, Mar 06 2004

A053809 Second partial sums of A001891.

Original entry on oeis.org

1, 6, 21, 57, 133, 281, 554, 1039, 1878, 3302, 5686, 9638, 16143, 26796, 44179, 72471, 118435, 193015, 313920, 509805, 827036, 1340636, 2171996, 3517532, 5695053, 9218786, 14920769, 24147269, 39076593, 63233317, 102320326
Offset: 0

Views

Author

Barry E. Williams, Mar 27 2000

Keywords

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 194-196.

Crossrefs

Right-hand column 9 of triangle A011794. Pairwise sums of A014166.

Programs

  • GAP
    List([0..40], n-> Fibonacci(n+10) - (2*n^3 + 27*n^2 + 145*n + 324)/6) # G. C. Greubel, Jul 06 2019
  • Magma
    [Fibonacci(n+10) - (2*n^3 + 27*n^2 + 145*n + 324)/6: n in [0..40]]; // G. C. Greubel, Jul 06 2019
    
  • Mathematica
    Table[Fibonacci[n+10] - (2*n^3+27*n^2+145*n+324)/6, {n,0,40}] (* G. C. Greubel, Jul 06 2019 *)
  • PARI
    vector(40, n, n--; fibonacci(n+10) - (2*n^3 + 27*n^2 + 145*n + 324)/6) \\ G. C. Greubel, Jul 06 2019
    
  • Sage
    [fibonacci(n+10) - (2*n^3 + 27*n^2 + 145*n + 324)/6 for n in (0..40)] # G. C. Greubel, Jul 06 2019
    

Formula

a(n) = a(n-1) + a(n-2) + (2*n+3)*C(n+2, 2)/3; a(-x)=0.
a(n) = Fibonacci(n+10) - (2*n^3 + 27*n^2 + 145*n + 324)/6.
G.f.: (1+x)/((1-x)^4*(1-x-x^2)).
a(n) = 5*a(n-1) - 9*a(n-2) + 6*a(n-3) + a(n-4) - 3*a(n-5) + a(n-6). - Wesley Ivan Hurt, Apr 21 2021

A192744 Constant term of the reduction by x^2->x+1 of the polynomial p(n,x) defined below in Comments.

Original entry on oeis.org

1, 1, 3, 8, 29, 133, 762, 5215, 41257, 369032, 3676209, 40333241, 483094250, 6271446691, 87705811341, 1314473334832, 21017294666173, 357096406209005, 6424799978507178, 122024623087820183, 2439706330834135361, 51219771117454755544
Offset: 0

Views

Author

Clark Kimberling, Jul 09 2011

Keywords

Comments

The titular polynomial is defined recursively by p(n,x)=x*p(n-1,x)+n! for n>0, where p(0,x)=1; see the Example. For an introduction to polynomial reduction, see A192232. The discussion at A192232 Comments continues here:
...
Let R(p,q,s) denote the "reduction of polynomial p by q->s" as defined at A192232. Suppose that q(x)=x^k for some k>0 and that s(x)=s(k,0)*x^(k-1)+s(k,1)*x^(k-2)+...+s(k,k-2)x+s(k,k-1).
...
First, we shall take p(x)=x^n, where n>=0; the results will be used to formulate R(p,q,s) for general p. Represent R(x^n,q,s) by
...
R(x^n)=s(n,0)*x^(k-1)+s(n,1)*x^(k-2)+...+s(n,k-2)*x+s(n,k-1).
...
Then each of the sequences u(n)=s(n,h), for h=0,1,...,k-1, satisfies this linear recurrence relation:
...
u(n)=s(k,0)*u(n-1)+s(k,1)*u(n-2)+...+s(k,k-2)*u(n-k-1)+s(k,k-1)*u(n-k), with initial values tabulated here:
...
n: ..s(n,0)...s(n,1)..s(n,2).......s(n,k-2)..s(n,k-1)
0: ....0........0.......0..............0.......1
1: ....0........0.......0..............1.......0
...
k-2: ..0........1.......0..............0.......0
k-1: ..0........0.......0..............0.......0
k: ..s(k,0)...s(k,1)..s(k,2).......s(k,k-2)..s(k,k-1)
...
That completes the formulation for p(x)=x^n. Turning to the general case, suppose that
...
p(n,x)=p(n,0)*x^n+p(n,1)*x^(n-1)+...+p(n,n-1)*x+p(n,n)
...
is a polynomial of degree n>=0. Then the reduction denoted by (R(p(n,x) by x^k -> s(x)) is the polynomial of degree k-1 given by the matrix product P*S*X, where P=(p(n,0)...p(n,1).........p(n-k)...p(n,n-k+1); X has all 0's except for main diagonal (x^(k-1), x^(k-2)...x,1); and S has
...
row 1: ... s(n,0) ... s(n,1) ...... s(n,k-2) . s(n,k-1)
row 2: ... s(n-1,0) . s(n-1,1) .... s(n-1,k-2) s(n-1,k-1)
...
row n-k+1: s(k,0).... s(k,1) ...... s(k,k-2) ..s(k,k-1)
row n-k+2: p(n,n-k+1) p(n,n-k+2) .. p(n,n-1) ..p(n,n)
*****
As a class of examples, suppose that (v(n)), for n>=0, is a sequence, that p(0,x)=1, and p(n,x)=v(n)+p(n-1,x) for n>0. If q(x)=x^2 and s(x)=x+1, and we write the reduction R(p(n,x)) as u1(n)*x+u2(n), then the sequences u1 and u2 are convolutions with the Fibonacci sequence, viz., let F=(0,1,1,2,3,5,8,...)=A000045 and let G=(1,0,1,1,2,3,5,8...); then u1=G**v and u2=F**v, where ** denotes convolution. Examples (with a few exceptions for initial terms):
...
If v(n)=n! then u1=A192744, u2=A192745.
If v(n)=n+1 then u1=A000071, u2=A001924.
If v(n)=2n then u1=A014739, u2=A027181.
If v(n)=2n+1 then u1=A001911, u2=A001891.
If v(n)=3n+1 then u1=A027961, u2=A023537.
If v(n)=3n+2 then u1=A192746, u2=A192747.
If v(n)=3n then u1=A154691, u2=A192748.
If v(n)=4n+1 then u1=A053311, u2=A192749.
If v(n)=4n+2 then u1=A192750, u2=A192751.
If v(n)=4n+3 then u1=A192752, u2=A192753.
If v(n)=4n then u1=A147728, u2=A023654.
If v(n)=5n+1 then u1=A192754, u2=A192755.
If v(n)=5n then u1=A166863, u2=A192756.
If v(n)=floor((n+1)tau) then u1=A192457, u2=A023611.
If v(n)=floor((n+2)/2) then u1=A052952, u2=A129696.
If v(n)=floor((n+3)/3) then u1=A004695, u2=A178982.
If v(n)=floor((n+4)/4) then u1=A080239, u2=A192758.
If v(n)=floor((n+5)/5) then u1=A124502, u2=A192759.
If v(n)=n+2 then u1=A001594, u2=A192760.
If v(n)=n+3 then u1=A022318, u2=A192761.
If v(n)=n+4 then u1=A022319, u2=A192762.
If v(n)=2^n then u1=A027934, u2=A008766.
If v(n)=3^n then u1=A106517, u2=A094688.

Examples

			The first five polynomials and their reductions:
1 -> 1
1+x -> 1+x
2+x+x^2 -> 3+2x
6+2x+x^2+x^3 -> 8+5x
24+6x+2x^2+x^3+x^4 -> 29+13x, so that
A192744=(1,1,3,8,29,...) and A192745=(0,1,2,5,13,...).
		

Crossrefs

Cf. A192232.

Programs

  • Maple
    A192744p := proc(n,x)
        option remember;
        if n = 0 then
            1;
        else
            x*procname(n-1,x)+n! ;
            expand(%) ;
        end if;
    end proc:
    A192744 := proc(n)
        local p;
        p := A192744p(n,x) ;
        while degree(p,x) > 1 do
            p := algsubs(x^2=x+1,p) ;
            p := expand(p) ;
        end do:
        coeftayl(p,x=0,0) ;
    end proc: # R. J. Mathar, Dec 16 2015
  • Mathematica
    q = x^2; s = x + 1; z = 40;
    p[0, n_] := 1; p[n_, x_] := x*p[n - 1, x] + n!;
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}] :=
    FixedPoint[(s PolynomialQuotient @@ #1 +
           PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}]
      (* A192744 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}]
      (* A192745 *)

Formula

G.f.: (1-x)/(1-x-x^2)/Q(0), where Q(k)= 1 - x*(k+1)/(1 - x*(k+1)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, May 20 2013
Conjecture: a(n) +(-n-2)*a(n-1) +2*(n-1)*a(n-2) +3*a(n-3) +(-n+2)*a(n-4)=0. - R. J. Mathar, May 04 2014
Conjecture: (-n+2)*a(n) +(n^2-n-1)*a(n-1) +(-n^2+3*n-3)*a(n-2) -(n-1)^2*a(n-3)
=0. - R. J. Mathar, Dec 16 2015

A001924 Apply partial sum operator twice to Fibonacci numbers.

Original entry on oeis.org

0, 1, 3, 7, 14, 26, 46, 79, 133, 221, 364, 596, 972, 1581, 2567, 4163, 6746, 10926, 17690, 28635, 46345, 75001, 121368, 196392, 317784, 514201, 832011, 1346239, 2178278, 3524546, 5702854, 9227431, 14930317, 24157781, 39088132, 63245948, 102334116, 165580101
Offset: 0

Views

Author

Keywords

Comments

Leading coefficients in certain rook polynomials (for n>=2; see p. 18 of the Riordan paper). - Emeric Deutsch, Mar 08 2004
(1, 3, 7, 14, ...) = row sums of triangle A141289. - Gary W. Adamson, Jun 22 2008
a(n) is the number of nonempty subsets of {1,2,...,n} such that the difference of successive elements is at most 2. See example below. Generally, the o.g.f. for the number of nonempty subsets of {1,2,...,n} such that the difference of successive elements is <= k is: x/((1-x)*(1-2*x+x^(k+1))). Cf. A000217 the case for k=1, A001477 the case for k=0 (counts singleton subsets). - Geoffrey Critzer, Feb 17 2012
-Fibonacci(n-2) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, Dec 31 2012
a(n) is the number of bit strings of length n+1 with the pattern 00 and without the pattern 011, see example. - John M. Campbell, Feb 10 2013
From Jianing Song, Apr 28 2025: (Start)
For n >= 2, a(n-2) is the number of subsets of {1,2,...,n} with 2 or more elements that contain no consecutive elements (i.e., such that the difference of successive elements is at least 2). Note that the number of such subsets with k elements is binomial(n+1-k,k), and Sum_{k=2..floor((n+1)/2)} binomial(n+1-k,k) = F(n+2) - binomial(n+1,0) - binomial(n,1) = F(n+2) - (n+1).
If subsets of {1,2,...,n} are required to contain no consecutive elements module n, then the result is A023548(n-3). (End)

Examples

			a(5) = 26 because there are 31 nonempty subsets of {1,2,3,4,5} but 5 of these have successive elements that differ by 3 or more: {1,4}, {1,5}, {2,5}, {1,2,5}, {1,4,5}. - _Geoffrey Critzer_, Feb 17 2012
From _John M. Campbell_, Feb 10 2013: (Start)
There are a(5) = 26 bit strings with the pattern 00 and without the pattern 011 of length 5+1:
   000000, 000001, 000010, 000100, 000101, 001000,
   001001, 001010, 010000, 010001, 010010, 010100,
   100000, 100001, 100010, 100100, 100101, 101000, 101001,
   110000, 110001, 110010, 110100, 111000, 111001, 111100.
(End)
		

References

  • J. Riordan, Discordant permutations, Scripta Math., 20 (1954), 14-23.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Right-hand column 4 of triangle A011794.
Cf. A065220.

Programs

  • GAP
    List([0..40], n-> Fibonacci(n+4) -n-3); # G. C. Greubel, Jul 08 2019
  • Haskell
    a001924 n = a001924_list !! n
    a001924_list = drop 3 $ zipWith (-) (tail a000045_list) [0..]
    -- Reinhard Zumkeller, Nov 17 2013
    
  • Magma
    [Fibonacci(n+4)-(n+3): n in [0..40]]; // Vincenzo Librandi, Jun 23 2016
    
  • Maple
    A001924:=-1/(z**2+z-1)/(z-1)**2; # Conjectured by Simon Plouffe in his 1992 dissertation.
    ##
    a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <1|-1|-2|3>>^n.
             <<0, 1, 3, 7>>)[1, 1]:
    seq(a(n), n=0..40);  # Alois P. Heinz, Oct 05 2012
  • Mathematica
    a[n_]:= Fibonacci[n+4] -3-n; Array[a, 40, 0]  (* Robert G. Wilson v *)
    LinearRecurrence[{3,-2,-1,1},{0,1,3,7},40] (* Harvey P. Dale, Jan 24 2015 *)
    Nest[Accumulate,Fibonacci[Range[0,40]],2] (* Harvey P. Dale, Jun 15 2016 *)
  • PARI
    a(n)=fibonacci(n+4)-n-3 \\ Charles R Greathouse IV, Feb 24 2011
    
  • Sage
    [fibonacci(n+4) -n-3 for n in (0..40)] # G. C. Greubel, Jul 08 2019
    

Formula

From Wolfdieter Lang: (Start)
G.f.: x/((1-x-x^2)*(1-x)^2).
Convolution of natural numbers n >= 1 with Fibonacci numbers F(k).
a(n) = Fibonacci(n+4) - (3+n). (End)
From Henry Bottomley, Jan 03 2003: (Start)
a(n) = a(n-1) + a(n-2) + n = a(n-1) + A000071(n+2).
a(n) = A001891(n) - a(n-1) = n + A001891(n-1).
a(n) = A065220(n+4) + 1 = A000126(n+1) - 1. (End)
a(n) = Sum_{k=0..n} Sum_{i=0..k} Fibonacci(i). - Benoit Cloitre, Jan 26 2003
a(n) = (sqrt(5)/2 + 1/2)^n*(7*sqrt(5)/10 + 3/2) + (3/2 - 7*sqrt(5)/10)*(sqrt(5)/2 - 1/2)^n*(-1)^n - n - 3. - Paul Barry, Mar 26 2003
a(n) = Sum_{k=0..n} Fibonacci(k)*(n-k). - Benoit Cloitre, Jun 07 2004
A107909(a(n)) = A000225(n) = 2^n - 1. - Reinhard Zumkeller, May 28 2005
a(n) - a(n-1) = A101220(1,1,n). - Ross La Haye, May 31 2006
F(n) + a(n-3) = A133640(n). - Gary W. Adamson, Sep 19 2007
a(n) = A077880(-3-n) = 2*a(n-1) - a(n-3) + 1. - Michael Somos, Dec 31 2012
INVERT transform is A122595. PSUM transform is A014162. PSUMSIGN transform is A129696. BINOMIAL transform of A039834 with 0,1 prepended is this sequence. - Michael Somos, Dec 31 2012
a(n) = A228074(n+1,3) for n > 1. - Reinhard Zumkeller, Aug 15 2013
a(n) = Sum_{k=0..n} Sum_{i=0..n} i * C(n-k,k-i). - Wesley Ivan Hurt, Sep 21 2017
E.g.f.: exp(x/2)*(15*cosh(sqrt(5)*x/2) + 7*sqrt(5)*sinh(sqrt(5)*x/2))/5 - exp(x)*(3 + x). - Stefano Spezia, Jun 25 2022

Extensions

Description improved by N. J. A. Sloane, Jan 01 1997

A101220 a(n) = Sum_{k=0..n} Fibonacci(n-k)*n^k.

Original entry on oeis.org

0, 1, 3, 14, 91, 820, 9650, 140601, 2440317, 49109632, 1123595495, 28792920872, 816742025772, 25402428294801, 859492240650847, 31427791175659690, 1234928473553777403, 51893300561135516404, 2322083099525697299278
Offset: 0

Views

Author

Ross La Haye, Dec 14 2004

Keywords

Comments

In what follows a(i,j,k) denotes a three-dimensional array, the terms a(n) are defined as a(n,n,n) in that array. - Joerg Arndt, Jan 03 2021
Previous name was: Three-dimensional array: a(i,j,k) = expansion of x*(1 + (i-j)*x)/((1-j*x)*(1-x-x^2)), read by a(n,n,n).
a(i,j,k) = the k-th value of the convolution of the Fibonacci numbers (A000045) with the powers of i = Sum_{m=0..k} a(i-1,j,m), both for i = j and i > 0; a(i,j,k) = a(i-1,j,k) + a(j,j,k-1), for i,k > 0; a(i,1,k) = Sum_{m=0..k} a(i-1,0,m), for i > 0. With F = Fibonacci and L = Lucas, then a(1,1,k) = F(k+2) - 1; a(2,1,k) = F(k+3) - 2; a(3,1,k) = L(k+2) - 3; a(4,1,k) = 4*F(k+1) + F(k) - 4; a(1,2,k) = 2^k - F(k+1); a(2,2,k) = 2^(k+1) - F(k+3); a(3,2,k) = 3(2^k - F(k+2)) + F(k); a(4,2,k) = 2^(k+2) - F(k+4) - F(k+2); a(1,3,k) = (3^k + L(k-1))/5, for k > 0; a(2,3,k) = (2 * 3^k - L(k)) /5, for k > 0; a(3,3,k) = (3^(k+1) - L(k+2))/5; a(4,3,k) = (4 * 3^k - L(k+2) - L(k+1))/5, etc..

Examples

			a(1,3,3) = 6 because a(1,3,0) = 0, a(1,3,1) = 1, a(1,3,2) = 2 and 4*2 - 2*1 - 3*0 = 6.
		

Crossrefs

a(0, j, k) = A000045(k).
a(1, 2, k+1) - a(1, 2, k) = A099036(k).
a(3, 2, k+1) - a(3, 2, k) = A104004(k).
a(4, 2, k+1) - a(4, 2, k) = A027973(k).
a(1, 3, k+1) - a(1, 3, k) = A099159(k).
a(i, 0, k) = A109754(i, k).
a(i, i+1, 3) = A002522(i+1).
a(i, i+1, 4) = A071568(i+1).
a(2^i-2, 0, k+1) = A118654(i, k), for i > 0.
Sequences of the form a(n, 0, k): A000045(k+1) (n=1), A000032(k) (n=2), A000285(k-1) (n=3), A022095(k-1) (n=4), A022096(k-1) (n=5), A022097(k-1) (n=6), A022098(k-1) (n=7), A022099(k-1) (n=8), A022100(k-1) (n=9), A022101(k-1) (n=10), A022102(k-1) (n=11), A022103(k-1) (n=12), A022104(k-1) (n=13), A022105(k-1) (n=14), A022106(k-1) (n=15), A022107(k-1) (n=16), A022108(k-1) (n=17), A022109(k-1) (n=18), A022110(k-1) (n=19), A088209(k-2) (n=k-2), A007502(k) (n=k-1), A094588(k) (n=k).
Sequences of the form a(1, n, k): A000071(k+2) (n=1), A027934(k-1) (n=2), A098703(k) (n=3).
Sequences of the form a(2, n, k): A001911(k) (n=1), A008466(k+1) (n=2), A106517(k-1) (n=3).
Sequences of the form a(3, n, k): A027961(k) (n=1), A094688(k) (n=3).
Sequences of the form a(4, n, k): A053311(k-1) (n=1), A027974(k-1) (n=2).

Programs

  • Magma
    A101220:= func< n | (&+[n^k*Fibonacci(n-k): k in [0..n]]) >;
    [A101220(n): n in [0..30]]; // G. C. Greubel, Jun 01 2025
    
  • Mathematica
    Join[{0}, Table[Sum[Fibonacci[n-k]*n^k, {k, 0, n}], {n, 1, 20}]] (* Vaclav Kotesovec, Jan 03 2021 *)
  • PARI
    a(n)=sum(k=0,n,fibonacci(n-k)*n^k) \\ Joerg Arndt, Jan 03 2021
    
  • SageMath
    def A101220(n): return sum(n^k*fibonacci(n-k) for k in range(n+1))
    print([A101220(n) for n in range(31)]) # G. C. Greubel, Jun 01 2025

Formula

a(i, j, 0) = 0, a(i, j, 1) = 1, a(i, j, 2) = i+1; a(i, j, k) = ((j+1)*a(i, j, k-1)) - ((j-1)*a(i, j, k-2)) - (j*a(i, j, k-3)), for k > 2.
a(i, j, k) = Fibonacci(k) + i*a(j, j, k-1), for i, k > 0.
a(i, j, k) = (Phi^k - (-Phi)^-k + i(((j^k - Phi^k) / (j - Phi)) - ((j^k - (-Phi)^-k) / (j - (-Phi)^-1)))) / sqrt(5), where Phi denotes the golden mean/ratio (A001622).
i^k = a(i-1, i, k) + a(i-2, i, k+1).
A104161(k) = Sum_{m=0..k} a(k-m, 0, m).
a(i, j, 0) = 0, a(i, j, 1) = 1, a(i, j, 2) = i+1, a(i, j, 3) = i*(j+1) + 2; a(i, j, k) = (j+2)*a(i, j, k-1) - 2*j*a(i, j, k-2) - a(i, j, k-3) + j*a(i, j, k-4), for k > 3. a(i, j, 0) = 0, a(i, j, 1) = 1; a(i, j, k) = a(i, j, k-1) + a(i, j, k-2) + i * j^(k-2), for k > 1.
G.f.: x*(1 + (i-j)*x)/((1-j*x)*(1-x-x^2)).
a(n, n, n) = Sum_{k=0..n} Fibonacci(n-k) * n^k. - Ross La Haye, Jan 14 2006
Sum_{m=0..k} binomial(k,m)*(i-1)^m = a(i-1,i,k) + a(i-2,i,k+1), for i > 1. - Ross La Haye, May 29 2006
From Ross La Haye, Jun 03 2006: (Start)
a(3, 3, k+1) - a(3, 3, k) = A106517(k).
a(1, 1, k) = A001924(k) - A001924(k-1), for k > 0.
a(2, 1, k) = A001891(k) - A001891(k-1), for k > 0.
a(3, 1, k) = A023537(k) - A023537(k-1), for k > 0.
Sum_{j=0..i+1} a(i-j+1, 0, j) - Sum_{j=0..i} a(i-j, 0, j) = A001595(i). (End)
a(i,j,k) = a(j,j,k) + (i-j)*a(j,j,k-1), for k > 0.
a(n) ~ n^(n-1). - Vaclav Kotesovec, Jan 03 2021

Extensions

New name from Joerg Arndt, Jan 03 2021

A192951 Coefficient of x in the reduction by x^2 -> x+1 of the polynomial p(n,x) defined at Comments.

Original entry on oeis.org

0, 1, 3, 9, 20, 40, 74, 131, 225, 379, 630, 1038, 1700, 2773, 4511, 7325, 11880, 19252, 31182, 50487, 81725, 132271, 214058, 346394, 560520, 906985, 1467579, 2374641, 3842300, 6217024, 10059410, 16276523, 26336025, 42612643, 68948766
Offset: 0

Views

Author

Clark Kimberling, Jul 13 2011

Keywords

Comments

The titular polynomials are defined recursively: p(n,x) = x*p(n-1,x) + 3n - 1, with p(0,x)=1. For an introduction to reductions of polynomials by substitutions such as x^2 -> x+1, see A192232 and A192744.
...
The list of examples at A192744 is extended here; the recurrence is given by p(n,x) = x*p(n-1,x) + v(n), with p(0,x)=1, and the reduction of p(n,x) by x^2 -> x+1 is represented by u1 + u2*x:
...
If v(n)= n, then u1=A001595, u2=A104161.
If v(n)= n-1, then u1=A001610, u2=A066982.
If v(n)= 3n-1, then u1=A171516, u2=A192951.
If v(n)= 3n-2, then u1=A192746, u2=A192952.
If v(n)= 2n-1, then u1=A111314, u2=A192953.
If v(n)= n^2, then u1=A192954, u2=A192955.
If v(n)= -1+n^2, then u1=A192956, u2=A192957.
If v(n)= 1+n^2, then u1=A192953, u2=A192389.
If v(n)= -2+n^2, then u1=A192958, u2=A192959.
If v(n)= 2+n^2, then u1=A192960, u2=A192961.
If v(n)= n+n^2, then u1=A192962, u2=A192963.
If v(n)= -n+n^2, then u1=A192964, u2=A192965.
If v(n)= n(n+1)/2, then u1=A030119, u2=A192966.
If v(n)= n(n-1)/2, then u1=A192967, u2=A192968.
If v(n)= n(n+3)/2, then u1=A192969, u2=A192970.
If v(n)= 2n^2, then u1=A192971, u2=A192972.
If v(n)= 1+2n^2, then u1=A192973, u2=A192974.
If v(n)= -1+2n^2, then u1=A192975, u2=A192976.
If v(n)= 1+n+n^2, then u1=A027181, u2=A192978.
If v(n)= 1-n+n^2, then u1=A192979, u2=A192980.
If v(n)= (n+1)^2, then u1=A001891, u2=A053808.
If v(n)= (n-1)^2, then u1=A192981, u2=A192982.

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> F(n+4)+2*F(n+2)-(3*n+5)); # G. C. Greubel, Jul 12 2019
  • Magma
    I:=[0, 1, 3, 9]; [n le 4 select I[n] else 3*Self(n-1)-2*Self(n-2)-1*Self(n-3)+Self(n-4): n in [1..40]]; // Vincenzo Librandi, Nov 16 2011
    
  • Magma
    F:=Fibonacci; [F(n+4)+2*F(n+2)-(3*n+5): n in [0..40]]; // G. C. Greubel, Jul 12 2019
    
  • Mathematica
    (* First program *)
    q = x^2; s = x + 1; z = 40;
    p[0, x]:= 1;
    p[n_, x_]:= x*p[n-1, x] + 3n - 1;
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}]:= FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}] (* A171516 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192951 *)
    (* Additional programs *)
    LinearRecurrence[{3,-2,-1,1},{0,1,3,9},40] (* Vincenzo Librandi, Nov 16 2011 *)
    With[{F=Fibonacci}, Table[F[n+4]+2*F[n+2]-(3*n+5), {n,0,40}]] (* G. C. Greubel, Jul 12 2019 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; 1,-1,-2,3]^n*[0;1;3;9])[1,1] \\ Charles R Greathouse IV, Mar 22 2016
    
  • PARI
    vector(40, n, n--; f=fibonacci; f(n+4)+2*f(n+2)-(3*n+5)) \\ G. C. Greubel, Jul 12 2019
    
  • Sage
    f=fibonacci; [f(n+4)+2*f(n+2)-(3*n+5) for n in (0..40)] # G. C. Greubel, Jul 12 2019
    

Formula

a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
From Bruno Berselli, Nov 16 2011: (Start)
G.f.: x*(1+2*x^2)/((1-x)^2*(1 - x - x^2)).
a(n) = ((25+13*t)*(1+t)^n + (25-13*t)*(1-t)^n)/(10*2^n) - 3*n - 5 = A000285(n+2) - 3*n - 5 where t=sqrt(5). (End)
a(n) = Fibonacci(n+4) + 2*Fibonacci(n+2) - (3*n+5). - G. C. Greubel, Jul 12 2019

A001883 Number of permutations s of {1,2,...,n} such that |s(i)-i|>1 for each i=1,2,...,n.

Original entry on oeis.org

1, 0, 0, 0, 1, 4, 29, 206, 1708, 15702, 159737, 1780696, 21599745, 283294740, 3995630216, 60312696452, 970234088153, 16571597074140, 299518677455165, 5711583170669554, 114601867572247060, 2413623459384988298, 53238503492701261201, 1227382998752177970288, 29520591675204638641249
Offset: 0

Views

Author

Keywords

Comments

Permanent of the (0,1)-matrix having (i,j)-th entry equal to 0 iff this is on the first lower-diagonal, diagonal or the first upper-diagonal. - Simone Severini, Oct 14 2004

References

  • J. Riordan, "The enumeration of permutations with three-ply staircase restrictions," unpublished memorandum, Bell Telephone Laboratories, Murray Hill, NJ, Oct 1963.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Also a diagonal of A080018.
Column k=0 of A323671.

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(n=0, 1, add(
          `if`(abs(n-i)<=1, 0, b(n-1, s minus {i})), i=s))
        end:
    a:= n-> b(n, {$1..n}):
    seq(a(n), n=0..15);  # Alois P. Heinz, Jul 04 2015
  • Mathematica
    b[n_, s_List] := b[n, s] = If[n == 0, 1, Sum[If[Abs[n-i] <= 1, 0, b[n-1, s ~Complement~ {i}]], {i, s}]]; a[n_] := b[n, Range[n]]; Table[Print[a[n]]; a[n], {n, 4, 24}] (* Jean-François Alcover, Nov 10 2015, after Alois P. Heinz *)
  • PARI
    permRWNb(a)=n=matsize(a)[1]; if(n==1,return(a[1,1])); sg=1; in=vectorv(n); x=in; x=a[,n]-sum(j=1,n,a[,j])/2; p=prod(i=1,n,x[i]); for(k=1,2^(n-1)-1,sg=-sg; j=valuation(k,2)+1; z=1-2*in[j]; in[j]+=z; x+=z*a[,j]; p+=prod(i=1,n,x[i],sg)); return(2*(2*(n%2)-1)*p)
    for(n=1,23,a=matrix(n,n,i,j,abs(i-j)>1);print1(permRWNb(a)",")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 16 2007

Formula

a(n) = (n+1)*a(n-1) - (n-3)*a(n-2) - (n-4)*a(n-3) + (n-4)*a(n-4) + a(n-5) + (-1)^n * Lucas(n-3), n > 4. [Riordan] (Note: There is a slight mistake in Riordan's paper. On p. 3 it should say that a_5 = 3.) - Eric M. Schmidt, Oct 09 2017
From Vaclav Kotesovec, Oct 10 2017: (Start)
a(n) = n*a(n-1) + 4*a(n-2) - 3*(n-3)*a(n-3) + (n-4)*a(n-4) + 2*(n-5)*a(n-5) - (n-7)*a(n-6) - a(n-7).
a(n) ~ exp(-3) * n!.
(End)

Extensions

More terms and better description from Reiner Martin, Oct 14 2002
More terms from Vladimir Baltic, Vladeta Jovovic, Jan 04 2003
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), May 16 2007
a(22)-a(24) from Alois P. Heinz, Jul 04 2015
a(0)-a(3) from Eric M. Schmidt, Oct 09 2017

A011794 Triangle defined by T(n+1, k) = T(n, k-1) + T(n-1, k), T(n,1) = 1, T(1,k) = 1, T(2,k) = min(2,k).

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 3, 4, 5, 1, 3, 6, 7, 8, 1, 4, 7, 11, 12, 13, 1, 4, 10, 14, 19, 20, 21, 1, 5, 11, 21, 26, 32, 33, 34, 1, 5, 15, 25, 40, 46, 53, 54, 55, 1, 6, 16, 36, 51, 72, 79, 87, 88, 89, 1, 6, 21, 41, 76, 97, 125, 133, 142, 143, 144, 1, 7, 22, 57, 92, 148, 176, 212, 221, 231, 232, 233
Offset: 1

Views

Author

Keywords

Examples

			matrix(10,10,n,k,a(n-1,k-1))
  [ 0 0 0 0 0 0 0 0 0 0 ]
  [ 0 1 1 1 1 1 1 1 1 1 ]
  [ 0 1 2 2 2 2 2 2 2 2 ]
  [ 0 1 2 3 3 3 3 3 3 3 ]
  [ 0 1 3 4 5 5 5 5 5 5 ]
  [ 0 1 3 6 7 8 8 8 8 8 ]
Triangle begins as:
  1;
  1, 2;
  1, 2,  3;
  1, 3,  4,  5;
  1, 3,  6,  7,  8;
  1, 4,  7, 11, 12, 13;
  1, 4, 10, 14, 19, 20, 21;
  1, 5, 11, 21, 26, 32, 33, 34;
  1, 5, 15, 25, 40, 46, 53, 54, 55;
  1, 6, 16, 36, 51, 72, 79, 87, 88, 89;
		

Crossrefs

Columns include A008619 and (essentially) A055802, A055803, A055804, A055805, A055806.
Essentially a reflected version of A055801.
Sums include: A039834 (signed row), A131913 (row).

Programs

  • Magma
    function T(n,k) // T = A011794(n,k)
      if k eq 1 or n eq 1 then return 1;
      elif n eq 2 then return Min(2, k);
      else return T(n-1,k-1) + T(n-2,k);
      end if;
    end function;
    [T(n,k): k in [1..n], n in [1..15]]; // G. C. Greubel, Oct 21 2024
    
  • Mathematica
    T[n_, k_]:= T[n, k]= T[n-1, k-1] + T[n-2, k]; T[n_, 1] = 1; T[1, k_] = 1; T[2, k_] := Min[2, k]; Table[T[n, k], {n,15}, {k,n}]//Flatten (* Jean-François Alcover, Feb 26 2013 *)
  • PARI
    T(n,k)=if(n<=0 || k<=0,0, if(n<=2 || k==1, min(n,k), T(n-1,k-1)+T(n-2,k)))
    
  • SageMath
    def T(n, k): # T = A011794
        if (k==1 or n==1): return 1
        elif (n==2): return min(2,k)
        else: return T(n-1, k-1) + T(n-2, k)
    flatten([[T(n, k) for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Oct 21 2024

Formula

T(n,n) = Fibonacci(n+1). - Jean-François Alcover, Feb 26 2013
From G. C. Greubel, Oct 21 2024: (Start)
Sum_{k=1..n} T(n, k) = A131913(n-1).
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = A039834(n).
Sum_{k=1..floor((n+1)/2)} T(n-k+1,k) = (1/2)*((1-(-1)^n)*A074878((n+3)/2) + (1+(-1)^n)*A008466((n+6)/2)) (diagonal row sums).
Sum_{k=1..floor((n+1)/2)} (-1)^(k-1)*T(n-k+1,k) = (-1)^floor((n-1)/2)*A103609(n) + [n=1] (signed diagonal row sums). (End)

Extensions

Entry improved by comments from Michael Somos
More terms added by G. C. Greubel, Oct 21 2024

A261019 Irregular triangle read by rows: T(n,k) (0 <= k <= A261017(n)) = number of binary strings of length n such that the smallest number whose binary representation is not visible in the string is k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 3, 6, 4, 1, 1, 1, 4, 11, 10, 5, 1, 1, 5, 19, 21, 15, 0, 2, 1, 1, 6, 32, 40, 35, 2, 9, 2, 1, 1, 7, 53, 72, 73, 6, 31, 10, 2, 1, 1, 8, 87, 125, 144, 15, 79, 40, 12, 1, 1, 9, 142, 212, 274, 32, 185, 116, 52, 1, 1, 10, 231, 354, 509, 64, 408, 296, 168, 2, 4
Offset: 1

Views

Author

Alois P. Heinz and N. J. A. Sloane, Aug 17 2015

Keywords

Comments

This is a more compact version of the triangle in A261015, ending each row at the last nonzero entry.

Examples

			The first 16 rows are:
1, 1,
1, 1,  1,    1,
1, 1,  2,    3,    1,
1, 1,  3,    6,    4,    1,
1, 1,  4,   11,   10,    5,
1, 1,  5,   19,   21,   15,    0,     2,
1, 1,  6,   32,   40,   35,    2,     9,     2,
1, 1,  7,   53,   72,   73,    6,    31,    10,     2,
1, 1,  8,   87,  125,  144,   15,    79,    40,    12,
1, 1,  9,  142,  212,  274,   32,   185,   116,    52,
1, 1, 10,  231,  354,  509,   64,   408,   296,   168,    2,    4,
1, 1, 11,  375,  585,  931,  120,   864,   699,   461,   24,   24,
1, 1, 12,  608,  960, 1685,  218,  1771,  1557,  1133,  130,  110,   2,   4,
1, 1, 13,  985, 1568, 3027,  385,  3555,  3325,  2612,  471,  387,  14,  24,  0,  16,
1, 1, 14, 1595, 2553, 5409,  668,  7021,  6893,  5759, 1401, 1135,  92, 120,  0,  90, 16,
1, 1, 15, 2582, 4148, 9628, 1142, 13696, 13964, 12309, 3734, 2972, 373, 439, 28, 390, 98, 16,
...
		

Crossrefs

The row lengths are given by A261017.
Cf. A076478, A030308, A000079 (row sums), A261392 (max per row).

Programs

  • Haskell
    import Data.List (isInfixOf, sort, group)
    a261019 n k = a261019_tabf !! (n-1) !! k
    a261019_row n = a261019_tabf !! (n-1)
    a261019_tabf = map (i 0 . group . sort . map f) a076478_tabf
       where f bs = g a030308_tabf where
               g (cs:css) | isInfixOf cs bs = g css
                          | otherwise = foldr (\d v -> 2 * v + d) 0 cs
             i _ [] = []
             i r gss'@(gs:gss) | head gs == r = (length gs) : i (r + 1) gss
                               | otherwise    = 0 : i (r + 1) gss'
    -- Reinhard Zumkeller, Aug 18 2015

A119457 Triangle read by rows: T(n, 1) = n, T(n, 2) = 2*(n-1) for n>1 and T(n, k) = T(n-1, k-1) + T(n-2, k-2) for 2 < k <= n.

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 4, 6, 6, 5, 5, 8, 9, 10, 8, 6, 10, 12, 15, 16, 13, 7, 12, 15, 20, 24, 26, 21, 8, 14, 18, 25, 32, 39, 42, 34, 9, 16, 21, 30, 40, 52, 63, 68, 55, 10, 18, 24, 35, 48, 65, 84, 102, 110, 89, 11, 20, 27, 40, 56, 78, 105, 136, 165, 178, 144, 12, 22, 30, 45, 64, 91, 126, 170, 220, 267, 288, 233
Offset: 1

Views

Author

Reinhard Zumkeller, May 20 2006

Keywords

Examples

			Triangle begins as:
   1;
   2,  2;
   3,  4,  3;
   4,  6,  6,  5;
   5,  8,  9, 10,  8;
   6, 10, 12, 15, 16, 13;
   7, 12, 15, 20, 24, 26,  21;
   8, 14, 18, 25, 32, 39,  42,  34;
   9, 16, 21, 30, 40, 52,  63,  68,  55;
  10, 18, 24, 35, 48, 65,  84, 102, 110,  89;
  11, 20, 27, 40, 56, 78, 105, 136, 165, 178, 144;
  12, 22, 30, 45, 64, 91, 126, 170, 220, 267, 288, 233;
		

Crossrefs

Main diagonal: A023607(n).
Sums: A001891 (row), A355020 (signed row).
Columns: A000027(n) (k=1), A005843(n-1) (k=2), A008585(n-2) (k=3), A008587(n-3) (k=4), A008590(n-4) (k=5), A008595(n-5) (k=6), A008603(n-6) (k=7).
Diagonals: A000045(n+1) (k=n), A006355(n+1) (k=n-1), A022086(n-1) (k=n-2), A022087(n-2) (k=n-3), A022088(n-3) (k=n-4), A022089(n-4) (k=n-5), A022090(n-5) (k=n-6).

Programs

  • Magma
    A119457:= func< n,k | (n-k+1)*Fibonacci(k+1) >;
    [A119457(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 16 2025
    
  • Mathematica
    (* First program *)
    T[n_, 1] := n;
    T[n_ /; n > 1, 2] := 2 n - 2;
    T[n_, k_] /; 2 < k <= n := T[n, k] = T[n - 1, k - 1] + T[n - 2, k - 2];
    Table[T[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 01 2021 *)
    (* Second program *)
    A119457[n_,k_]:= (n-k+1)*Fibonacci[k+1];
    Table[A119457[n,k], {n,13}, {k,n}]//Flatten (* G. C. Greubel, Apr 16 2025 *)
  • SageMath
    def A119457(n,k): return (n-k+1)*fibonacci(k+1)
    print(flatten([[A119457(n,k) for k in range(1,n+1)] for n in range(1,13)])) # G. C. Greubel, Apr 16 2025

Formula

T(n, k) = (n-k+1)*T(k,k) for 1 <= k < n, with T(n, n) = A000045(n+1).
From G. C. Greubel, Apr 15 2025: (Start)
T(n, k) = (n-k+1)*Fibonacci(k+1).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = (1/2)*(1-(-1)^n)*A023652(floor((n+1)/2)) + (1+(-1)^n)*A001891(floor(n/2)).
Sum_{k=1..floor((n+1)/2)} (-1)^(k-1)*T(n-k+1, k) = (1/2)*(1-(-1)^n)*A112469(floor((n-1)/2)) + (1+(-1)^n)*A355020(floor((n-2)/2)). (End)
Showing 1-10 of 35 results. Next