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

A142474 1 followed by A141015.

Original entry on oeis.org

1, 0, 1, 2, 4, 9, 19, 41, 88, 189, 406, 872, 1873, 4023, 8641, 18560, 39865, 85626, 183916, 395033, 848491, 1822473, 3914488, 8407925, 18059374, 38789712, 83316385, 178955183, 384377665, 825604416, 1773314929, 3808901426, 8181135700, 17572253481, 37743426307
Offset: 1

Views

Author

Roger L. Bagula, Sep 21 2008

Keywords

Comments

Essentially the same as A078039, A141015, and A141683.

Crossrefs

Programs

  • Magma
    [n le 3 select (1-(-1)^n)/2 else Self(n-1) +2*Self(n-2) +Self(n-3): n in [1..50]]; // G. C. Greubel, Apr 14 2021
    
  • Maple
    m:=50; S:=series( x*(1-x-x^2)/(1-x-2*x^2-x^3), x, m+1):
    seq(coeff(S, x, j), j=1..m); # G. C. Greubel, Apr 14 2021
  • Mathematica
    m:= 80; Table[SeriesCoefficient[Series[(1+t)/(1+t+t^3), {t,0,m}], n], {n,0,m,2}]
  • PARI
    Vec(x*(1-x-x^2)/(1-x-2*x^2-x^3) + O(x^50)) \\ Colin Barker, Jun 29 2017
    
  • Sage
    def A142474_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1-x-x^2)/(1-x-2*x^2-x^3) ).list()
    a=A142474_list(51); a[1:] # G. C. Greubel, Apr 14 2021

Formula

From Colin Barker, Jun 29 2017: (Start)
G.f.: x*(1 - x - x^2) / (1 - x - 2*x^2 - x^3).
a(n) = a(n-1) + 2*a(n-2) + a(n-3) for n>3.
(End)

Extensions

More terms from G. C. Greubel, Jun 26 2017

A000930 Narayana's cows sequence: a(0) = a(1) = a(2) = 1; thereafter a(n) = a(n-1) + a(n-3).

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 9, 13, 19, 28, 41, 60, 88, 129, 189, 277, 406, 595, 872, 1278, 1873, 2745, 4023, 5896, 8641, 12664, 18560, 27201, 39865, 58425, 85626, 125491, 183916, 269542, 395033, 578949, 848491, 1243524, 1822473, 2670964, 3914488, 5736961, 8407925
Offset: 0

Views

Author

Keywords

Comments

Named after a 14th-century Indian mathematician. [The sequence first appeared in the book "Ganita Kaumudi" (1356) by the Indian mathematician Narayana Pandita (c. 1340 - c. 1400). - Amiram Eldar, Apr 15 2021]
Number of compositions of n into parts 1 and 3. - Joerg Arndt, Jun 25 2011
A Lamé sequence of higher order.
Could have begun 1,0,0,1,1,1,2,3,4,6,9,... (A078012) but that would spoil many nice properties.
Number of tilings of a 3 X n rectangle with straight trominoes.
Number of ways to arrange n-1 tatami mats in a 2 X (n-1) room such that no 4 meet at a point. For example, there are 6 ways to cover a 2 X 5 room, described by 11111, 2111, 1211, 1121, 1112, 212.
Equivalently, number of compositions (ordered partitions) of n-1 into parts 1 and 2 with no two 2's adjacent. E.g., there are 6 such ways to partition 5, namely 11111, 2111, 1211, 1121, 1112, 212, so a(6) = 6. [Minor edit by Keyang Li, Oct 10 2020]
This comment covers a family of sequences which satisfy a recurrence of the form a(n) = a(n-1) + a(n-m), with a(n) = 1 for n = 0...m-1. The generating function is 1/(1-x-x^m). Also a(n) = Sum_{i=0..floor(n/m)} binomial(n-(m-1)*i, i). This family of binomial summations or recurrences gives the number of ways to cover (without overlapping) a linear lattice of n sites with molecules that are m sites wide. Special case: m=1: A000079; m=4: A003269; m=5: A003520; m=6: A005708; m=7: A005709; m=8: A005710.
a(n+2) is the number of n-bit 0-1 sequences that avoid both 00 and 010. - David Callan, Mar 25 2004 [This can easily be proved by the Cluster Method - see for example the Noonan-Zeilberger article. - N. J. A. Sloane, Aug 29 2013]
a(n-4) is the number of n-bit sequences that start and end with 0 but avoid both 00 and 010. For n >= 6, such a sequence necessarily starts 011 and ends 110; deleting these 6 bits is a bijection to the preceding item. - David Callan, Mar 25 2004
Also number of compositions of n+1 into parts congruent to 1 mod m. Here m=3, A003269 for m=4, etc. - Vladeta Jovovic, Feb 09 2005
Row sums of Riordan array (1/(1-x^3), x/(1-x^3)). - Paul Barry, Feb 25 2005
Row sums of Riordan array (1,x(1+x^2)). - Paul Barry, Jan 12 2006
Starting with offset 1 = row sums of triangle A145580. - Gary W. Adamson, Oct 13 2008
Number of digits in A061582. - Dmitry Kamenetsky, Jan 17 2009
From Jon Perry, Nov 15 2010: (Start)
The family a(n) = a(n-1) + a(n-m) with a(n)=1 for n=0..m-1 can be generated by considering the sums (A102547):
1 1 1 1 1 1 1 1 1 1 1 1 1
1 2 3 4 5 6 7 8 9 10
1 3 6 10 15 21 28
1 4 10 20
1
------------------------------
1 1 1 2 3 4 6 9 13 19 28 41 60
with (in this case 3) leading zeros added to each row.
(End)
Number of pairs of rabbits existing at period n generated by 1 pair. All pairs become fertile after 3 periods and generate thereafter a new pair at all following periods. - Carmine Suriano, Mar 20 2011
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n>=3, 2*a(n-3) equals the number of 2-colored compositions of n with all parts >= 3, such that no adjacent parts have the same color. - Milan Janjic, Nov 27 2011
For n>=2, row sums of Pascal's triangle (A007318) with triplicated diagonals. - Vladimir Shevelev, Apr 12 2012
Pisano period lengths of the sequence read mod m, m >= 1: 1, 7, 8, 14, 31, 56, 57, 28, 24, 217, 60, 56, 168, ... (A271953) If m=3, for example, the remainder sequence becomes 1, 1, 1, 2, 0, 1, 0, 0, 1, 1, 1, 2, 0, 1, 0, 0, 1, 1, 1, 2, 0, 1, 0, 0, 1, 1, 1, 2, 0, 1, 0, 0, 1, 1, ... with a period of length 8. - R. J. Mathar, Oct 18 2012
Diagonal sums of triangle A011973. - John Molokach, Jul 06 2013
"In how many ways can a kangaroo jump through all points of the integer interval [1,n+1] starting at 1 and ending at n+1, while making hops that are restricted to {-1,1,2}? (The OGF is the rational function 1/(1 - z - z^3) corresponding to A000930.)" [Flajolet and Sedgewick, p. 373] - N. J. A. Sloane, Aug 29 2013
a(n) is the number of length n binary words in which the length of every maximal run of consecutive 0's is a multiple of 3. a(5) = 4 because we have: 00011, 10001, 11000, 11111. - Geoffrey Critzer, Jan 07 2014
a(n) is the top left entry of the n-th power of the 3X3 matrix [1, 0, 1; 1, 0, 0; 0, 1, 0] or of the 3 X 3 matrix [1, 1, 0; 0, 0, 1; 1, 0, 0]. - R. J. Mathar, Feb 03 2014
a(n-3) is the top left entry of the n-th power of any of the 3 X 3 matrices [0, 1, 0; 0, 1, 1; 1, 0, 0], [0, 0, 1; 1, 1, 0; 0, 1, 0], [0, 1, 0; 0, 0, 1; 1, 0, 1] or [0, 0, 1; 1, 0, 0; 0, 1, 1]. - R. J. Mathar, Feb 03 2014
Counts closed walks of length (n+3) on a unidirectional triangle, containing a loop at one of remaining vertices. - David Neil McGrath, Sep 15 2014
a(n+2) equals the number of binary words of length n, having at least two zeros between every two successive ones. - Milan Janjic, Feb 07 2015
a(n+1)/a(n) tends to x = 1.465571... (decimal expansion given in A092526) in the limit n -> infinity. This is the real solution of x^3 - x^2 -1 = 0. See also the formula by Benoit Cloitre, Nov 30 2002. - Wolfdieter Lang, Apr 24 2015
a(n+2) equals the number of subsets of {1,2,..,n} in which any two elements differ by at least 3. - Robert FERREOL, Feb 17 2016
Let T* be the infinite tree with root 0 generated by these rules: if p is in T*, then p+1 is in T* and x*p is in T*. Let g(n) be the set of nodes in the n-th generation, so that g(0) = {0}, g(1) = {1}, g(2) = {2,x}, g(3) = {3,2x,x+1,x^2}, etc. Let T(r) be the tree obtained by substituting r for x. If a positive integer N such that r = N^(1/3) is not an integer, then the number of (not necessarily distinct) integers in g(n) is A000930(n), for n >= 1. (See A274142.) - Clark Kimberling, Jun 13 2016
a(n-3) is the number of compositions of n excluding 1 and 2, n >= 3. - Gregory L. Simay, Jul 12 2016
Antidiagonal sums of array A277627. - Paul Curtz, May 16 2019
a(n+1) is the number of multus bitstrings of length n with no runs of 3 ones. - Steven Finch, Mar 25 2020
Suppose we have a(n) samples, exactly one of which is positive. Assume the cost for testing a mix of k samples is 3 if one of the samples is positive (but you will not know which sample was positive if you test more than 1) and 1 if none of the samples is positive. Then the cheapest strategy for finding the positive sample is to have a(n-3) undergo the first test and then continue with testing either a(n-4) if none were positive or with a(n-6) otherwise. The total cost of the tests will be n. - Ruediger Jehn, Dec 24 2020

Examples

			The number of compositions of 11 without any 1's and 2's is a(11-3) = a(8) = 13. The compositions are (11), (8,3), (3,8), (7,4), (4,7), (6,5), (5,6), (5,3,3), (3,5,3), (3,3,5), (4,4,3), (4,3,4), (3,4,4). - _Gregory L. Simay_, Jul 12 2016
The compositions from the above example may be mapped to the a(8) compositions of 8 into 1's and 3's using this (more generally applicable) method: replace all numbers greater than 3 with a 3 followed by 1's to make the same total, then remove the initial 3 from the composition. Maintaining the example's order, they become (1,1,1,1,1,1,1,1), (1,1,1,1,1,3), (3,1,1,1,1,1), (1,1,1,1,3,1), (1,3,1,1,1,1), (1,1,1,3,1,1), (1,1,3,1,1,1), (1,1,3,3), (3,1,1,3), (3,3,1,1), (1,3,1,3), (1,3,3,1), (3,1,3,1). - _Peter Munn_, May 31 2017
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A., 2003, id. 8,80.
  • R. K. Guy, "Anyone for Twopins?" in D. A. Klarner, editor, The Mathematical Gardner. Prindle, Weber and Schmidt, Boston, 1981, pp. 2-15. [See p. 12, line 3]
  • H. Langman, Play Mathematics. Hafner, NY, 1962, p. 13.
  • David Sankoff and Lani Haque, Power Boosts for Cluster Tests, in Comparative Genomics, Lecture Notes in Computer Science, Volume 3678/2005, Springer-Verlag. - N. J. A. Sloane, Jul 09 2009
  • 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

For Lamé sequences of orders 1 through 9 see A000045, this sequence, and A017898 - A017904.
Essentially the same as A068921 and A078012.
See also A001609, A145580, A179070, A214551 (same rule except divide by GCD).
A271901 and A271953 give the period of this sequence mod n.
A120562 has the same recurrence for odd n.

Programs

  • GAP
    a:=[1,1,1];; for n in [4..50] do a[n]:=a[n-1]+a[n-3]; od; a; # Muniru A Asiru, Aug 13 2018
    
  • Haskell
    a000930 n = a000930_list !! n
    a000930_list = 1 : 1 : 1 : zipWith (+) a000930_list (drop 2 a000930_list)
    -- Reinhard Zumkeller, Sep 25 2011
    
  • Magma
    [1,1] cat [ n le 3 select n else Self(n-1)+Self(n-3): n in [1..50] ]; // Vincenzo Librandi, Apr 25 2015
    
  • Maple
    f := proc(r) local t1,i; t1 := []; for i from 1 to r do t1 := [op(t1),0]; od: for i from 1 to r+1 do t1 := [op(t1),1]; od: for i from 2*r+2 to 50 do t1 := [op(t1),t1[i-1]+t1[i-1-r]]; od: t1; end; # set r = order
    with(combstruct): SeqSetU := [S, {S=Sequence(U), U=Set(Z, card > 2)}, unlabeled]: seq(count(SeqSetU, size=j), j=3..40); # Zerinvary Lajos, Oct 10 2006
    A000930 := proc(n)
        add(binomial(n-2*k,k),k=0..floor(n/3)) ;
    end proc: # Zerinvary Lajos, Apr 03 2007
    a:= n-> (<<1|1|0>, <0|0|1>, <1|0|0>>^n)[1,1]:
    seq(a(n), n=0..50); # Alois P. Heinz, Jun 20 2008
  • Mathematica
    a[0] = 1; a[1] = a[2] = 1; a[n_] := a[n] = a[n - 1] + a[n - 3]; Table[ a[n], {n, 0, 40} ]
    CoefficientList[Series[1/(1 - x - x^3), {x, 0, 45}], x] (* Zerinvary Lajos, Mar 22 2007 *)
    LinearRecurrence[{1, 0, 1}, {1, 1, 1}, 80] (* Vladimir Joseph Stephan Orlovsky, Feb 11 2012 *)
    a[n_] := HypergeometricPFQ[{(1 - n)/3, (2 - n)/3, -n/3}, {(1 - n)/ 2, -n/2}, -27/4]; Table[a[n], {n, 0, 43}] (* Jean-François Alcover, Feb 26 2013 *)
    Table[-RootSum[1 + #^2 - #^3 &, 3 #^(n + 2) - 11 #^(n + 3) + 2 #^(n + 4) &]/31, {n, 20}] (* Eric W. Weisstein, Feb 14 2025 *)
  • Maxima
    makelist(sum(binomial(n-2*k,k),k,0,n/3),n,0,18); /* Emanuele Munarini, May 24 2011 */
    
  • PARI
    a(n)=polcoeff(exp(sum(m=1,n,((1+sqrt(1+4*x))^m + (1-sqrt(1+4*x))^m)*(x/2)^m/m)+x*O(x^n)),n) \\ Paul D. Hanna, Oct 08 2009
    
  • PARI
    x='x+O('x^66); Vec(1/(1-(x+x^3))) \\ Joerg Arndt, May 24 2011
    
  • PARI
    a(n)=([0,1,0;0,0,1;1,0,1]^n*[1;1;1])[1,1] \\ Charles R Greathouse IV, Feb 26 2017
    
  • Python
    from itertools import islice
    def A000930_gen(): # generator of terms
        blist = [1]*3
        while True:
            yield blist[0]
            blist = blist[1:]+[blist[0]+blist[2]]
    A000930_list = list(islice(A000930_gen(),30)) # Chai Wah Wu, Feb 04 2022
    
  • SageMath
    @CachedFunction
    def a(n): # A000930
        if (n<3): return 1
        else: return a(n-1) + a(n-3)
    [a(n) for n in (0..80)] # G. C. Greubel, Jul 29 2022

Formula

G.f.: 1/(1-x-x^3). - Simon Plouffe in his 1992 dissertation
a(n) = Sum_{i=0..floor(n/3)} binomial(n-2*i, i).
a(n) = a(n-2) + a(n-3) + a(n-4) for n>3.
a(n) = floor(d*c^n + 1/2) where c is the real root of x^3-x^2-1 and d is the real root of 31*x^3-31*x^2+9*x-1 (c = 1.465571... = A092526 and d = 0.611491991950812...). - Benoit Cloitre, Nov 30 2002
a(n) = Sum_{k=0..n} binomial(floor((n+2k-2)/3), k). - Paul Barry, Jul 06 2004
a(n) = Sum_{k=0..n} binomial(k, floor((n-k)/2))(1+(-1)^(n-k))/2. - Paul Barry, Jan 12 2006
a(n) = Sum_{k=0..n} binomial((n+2k)/3,(n-k)/3)*(2*cos(2*Pi*(n-k)/3)+1)/3. - Paul Barry, Dec 15 2006
a(n) = term (1,1) in matrix [1,1,0; 0,0,1; 1,0,0]^n. - Alois P. Heinz, Jun 20 2008
G.f.: exp( Sum_{n>=1} ((1+sqrt(1+4*x))^n + (1-sqrt(1+4*x))^n)*(x/2)^n/n ).
Logarithmic derivative equals A001609. - Paul D. Hanna, Oct 08 2009
a(n) = a(n-1) + a(n-2) - a(n-5) for n>4. - Paul Weisenhorn, Oct 28 2011
For n >= 2, a(2*n-1) = a(2*n-2)+a(2*n-4); a(2*n) = a(2*n-1)+a(2*n-3). - Vladimir Shevelev, Apr 12 2012
INVERT transform of (1,0,0,1,0,0,1,0,0,1,...) = (1, 1, 1, 2, 3, 4, 6, ...); but INVERT transform of (1,0,1,0,0,0,...) = (1, 1, 2, 3, 4, 6, ...). - Gary W. Adamson, Jul 05 2012
G.f.: 1/(G(0)-x) where G(k) = 1 - x^2/(1 - x^2/(x^2 - 1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 16 2012
G.f.: 1 + x/(G(0)-x) where G(k) = 1 - x^2*(2*k^2 + 3*k +2) + x^2*(k+1)^2*(1 - x^2*(k^2 + 3*k +2))/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Dec 27 2012
a(2*n) = A002478(n), a(2*n+1) = A141015(n+1), a(3*n) = A052544(n), a(3*n+1) = A124820(n), a(3*n+2) = A052529(n+1). - Johannes W. Meijer, Jul 21 2013, corrected by Greg Dresden, Jul 06 2020
G.f.: Q(0)/2, where Q(k) = 1 + 1/(1 - x*(4*k+1 + x^2)/( x*(4*k+3 + x^2) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 08 2013
a(n) = v1*w1^n+v3*w2^n+v2*w3^n, where v1,2,3 are the roots of (-1+9*x-31*x^2+31*x^3): [v1=0.6114919920, v2=0.1942540040 - 0.1225496913*I, v3=conjugate(v2)] and w1,2,3 are the roots of (-1-x^2+x^3): [w1=1.4655712319, w2=-0.2327856159 - 0.7925519925*I, w3=conjugate(w2)]. - Gerry Martens, Jun 27 2015
a(n) = (6*A001609(n+3) + A001609(n-7))/31 for n>=7. - Areebah Mahdia, Jun 07 2020
a(n+6)^2 + a(n+1)^2 + a(n)^2 = a(n+5)^2 + a(n+4)^2 + 3*a(n+3)^2 + a(n+2)^2. - Greg Dresden, Jul 07 2021
a(n) = Sum_{i=(n-7)..(n-1)} a(i) / 2. - Jules Beauchamp, May 10 2025

Extensions

Name expanded by N. J. A. Sloane, Sep 07 2012

A140994 Triangle G(n, k), for 0 <= k <= n, read by rows, where G(n, n) = G(n+1, 0) = 1, G(n+2, 1) = 2, G(n+3, 2) = 4, G(n+4, m) = G(n+1, m-2) + G(n+1, m-3) + G(n+2, m-2) + G(n+3, m-1) for n >= 0 and m = 3..(n+3).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 2, 4, 8, 1, 1, 2, 4, 9, 15, 1, 1, 2, 4, 9, 19, 28, 1, 1, 2, 4, 9, 19, 40, 52, 1, 1, 2, 4, 9, 19, 41, 83, 96, 1, 1, 2, 4, 9, 19, 41, 88, 170, 177, 1, 1, 2, 4, 9, 19, 41, 88, 188, 345, 326, 1, 1, 2, 4, 9, 19, 41, 88, 189, 400, 694, 600, 1, 1, 2, 4, 9, 19, 41, 88, 189, 406, 846, 1386, 1104, 1
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Jul 08 2008

Keywords

Comments

From Petros Hadjicostas, Jun 12 2019: (Start)
This is a mirror image of the triangular array A140997. The current array has index of asymmetry s = 2 and index of obliqueness (obliquity) e = 1. Array A140997 has the same index of asymmetry, but has index of obliqueness e = 0. (In other related sequences, the author uses the letter y for the index of asymmetry and the letter z for the index of obliqueness, but on the stone slab that appears over a tomb in a picture that he posted in those sequences, the letters s and e are used instead. See, for example, the documentation for sequences A140998, A141065, A141066, and A141067.)
In general, if the index of asymmetry (from the Pascal triangle A007318) is s, then the order of the recurrence is s + 2 (because the recurrence of the Pascal triangle has order 2). There are also s + 2 infinite sets of initial conditions (as opposed to the Pascal triangle, which has only 2 infinite sets of initial conditions, namely, G(n, 0) = G(n+1, n+1) = 1 for n >= 0).
Pascal's triangle A007318 has s = 0 and is symmetric, arrays A140998 and A140993 have s = 1 (with e = 0 and e = 1, respectively), and arrays A140996 and A140995 have s = 3 (with e = 0 and e = 1, respectively).
If A(x,y) = Sum_{n,k >= 0} G(n, k)*x^n*y^k is the bivariate g.f. for this array (with G(n, k) = 0 for 0 <= n < k) and B(x, y) = Sum_{n, k} A140997(n, k)*x^n*y^k, then A(x, y) = B(x*y, y^(-1)). This can be proved using formal manipulation of double series expansions and the fact G(n, k) = A140997(n, n-k) for 0 <= k <= n.
If we let b(k) = lim_{n -> infinity} G(n, k) for k >= 0, then b(0) = 1, b(1) = 2, b(2) = 4, and b(k) = b(k-1) + 2*b(k-2) + b(k-3) for k >= 3. (The existence of the limit can be proved by induction on k.) It follows that b(k) = A141015(k) for k >= 0.
(End)

Examples

			Triangle begins:
  1
  1 1
  1 2 1
  1 2 4 1
  1 2 4 8 1
  1 2 4 9 15  1
  1 2 4 9 19 28  1
  1 2 4 9 19 40 52   1
  1 2 4 9 19 41 83  96   1
  1 2 4 9 19 41 88 170 177    1
  1 2 4 9 19 41 88 188 345  326    1
  1 2 4 9 19 41 88 189 400  694  600    1
  1 2 4 9 19 41 88 189 406  846 1386 1104 1
... [corrected by _Petros Hadjicostas_, Jun 12 2019]
E.g., G(12, 9) = G(9, 7) + G(9, 6) + G(10, 7) + G(11, 8) = 170 + 88 + 188 + 400 = 846.
		

Crossrefs

Programs

  • Maple
    G := proc(n,k) if k=0 or n =k then 1; elif k= 1 then 2 ; elif k =2 then 4; elif k > n or k < 0 then 0 ; else procname(n-3,k-2)+procname(n-3,k-3)+procname(n-2,k-2)+procname(n-1,k-1) ; end if; end proc: seq(seq(G(n,k),k=0..n),n=0..15) ; # R. J. Mathar, Apr 14 2010
  • Mathematica
    nlim = 50;
    Do[G[n, 0] = 1, {n, 0, nlim}];
    Do[G[n, n] = 1, {n, 1, nlim}];
    Do[G[n + 2, 1] = 2, {n, 0, nlim}];
    Do[G[n + 3, 2] = 4, {n, 0, nlim}];
    Do[G[n + 4, m] =
       G[n + 1, m - 2] + G[n + 1, m - 3] + G[n + 2, m - 2] +
        G[n + 3, m - 1], {n, 0, nlim}, {m, 3, n + 3}];
    A140994 = {}; For[n = 0, n <= nlim, n++,
     For[k = 0, k <= n, k++, AppendTo[A140994, G[n, k]]]];
    A140994 (* Robert Price, Aug 19 2019 *)

Formula

From Petros Hadjicostas, Jun 12 2019: (Start)
G(n, k) = A140997(n, n-k) for 0 <= k <= n.
Bivariate g.f.: Sum_{n,k >= 0} G(n, k)*x^n*y^k = (x^4*y^3 - x^3*y^3 - x^2*y^2 + x^2*y - x*y + 1)/((1- x*y)*(1 - x)*(1- x*y - x^2*y^2 - x^3*y^3 - x^3*y^2)).
(End)

Extensions

Entries checked by R. J. Mathar, Apr 14 2010

A140997 Triangle G(n,k) read by rows, for 0 <= k <= n, where G(n, 0) = G(n+1, n+1) = 1, G(n+2, n+1) = 2, G(n+3, n+1) = 4, and G(n+4, m) = G(n+1, m-1) + G(n+1, m) + G(n+2, m) + G(n+3, m) for n >= 0 and m = 1..n+1.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 8, 4, 2, 1, 1, 15, 9, 4, 2, 1, 1, 28, 19, 9, 4, 2, 1, 1, 52, 40, 19, 9, 4, 2, 1, 1, 96, 83, 41, 19, 9, 4, 2, 1, 1, 177, 170, 88, 41, 19, 9, 4, 2, 1, 1, 326, 345, 188, 88, 41, 19, 9, 4, 2, 1, 1, 600, 694, 400, 189, 88, 41, 19, 9, 4, 2, 1, 1, 1104, 1386, 846, 406, 189, 88, 41, 19, 9, 4, 2, 1, 1, 2031, 2751, 1779, 871, 406, 189, 88, 41, 19, 9, 4, 2, 1, 1, 3736, 5431, 3719, 1866, 872, 406, 189, 88, 41, 19, 9, 4, 2, 1
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Jul 08 2008

Keywords

Comments

From Petros Hadjicostas, Jun 12 2019: (Start)
This is a mirror image of the triangular array A140994. The current array has index of asymmetry s = 2 and index of obliqueness (obliquity) e = 0. Array A140994 has the same index of asymmetry, but has index of obliqueness e = 1. (In other related sequences, the author uses the letter y for the index of asymmetry and the letter z for the index of obliqueness, but on the stone slab that appears over a tomb in a picture that he posted in those sequences, the letters s and e are used instead. See, for example, the documentation for sequences A140998, A141065, A141066, and A141067.)
In general, if the index of asymmetry (from the Pascal triangle A007318) is s, then the order of the recurrence is s + 2 (because the recurrence of the Pascal triangle has order 2). There are also s + 2 infinite sets of initial conditions (as opposed to the Pascal triangle, which has only 2 infinite sets of initial conditions, namely, G(n, 0) = G(n+1, n+1) = 1 for n >= 0).
Pascal's triangle A007318 has s = 0 and is symmetric, arrays A140998 and A140993 have s = 1 (with e = 0 and e = 1, respectively), and arrays A140996 and A140995 have s = 3 (with e = 0 and e = 1, respectively).
(End)

Examples

			Triangle begins:
  1
  1   1
  1   2   1
  1   4   2   1
  1   8   4   2   1
  1  15   9   4   2  1
  1  28  19   9   4  2  1
  1  52  40  19   9  4  2  1
  1  96  83  41  19  9  4  2 1
  1 177 170  88  41 19  9  4 2 1
  1 326 345 188  88 41 19  9 4 2 1
  1 600 694 400 189 88 41 19 9 4 2 1
  ...
E.g., G(14, 2) = G(11, 1) + G(11, 2) + G(12, 2) + G(13, 2) = 600 + 694 + 1386 + 2751 = 5431.
		

Crossrefs

Programs

  • Mathematica
    nlim = 50;
    Do[G[n, 0] = 1, {n, 0, nlim}];
    Do[G[n + 1, n + 1] = 1, {n, 0, nlim}];
    Do[G[n + 2, n + 1] = 2, {n, 0, nlim}];
    Do[G[n + 3, n + 1] = 4, {n, 0, nlim}];
    Do[G[n + 4, m] =
       G[n + 1, m - 1] + G[n + 1, m] + G[n + 2, m] + G[n + 3, m], {n, 0,
       nlim}, {m, 1, n + 1}];
    A140997 = {}; For[n = 0, n <= nlim, n++,
     For[k = 0, k <= n, k++, AppendTo[A140997, G[n, k]]]];
    A140997 (* Robert Price, Aug 25 2019 *)

Formula

From Petros Hadjicostas, Jun 12 2019: (Start)
G(n, k) = A140994(n, n-k) for 0 <= k <= n.
Bivariate g.f.: Sum_{n,k >= 0} G(n,k)*x^n*y^k = (1 - x - x^2 - x^3 + x^2*y + x^4*y)/((1 - x) * (1 - x*y) * (1 - x - x^2 - x^3 - x^3*y)).
Differentiating once w.r.t. y and setting y = 0, we get the g.f. of column k = 1: x/((1 - x) * (1 - x - x^2 - x^3)). This is the g.f. of sequence A008937.
(End)

Extensions

Typo in definition corrected by R. J. Mathar, Sep 19 2008
Name edited by and more terms from Petros Hadjicostas, Jun 12 2019
Deleted extraneous term at a(29) by Robert Price, Aug 25 2019
Added 13 missing terms at a(79) by Robert Price, Aug 25 2019

A154929 A Fibonacci convolution triangle.

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 5, 10, 6, 1, 8, 22, 21, 8, 1, 13, 45, 59, 36, 10, 1, 21, 88, 147, 124, 55, 12, 1, 34, 167, 339, 366, 225, 78, 14, 1, 55, 310, 741, 976, 770, 370, 105, 16, 1, 89, 566, 1557, 2422, 2337, 1443, 567, 136, 18, 1, 144, 1020, 3174, 5696, 6505, 4920, 2485
Offset: 0

Views

Author

Paul Barry, Jan 17 2009

Keywords

Comments

Row sums are A028859. Diagonal sums are A141015(n+1). Inverse is A154930. Product of A030528 and A007318.
Transforms sequence m^n with g.f. 1/(1-m*x) to the sequence with g.f. (1+x)/(1-(m+1)x-(m+1)x^2).
Subtriangle of triangle T(n,k), given by (0, 2, -1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. This triangle is the Riordan array (1, x(1+x)/(1-x-x^2)). - Philippe Deléham, Jan 25 2012

Examples

			Triangle begins
   1;
   2,   1;
   3,   4,   1;
   5,  10,   6,   1;
   8,  22,  21,   8,   1;
  13,  45,  59,  36,  10,   1;
  21,  88, 147, 124,  55,  12,   1;
  34, 167, 339, 366, 225,  78,  14,  1;
  55, 310, 741, 976, 770, 370, 105, 16, 1;
Production array is
     2,    1;
    -1,    2,   1;
     3,   -1,   2,   1;
   -10,    3,  -1,   2,  1;
    36,  -10,   3,  -1,  2,  1;
  -137,   36, -10,   3, -1,  2, 1;
   543, -137,  36, -10,  3, -1, 2, 1;
or ((1+x+sqrt(1+6x+5x^2))/2,x) beheaded.
T(5,3) = T(4,3) + T(4,2) + T(3,3) + T(3,2) = 8 + 21 + 1 + 6 = 36. - _Philippe Deléham_, Jan 18 2009
From _Philippe Deléham_, Jan 25 2012: (Start)
Triangle (0,2,-1/2,-1/2,0,0,0,...) DELTA (1,0,0,0,0,0,...) begins:
  1;
  0,   1;
  0,   2,   1;
  0,   3,   4,   1;
  0,   5,  10,   6,   1;
  0,   8,  22,  21,   8,   1;
  0,  13,  45,  59,  36,  10,   1;
  0,  21,  88, 147, 124,  55,  12,   1; (End)
		

Programs

  • Mathematica
    Table[Sum[Binomial[j + 1, n - j] Binomial[j, k], {j, 0, n}], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Apr 25 2018 *)

Formula

Riordan array ((1+x)/(1-x-x^2), x(1+x)/(1-x-x^2));
Triangle T(n,k) = Sum_{j=0..n} C(j+1,n-j)*C(j,k).
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) + T(n-2,k-1), T(0,0)=1, T(1,0)=2, T(n,k)=0 if k > n. - Philippe Deléham, Jan 18 2009
Sum_{k=0..n} T(n,k)*x^k = A000045(n+1), A028859(n), A125145(n), A086347(n+1) for x=0,1,2,3 respectively. - Philippe Deléham, Jan 19 2009

A141683 a(n) = Sum_{k=1..n} b(k)*a(n - k) for n >= 1, where b(n) = b(n-2) + b(n-3) for n >= 3 with b(0) = 0 and b(1) = b(2) = 1.

Original entry on oeis.org

1, 1, 2, 4, 9, 19, 41, 88, 189, 406, 872, 1873, 4023, 8641, 18560, 39865, 85626, 183916, 395033, 848491, 1822473, 3914488, 8407925, 18059374, 38789712, 83316385, 178955183, 384377665, 825604416, 1773314929, 3808901426
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 07 2008

Keywords

Comments

Essentially the same as A141015. - R. J. Mathar, Sep 14 2008

Crossrefs

Programs

  • Magma
    m:=35; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1-x^2-x^3)/(1-x-2*x^2-x^3))); // G. C. Greubel, Jun 05 2018
  • Mathematica
    (* b = A000931 *)
    b[0]=0; b[1]=1; b[2]=1; b[n_]:= b[n]= b[n-2] + b[n-3];
    a[1]=1; a[n_]:= a[n]= Sum[b[k]*a[n-k], {k,n-1}];
    Table[a[n], {n, 35}]
    (* or *)
    LinearRecurrence[{1, 2, 1}, {1, 1, 2, 4}, 31] (* Georg Fischer, Mar 23 2019 *)
  • PARI
    x='x+O('x^35); Vec(x*(1-x^2-x^3)/(1-x-2*x^2-x^3)) \\ G. C. Greubel, Jun 05 2018
    

Formula

a(n) = Sum_{k=1..n} b(k)*a(n - k) for n >= 1, where b(n) = b(n-2) + b(n-3) for n >= 3 with b(0) = 0 and b(1) = b(2) = 1. [That is, b(n) = A000931(n+4) = A078027(n+6) = A134816(n) = A182097(n+1). - Petros Hadjicostas, Aug 09 2020]
From Colin Barker, Feb 01 2012: (Start)
a(n) = a(n-1) + 2*a(n-2) + a(n-3), n > 4.
G.f.: x*(1 - x^2 - x^3)/(1 - x - 2*x^2 - x^3). (End)
a(n) = A000930(2*n - 3) for n >= 3. - Georg Fischer, Mar 23 2019

A308808 Limiting row sequence of Pascal-like triangle A141021 (with index of asymmetry s = 4).

Original entry on oeis.org

1, 2, 4, 8, 16, 33, 67, 136, 276, 561, 1140, 2316, 4705, 9559, 19421, 39457, 80163, 162864, 330885, 672247, 1365779, 2774802, 5637462, 11453422, 23269491, 47275758, 96048397, 195137952, 396454511, 805461867, 1636426882, 3324667561, 6754603284, 13723075972, 27880662448, 56644103708
Offset: 0

Views

Author

Petros Hadjicostas, Jun 25 2019

Keywords

Comments

In the attached photograph, we see that the index of asymmetry is denoted by s and the index of obliqueness by e. The general recurrence is G(n+s+2, k) = G(n+1, k-e*s+e-1) + Sum_{1 <= m <= s+1} G(n+m, k-e*s+m*e-2*e) for n >= 0 with k = 1..(n+1) when e = 0 and k = (s+1)..(n+s+1) when e = 1. The initial conditions are G(n+x+1, n-e*n+e*x-e+1) = 2^x for x=0..s and n >= 0. There is one more initial condition, namely, G(n, e*n) = 1 for n >= 0.
For s = 0, we get Pascal's triangle A007318. For s = 1, we get A140998 (e = 0) and A140993 (e = 1). For s = 2, we get A140997 (e = 0) and A140994 (e = 1). For s = 3, we get A140996 (e = 0) and A140995 (e = 1). For s = 4, we have arrays A141020 (with e = 0) and A141021 (with e = 1). In some of these arrays, the indices n and k are shifted.
For the triangular array G(n, k) = A141021(n, k), we have G(n+6, k) = G(n+1, k-4) + G(n+1, k-5) + G(n+2, k-4) + G(n+3, k-3) + G(n+4, k-2) + G(n+5, k-1) for n >= 0 and k = 5..(n+5) with G(n+x+1, x) = 2^x for x = 0..4 and n >= 0.
With G(n, k) = A141021(n, k), the current sequence (a(k): k >= 0) is defined by a(k) = lim_{n -> infinity} G(n, k) for k >= 0. Then a(k) = a(k-5) + 2*a(k-4) + a(k-3) + a(k-2) + a(k-1) for k >= 5 with a(x) = 2^x for x = 0..4.

Crossrefs

Formula

a(k) = a(k-5) + 2*a(k-4) + a(k-3) + a(k-2) + a(k-1) for k >= 5 with a(k) = 2^k for k = 0..4.
G.f.: -(x + 1)*(x^2 + 1)/(x^5 + 2*x^4 + x^3 + x^2 + x - 1).
Showing 1-7 of 7 results.