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 135 results. Next

A231575 Indices of primes in A001590.

Original entry on oeis.org

4, 5, 7, 9, 25, 29, 49, 79, 1613, 15205
Offset: 1

Views

Author

Robert Price, Nov 18 2013

Keywords

Comments

a(11) > 2*10^5.

Crossrefs

Programs

  • PARI
    v=[1,0,1]; for(n=4,1e4, if(ispseudoprime(t=v[1]+v[2]+v[3]), print1(n", ")); v=[v[2],v[3],t]) \\ Charles R Greathouse IV, Nov 18 2013

Formula

A001590(a(n)) = A231574(n). - Arthur O'Dwyer, 24 Jul 2024

Extensions

Name clarified by Arthur O'Dwyer, Jul 24 2024

A231574 Primes in A001590.

Original entry on oeis.org

2, 3, 11, 37, 634061, 7256527, 1424681173049, 123937002926372177911
Offset: 1

Views

Author

Robert Price, Nov 18 2013

Keywords

Comments

a(9) contains 427 digits and is too large to include here.
a(10) contains 4024 digits and is too large to include here.

Crossrefs

Extensions

Name clarified by Arthur O'Dwyer, Jul 24 2024

A213816 Tribonacci sequences A000073 and A001590 interleaved.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 6, 7, 11, 13, 20, 24, 37, 44, 68, 81, 125, 149, 230, 274, 423, 504, 778, 927, 1431, 1705, 2632, 3136, 4841, 5768, 8904, 10609, 16377, 19513, 30122, 35890, 55403, 66012, 101902, 121415, 187427, 223317, 344732, 410744, 634061, 755476, 1166220
Offset: 1

Views

Author

Loeky Haryanto, Jun 22 2012

Keywords

Comments

Bruce (see link) formulated the sequence using the following two equations:
a(2n) = a(2n-1)+a(2n-3),
a(2n+1) = a(2n-1)+a(2n-2),
with n>1 and initial conditions a(1)=a(2)=a(3)= 1.
These equations lead to a pair of tribonacci-type recurrence equations, for n>2:
a(2n+1) = a(2n-1)+a(2n-3)+a(2n-5),
a(2n+2) = a(2n)+a(2n-2)+a(2n-4).
It could be more appropriate to consider the sequence as a kind of two-dimensional tribonacci sequence (a(2n-1),a(2n)), i.e. as (1, 1), (1, 2), (2, 3), (4, 6), (7, 11), (13, 20), (24, 37), (44, 68), (81, 125), (149, 230), (274, 423), (504, 778), (927, 1431), (1705, 2632), (3136, 4841),... since after the first three initial pairs, the next pair can be obtained by adding three previous pairs component-wise. However, the first three initial pairs (1, 1), (1, 2), (2, 3) are redundant in comparison with the original integer sequence that needs only three initial integers 1, 1 and 1.
One method to construct the two-dimensional sequence is by using the well-known tribonacci-related morphism f with f(a) = ab, f(b) = ac, f(c) = a on the monoid of strings over the alphabet {a, b, c}. Using component-wise map, the following sequence of pairs is obtained: (c,b), (a, ac), (ab, aba), (abac, abacab), (abacaba, abacabaabac), (abacabaabacab, abacabaabacababacaba), ...; which is initialized by the pair (c,b) and any pair (x,y) is followed by (f(x),f(y)). The length of every string in every component consitutes the two-dimensional sequence.

Examples

			The first 14 pairs of string and its length are
(c, 1);
(b, 1);
(a, 1);
(ac, 2);
(ab, 2);
(aba, 3);
(abac, 4);
(abacab, 6);
(abacaba, 7);
(abacabaabac, 11);
(abacabaabacab, 13);
(abacabaabacababacaba, 20);
(abacabaabacababacabaabac, 24);
(abacabaabacababacabaabacabacabaabacab, 37); ...
		

Crossrefs

Cf. A000073.

Programs

  • Magma
    I:=[1, 1, 1, 2, 2, 3]; [n le 6 select I[n] else Self(n-2) + Self(n-4) + Self(n-6): n in [1..50]]; // G. C. Greubel, Nov 03 2018
  • Maple
    with(StringTools):
    # The following procedure defines the morphism f
    Morphf := proc (x::string) local Start, L, Init, i;
    Init := x;
    L := length(Init);
    Start := 1;
    for i from Start to 2*L do
       if Init[i] = "c" then
             Init := Insert(Init, i, "a");     i := i+1; L := L+1;
             Init := Delete(Init, i-1 .. i-1); i := i-1; L := L-1;
       elif Init[i] = "b" then
             Init := Insert(Init, i, "ac");    i := i+2; L := L+2;
             Init := Delete(Init, i-2 .. i-2); i := i-1; L := L-1;
       elif Init[i] = "a" then
             Init := Insert(Init, i, "b");     i := i+1; L := L+1;
       end if;
    end do;
    eval(Init);
    end proc:
    #The following procedure is intended to create sequence of
    #strings c, b, a, ac, ab, aba, abac, ..., etc, obtained by
    #iterating the morphism f n times but it starts from the third
    #string "a", i.e. leaving the first two strings "c" and "b"
    #behind:
    TribWord := proc (x1, x2::string, n) local A, B, C, i;
    A := x1; B := x2;
    for i to n do
       if type(i, odd) = true then
          A := Morphf(A);
          C := A;
       else
          B := Morphf(B); C := B
       end if;
    end do;
    eval(C);
    end proc;
    #The following command will print a(1), a(2), ..., a(30).
    for i to 30 do
    printf("%d%s", length(TribWord("c", "b", i-2)), `, `);
    end do
  • Mathematica
    LinearRecurrence[{0, 1, 0, 1, 0, 1}, {1, 1, 1, 2, 2, 3}, 48] (* Bruno Berselli, Jun 25 2012 *)
  • PARI
    x='x+O('x^50); Vec(x*(1+x+x^3)/(1-x^2-x^4-x^6)) \\ G. C. Greubel, Nov 03 2018
    

Formula

G.f.: x*(1+x+x^3)/(1-x^2-x^4-x^6). [corrected by G. C. Greubel, Nov 03 2018]
a(1) = a(2) = a(3) = 1; for n>1:
a(2n) = a(2n-1) + a(2n-3),
a(2n+1) = a(2n-1) + a(2n-2).

A145579 Eigentriangle, row sums = A001590.

Original entry on oeis.org

1, 1, 1, 0, 1, 2, 1, 0, 2, 3, 1, 1, 0, 3, 6, 0, 1, 2, 0, 6, 11, 1, 0, 2, 3, 0, 11, 20, 1, 1, 0, 3, 6, 0, 20, 37, 0, 1, 2, 0, 6, 11, 0, 37, 68, 1, 0, 2, 3, 0, 11, 20, 0, 68, 125
Offset: 3

Views

Author

Gary W. Adamson, Oct 13 2008

Keywords

Comments

Row sums = A001590 starting (1, 2, 3, 6, 11, 20, 37,...).
Sum of n-th row terms = rightmost term of next row.

Examples

			First few rows of the triangle =
1;
1, 1;
0, 1, 2;
1, 0, 2, 3;
1, 1, 0, 3, 6;
0, 1, 2, 0, 6, 11;
1, 0, 2, 3, 0, 11, 20;
1, 1, 0, 3, 6, 0, 20, 37;
0, 1, 2, 0, 6, 11, 0, 37, 68;
1, 0, 2, 3, 0, 11, 20, 0, 68, 125;
...
Row 7 = (1, 1, 0, 3, 6) = termwise products of (1, 1, 0, 1, 1) and (1, 1, 2, 3, 6).
		

Crossrefs

Formula

Let M = an infinite lower triangular matrix with (1, 1, 0, 1, 1, 0,...) in every column and X = a diagonalized matrix of A001590: (1, 1, 2, 3, 6, 11, 20, 37,...), (i.e. A001590 starting with offset 3 as a diagonal prefaced with a 1; and the rest zeros). Triangle A145579 = M * X.

Extensions

Alignment of example rows and unintentional concatenation of values fixed by Charles J. Daniels (chajadan(AT)gmail.com), Dec 05 2009

A294720 Palindromes in tribonacci sequence with initial values 0,1,0 (A001590).

Original entry on oeis.org

0, 1, 2, 3, 6, 11, 7256527
Offset: 1

Views

Author

Chai Wah Wu, Nov 07 2017

Keywords

Comments

7256527 is probably the last term.

Crossrefs

Programs

  • Mathematica
    a = c = 0; b = 1; lst = {0}; While[a < 10^7, d = a + b + c; If[ Reverse[idn = IntegerDigits[d]] == idn, AppendTo[lst, d]]; a = b; b = c; c = d]; lst (* Robert G. Wilson v, Nov 09 2017 *)

A349700 Difference between 4*A001590(n+2) and A075092(n).

Original entry on oeis.org

-6, 4, 6, 0, 18, 24, 30, 92, 138, 236, 518, 856, 1570, 3072, 5374, 9972, 18714, 33684, 62406, 115440, 210482, 388776, 715934, 1312460, 2419114, 4449532, 8174406, 15049672, 27675714, 50884368, 93629694, 172187364, 316668474, 582540836, 1071371910, 1970517728
Offset: 0

Views

Author

Wojciech Florek, Nov 25 2021

Keywords

Comments

Tribonacci numbers 4*A001590(n+2) (i.e., tribonacci numbers t(n) = t(n-1) + t(n-2) + t(n-3) with t(0) = 0, t(1) = 4, t(2) = 8) for n > 2 are numbers of ternary sequences (q(1),q(2),...,q(n)), q(i) = 0,1,2, of length n such that all triples (q(i),q(i+1),q(i+2)) contain digits 0 and 1 at least once. In the other words {0,1} is a subset of each {q(i),q(i+1),q(i+2)}. Similarly, A075092(n), for n > 2, presents a number of ternary cyclic sequences with this property. Hence, a(n), for n > 2, gives a number of (ordinary) sequences which do not lead to cyclic sequences with triples (q(n-1),q(n),q(1)) and (q(n),q(1),q(2)) satisfying the above formulated condition. The special cases, n = 1,2, can be included in a way proposed in A001644.
The recurrence formula is the same as this for A075092, with different initial conditions.

Examples

			If n = 4, then there are 24 finite sequences: 0010, 0011, 0012, 0100, 0101, 0102, 0110, 0120, 0210, nine analogous starting with 1, 2010, 2011, 2012, 2100, 2101, and 2102. Only six of them, namely  0011, 0101, 0110, 1001, 1010, 1100, yield cyclic sequences satisfying the restriction imposed. Therefore, a(4) = 24 - 6 = 18.
		

Crossrefs

Programs

  • Mathematica
    nterms=50;LinearRecurrence[{0,1,4,1,0,-1},{-6,4,6,0,18,24},nterms] (* Paolo Xausa, Nov 26 2021 *)

Formula

a(n) = a(n-2) + 4*a(n-3) + a(n-4) - a(n-6), a(0) = -6, a(1) = 4, a(2) = 6, a(3) = 0, a(4) = 18, a(5) = 24.
G.f.: (4*x^5-2*x^4-20*x^3-12*x^2-4*x+6)/(-x^6+x^4+4*x^3+x^2-1).

A000073 Tribonacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3) for n >= 3 with a(0) = a(1) = 0 and a(2) = 1.

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149, 274, 504, 927, 1705, 3136, 5768, 10609, 19513, 35890, 66012, 121415, 223317, 410744, 755476, 1389537, 2555757, 4700770, 8646064, 15902591, 29249425, 53798080, 98950096, 181997601, 334745777, 615693474, 1132436852
Offset: 0

Views

Author

Keywords

Comments

The name "tribonacci number" is less well-defined than "Fibonacci number". The sequence A000073 (which begins 0, 0, 1) is probably the most important version, but the name has also been applied to A000213, A001590, and A081172. - N. J. A. Sloane, Jul 25 2024
Also (for n > 1) number of ordered trees with n+1 edges and having all leaves at level three. Example: a(4)=2 because we have two ordered trees with 5 edges and having all leaves at level three: (i) one edge emanating from the root, at the end of which two paths of length two are hanging and (ii) one path of length two emanating from the root, at the end of which three edges are hanging. - Emeric Deutsch, Jan 03 2004
a(n) is the number of compositions of n-2 with no part greater than 3. Example: a(5)=4 because we have 1+1+1 = 1+2 = 2+1 = 3. - Emeric Deutsch, Mar 10 2004
Let A denote the 3 X 3 matrix [0,0,1;1,1,1;0,1,0]. a(n) corresponds to both the (1,2) and (3,1) entries in A^n. - Paul Barry, Oct 15 2004
Number of permutations satisfying -k <= p(i)-i <= r, i=1..n-2, with k=1, r=2. - Vladimir Baltic, Jan 17 2005
Number of binary sequences of length n-3 that have no three consecutive 0's. Example: a(7)=13 because among the 16 binary sequences of length 4 only 0000, 0001 and 1000 have 3 consecutive 0's. - Emeric Deutsch, Apr 27 2006
Therefore, the complementary sequence to A050231 (n coin tosses with a run of three heads). a(n) = 2^(n-3) - A050231(n-3) - Toby Gottfried, Nov 21 2010
Convolved with the Padovan sequence = row sums of triangle A153462. - Gary W. Adamson, Dec 27 2008
For n > 1: row sums of the triangle in A157897. - Reinhard Zumkeller, Jun 25 2009
a(n+2) is the top left entry of the n-th power of any of the 3 X 3 matrices [1, 1, 1; 0, 0, 1; 1, 0, 0] or [1, 1, 0; 1, 0, 1; 1, 0, 0] or [1, 1, 1; 1, 0, 0; 0, 1, 0] or [1, 0, 1; 1, 0, 0; 1, 1, 0]. - R. J. Mathar, Feb 03 2014
a(n-1) is the top left entry of the n-th power of any of the 3 X 3 matrices [0, 0, 1; 1, 1, 1; 0, 1, 0], [0, 1, 0; 0, 1, 1; 1, 1, 0], [0, 0, 1; 1, 0, 1; 0, 1, 1] or [0, 1, 0; 0, 0, 1; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
Also row sums of A082601 and of A082870. - Reinhard Zumkeller, Apr 13 2014
Least significant bits are given in A021913 (a(n) mod 2 = A021913(n)). - Andres Cicuttin, Apr 04 2016
The nonnegative powers of the tribonacci constant t = A058265 are t^n = a(n)*t^2 + (a(n-1) + a(n-2))*t + a(n-1)*1, for n >= 0, with a(-1) = 1 and a(-2) = -1. This follows from the recurrences derived from t^3 = t^2 + t + 1. See the example in A058265 for the first nonnegative powers. For the negative powers see A319200. - Wolfdieter Lang, Oct 23 2018
The term "tribonacci number" was coined by Mark Feinberg (1963), a 14-year-old student in the 9th grade of the Susquehanna Township Junior High School in Pennsylvania. He died in 1967 in a motorcycle accident. - Amiram Eldar, Apr 16 2021
Andrews, Just, and Simay (2021, 2022) remark that it has been suggested that this sequence is mentioned in Charles Darwin's Origin of Species as bearing the same relation to elephant populations as the Fibonacci numbers do to rabbit populations. - N. J. A. Sloane, Jul 12 2022

Examples

			G.f. = x^2 + x^3 + 2*x^4 + 4*x^5 + 7*x^6 + 13*x^7 + 24*x^8 + 44*x^9 + 81*x^10 + ...
		

References

  • M. Agronomof, Sur une suite récurrente, Mathesis (Series 4), Vol. 4 (1914), pp. 125-126.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 47, ex. 4.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 1.2.2.
  • Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
  • J. Riordan, An Introduction to Combinatorial Analysis, Princeton University Press, Princeton, NJ, 1978.
  • 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

Cf. A000045, A000078, A000213, A000931, A001590 (first differences, also a(n)+a(n+1)), A001644, A008288 (tribonacci triangle), A008937 (partial sums), A021913, A027024, A027083, A027084, A046738 (Pisano periods), A050231, A054668, A062544, A063401, A077902, A081172, A089068, A118390, A145027, A153462, A230216.
A057597 is this sequence run backwards: A057597(n) = a(1-n).
Row 3 of arrays A048887 and A092921 (k-generalized Fibonacci numbers).
Partitions: A240844 and A117546.
Cf. also A092836 (subsequence of primes), A299399 = A092835 + 1 (indices of primes).

Programs

  • GAP
    a:=[0,0,1];; for n in [4..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]; od; a; # Muniru A Asiru, Oct 24 2018
  • Haskell
    a000073 n = a000073_list !! n
    a000073_list = 0 : 0 : 1 : zipWith (+) a000073_list (tail
                              (zipWith (+) a000073_list $ tail a000073_list))
    -- Reinhard Zumkeller, Dec 12 2011
    
  • Magma
    [n le 3 select Floor(n/3) else Self(n-1)+Self(n-2)+Self(n-3): n in [1..70]]; // Vincenzo Librandi, Jan 29 2016
    
  • Maple
    a:= n-> (<<0|1|0>, <0|0|1>, <1|1|1>>^n)[1,3]:
    seq(a(n), n=0..40);  # Alois P. Heinz, Dec 19 2016
    # second Maple program:
    A000073:=proc(n) option remember; if n <= 1 then 0 elif n=2 then 1 else procname(n-1)+procname(n-2)+procname(n-3); fi; end; # N. J. A. Sloane, Aug 06 2018
  • Mathematica
    CoefficientList[Series[x^2/(1 - x - x^2 - x^3), {x, 0, 50}], x]
    a[0] = a[1] = 0; a[2] = 1; a[n_] := a[n] = a[n - 1] + a[n - 2] + a[n - 3]; Array[a, 36, 0] (* Robert G. Wilson v, Nov 07 2010 *)
    LinearRecurrence[{1, 1, 1}, {0, 0, 1}, 60] (* Vladimir Joseph Stephan Orlovsky, May 24 2011 *)
    a[n_] := SeriesCoefficient[If[ n < 0, x/(1 + x + x^2 - x^3), x^2/(1 - x - x^2 - x^3)], {x, 0, Abs @ n}] (* Michael Somos, Jun 01 2013 *)
    Table[-RootSum[-1 - # - #^2 + #^3 &, -#^n - 9 #^(n + 1) + 4 #^(n + 2) &]/22, {n, 0, 20}] (* Eric W. Weisstein, Nov 09 2017 *)
  • Maxima
    A000073[0]:0$
    A000073[1]:0$
    A000073[2]:1$
    A000073[n]:=A000073[n-1]+A000073[n-2]+A000073[n-3]$
      makelist(A000073[n], n, 0, 40);  /* Emanuele Munarini, Mar 01 2011 */
    
  • PARI
    {a(n) = polcoeff( if( n<0, x / ( 1 + x + x^2 - x^3), x^2 / ( 1 - x - x^2 - x^3) ) + x * O(x^abs(n)), abs(n))}; /* Michael Somos, Sep 03 2007 */
    
  • PARI
    my(x='x+O('x^99)); concat([0, 0], Vec(x^2/(1-x-x^2-x^3))) \\ Altug Alkan, Apr 04 2016
    
  • PARI
    a(n)=([0,1,0;0,0,1;1,1,1]^n)[1,3] \\ Charles R Greathouse IV, Apr 18 2016, simplified by M. F. Hasler, Apr 18 2018
    
  • Python
    def a(n, adict={0:0, 1:0, 2:1}):
        if n in adict:
            return adict[n]
        adict[n]=a(n-1)+a(n-2)+a(n-3)
        return adict[n] # David Nacin, Mar 07 2012
    from functools import cache
    @cache
    def A000073(n: int) -> int:
        if n <= 1: return 0
        if n == 2: return 1
        return A000073(n-1) + A000073(n-2) + A000073(n-3) # Peter Luschny, Nov 21 2022
    

Formula

G.f.: x^2/(1 - x - x^2 - x^3).
G.f.: x^2 / (1 - x / (1 - x / (1 + x^2 / (1 + x)))). - Michael Somos, May 12 2012
G.f.: Sum_{n >= 0} x^(n+2) *[ Product_{k = 1..n} (k + k*x + x^2)/(1 + k*x + k*x^2) ] = x^2 + x^3 + 2*x^4 + 4*x^5 + 7*x^6 + 13*x^7 + ... may be proved by the method of telescoping sums. - Peter Bala, Jan 04 2015
a(n+1)/a(n) -> A058265. a(n-1)/a(n) -> A192918.
a(n) = central term in M^n * [1 0 0] where M = the 3 X 3 matrix [0 1 0 / 0 0 1 / 1 1 1]. (M^n * [1 0 0] = [a(n-1) a(n) a(n+1)].) a(n)/a(n-1) tends to the tribonacci constant, 1.839286755... = A058265, an eigenvalue of M and a root of x^3 - x^2 - x - 1 = 0. - Gary W. Adamson, Dec 17 2004
a(n+2) = Sum_{k=0..n} T(n-k, k), where T(n, k) = trinomial coefficients (A027907). - Paul Barry, Feb 15 2005
A001590(n) = a(n+1) - a(n); A001590(n) = a(n-1) + a(n-2) for n > 1; a(n) = (A000213(n+1) - A000213(n))/2; A000213(n-1) = a(n+2) - a(n) for n > 0. - Reinhard Zumkeller, May 22 2006
Let C = the tribonacci constant, 1.83928675...; then C^n = a(n)*(1/C) + a(n+1)*(1/C + 1/C^2) + a(n+2)*(1/C + 1/C^2 + 1/C^3). Example: C^4 = 11.444...= 2*(1/C) + 4*(1/C + 1/C^2) + 7*(1/C + 1/C^2 + 1/C^3). - Gary W. Adamson, Nov 05 2006
a(n) = j*C^n + k*r1^n + L*r2^n where C is the tribonacci constant (C = 1.8392867552...), real root of x^3-x^2-x-1=0, and r1 and r2 are the two other roots (which are complex), r1 = m+p*i and r2 = m-p*i, where i = sqrt(-1), m = (1-C)/2 (m = -0.4196433776...) and p = ((3*C-5)*(C+1)/4)^(1/2) = 0.6062907292..., and where j = 1/((C-m)^2 + p^2) = 0.1828035330..., k = a+b*i, and L = a-b*i, where a = -j/2 = -0.0914017665... and b = (C-m)/(2*p*((C-m)^2 + p^2)) = 0.3405465308... . - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 23 2007
a(n+1) = 3*c*((1/3)*(a+b+1))^n/(c^2-2*c+4) where a=(19+3*sqrt(33))^(1/3), b=(19-3*sqrt(33))^(1/3), c=(586+102*sqrt(33))^(1/3). Round to the nearest integer. - Al Hakanson (hawkuu(AT)gmail.com), Feb 02 2009
a(n) = round(3*((a+b+1)/3)^n/(a^2+b^2+4)) where a=(19+3*sqrt(33))^(1/3), b=(19-3*sqrt(33))^(1/3).. - Anton Nikonov
Another form of the g.f.: f(z) = (z^2-z^3)/(1-2*z+z^4). Then we obtain a(n) as a sum: a(n) = Sum_{i=0..floor((n-2)/4)} ((-1)^i*binomial(n-2-3*i,i)*2^(n-2-4*i)) - Sum_{i=0..floor((n-3)/4)} ((-1)^i*binomial(n-3-3*i,i)*2^(n-3-4*i)) with natural convention: Sum_{i=m..n} alpha(i) = 0 for m > n. - Richard Choulet, Feb 22 2010
a(n+2) = Sum_{k=0..n} Sum_{i=k..n, mod(4*k-i,3)=0} binomial(k,(4*k-i)/3)*(-1)^((i-k)/3)*binomial(n-i+k-1,k-1). - Vladimir Kruchinin, Aug 18 2010
a(n) = 2*a(n-2) + 2*a(n-3) + a(n-4). - Gary Detlefs, Sep 13 2010
Sum_{k=0..2*n} a(k+b)*A027907(n,k) = a(3*n+b), b >= 0 (see A099464, A074581).
a(n) = 2*a(n-1) - a(n-4), with a(0)=a(1)=0, a(2)=a(3)=1. - Vincenzo Librandi, Dec 20 2010
Starting (1, 2, 4, 7, ...) is the INVERT transform of (1, 1, 1, 0, 0, 0, ...). - Gary W. Adamson, May 13 2013
G.f.: Q(0)*x^2/2, where Q(k) = 1 + 1/(1 - x*(4*k+1 + x + x^2)/( x*(4*k+3 + x + x^2) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 09 2013
a(n+2) = Sum_{j=0..floor(n/2)} Sum_{k=0..j} binomial(n-2*j,k)*binomial(j,k)*2^k. - Tony Foster III, Sep 08 2017
Sum_{k=0..n} (n-k)*a(k) = (a(n+2) + a(n+1) - n - 1)/2. See A062544. - Yichen Wang, Aug 20 2020
a(n) = A008937(n-1) - A008937(n-2) for n >= 2. - Peter Luschny, Aug 20 2020
From Yichen Wang, Aug 27 2020: (Start)
Sum_{k=0..n} a(k) = (a(n+2) + a(n) - 1)/2. See A008937.
Sum_{k=0..n} k*a(k) = ((n-1)*a(n+2) - a(n+1) + n*a(n) + 1)/2. See A337282. (End)
For n > 1, a(n) = b(n) where b(1) = 1 and then b(n) = Sum_{k=1..n-1} b(n-k)*A000931(k+2). - J. Conrad, Nov 24 2022
Conjecture: the congruence a(n*p^(k+1)) + a(n*p^k) + a(n*p^(k-1)) == 0 (mod p^k) holds for positive integers k and n and for all the primes p listed in A106282. - Peter Bala, Dec 28 2022
Sum_{k=0..n} k^2*a(k) = ((n^2-4*n+6)*a(n+1) - (2*n^2-2*n+5)*a(n) + (n^2-2*n+3)*a(n-1) - 3)/2. - Prabha Sivaramannair, Feb 10 2024
a(n) = Sum_{r root of x^3-x^2-x-1} r^n/(3*r^2-2*r-1). - Fabian Pereyra, Nov 23 2024

Extensions

Minor edits by M. F. Hasler, Apr 18 2018
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021

A000213 Tribonacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3) with a(0)=a(1)=a(2)=1.

Original entry on oeis.org

1, 1, 1, 3, 5, 9, 17, 31, 57, 105, 193, 355, 653, 1201, 2209, 4063, 7473, 13745, 25281, 46499, 85525, 157305, 289329, 532159, 978793, 1800281, 3311233, 6090307, 11201821, 20603361, 37895489, 69700671, 128199521, 235795681, 433695873, 797691075, 1467182629
Offset: 0

Views

Author

Keywords

Comments

The name "tribonacci number" is less well-defined than "Fibonacci number". The sequence A000073 (which begins 0, 0, 1) is probably the most important version, but the name has also been applied to A000213, A001590, and A081172. - N. J. A. Sloane, Jul 25 2024
Number of (n-1)-bit binary sequences with each one adjacent to a zero. - R. H. Hardin, Dec 24 2007
The binomial transform is A099216. The inverse binomial transform is (-1)^n*A124395(n). - R. J. Mathar, Aug 19 2008
Equals INVERT transform of (1, 0, 2, 0, 2, 0, 2, ...). a(6) = 17 = (1, 1, 1, 3, 5, 9) dot (0, 2, 0, 2, 0, 1) = (0 + 2 + 0 + 6 + 0 + 9) = 17. - Gary W. Adamson, Apr 27 2009
From John M. Campbell, May 16 2011: (Start)
Equals the number of tilings of a 2 X n grid using singletons and "S-shaped tetrominoes" (i.e., shapes of the form Polygon[{{0, 0}, {2, 0}, {2, 1}, {3, 1}, {3, 2}, {1, 2}, {1, 1}, {0, 1}}]).
Also equals the number of tilings of a 2 X n grid using singletons and "T-shaped tetrominoes" (i.e., shapes of the form Polygon[{{0, 0}, {3, 0}, {3, 1}, {2, 1}, {2, 2}, {1, 2}, {1, 1}, {0, 1}}]). (End)
Pisano period lengths: 1, 1, 13, 4, 31, 13, 48, 8, 39, 31, 110, 52, 168, 48, 403, 16, 96, 39, 360, 124, ... (differs from A106293). - R. J. Mathar, Aug 10 2012
a(n) is the number of compositions of n with no consecutive 1's. a(4) = 5 because we have: 4, 3+1, 1+3, 2+2, 1+2+1. Cf. A239791, A003242. - Geoffrey Critzer, Mar 27 2014
a(n+2) is the number of words of length n over alphabet {1,2,3} without having {11,12,22,23} as substrings. - Ran Pan, Sep 16 2015
Satisfies Benford's law [see A186190]. - N. J. A. Sloane, Feb 09 2017
a(n) is also the number of dominating sets on the (n-1)-path graph. - Eric W. Weisstein, Mar 31 2017
a(n) is also the number of maximal irredundant sets and minimal dominating sets in the (2n-3)-triangular snake graph. - Eric W. Weisstein, Jun 09 2019
a(n) is also the number of anti-palindromic compositions of n, where a composition (c(1), c(2),..., c(k)) is anti-palindromic if c(i) is not equal to c(k+1-i) whenever 1 <= i <= k/2. For instance, there are a(4) = 5 anti-palindromic compositions of 4: 4, 31, 13, 211, 112. - Jia Huang, Apr 08 2023

Examples

			G.f. = 1 + x + x^2 + 3*x^3 + 5*x^4 + 9*x^5+ 17*x^6 + 31*x^7 + 57*x^8 + ...
		

References

  • Kenneth Edwards, Michael A. Allen, A new combinatorial interpretation of the Fibonacci numbers squared, Part II, Fib. Q., 58:2 (2020), 169-177.
  • 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

Programs

  • GAP
    a:=[1,1,1];; for n in [4..45] do a[n]:=a[n-1]+a[n-2]+a[n-3]; od; a; # G. C. Greubel, Jun 09 2019
    
  • Haskell
    a000213 n = a000213_list !! n
    a000213_list = 1 : 1 : 1 : zipWith (+) a000213_list
       (tail $ zipWith (+) a000213_list (tail a000213_list))
    -- Reinhard Zumkeller, Apr 07 2012
    
  • Magma
    I:=[1,1,1]; [n le 3 select I[n] else Self(n-1) + Self(n-2) + Self(n-3): n in [1..45]]; // G. C. Greubel, Jun 09 2019
    
  • Maple
    K:=(1-z^2)/(1-z-z^2-z^3): Kser:=series(K, z=0, 45): seq((coeff(Kser, z, n)), n= 0..34); # Zerinvary Lajos, Nov 08 2007
    A000213:=(z-1)*(1+z)/(-1+z+z**2+z**3); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    LinearRecurrence[{1, 1, 1}, {1, 1, 1}, 45] (* Harvey P. Dale, May 23 2011 *)
    Table[RootSum[-1 - # - #^2 + #^3 &, 2 #^n - 4 #^(n + 1) + 3 #^(n + 2) &]/11, {n, 0, 45}] (* Eric W. Weisstein, Apr 10 2018 *)
    CoefficientList[Series[(1-x)(1+x)/(1-x-x^2-x^3), {x, 0, 45}], x] (* Eric W. Weisstein, Apr 10 2018 *)
  • Maxima
    a(n):=sum(sum(binomial(n-2*m+1,m-i)*binomial(n-2*m+i,n-2*m), i,0,m),m,0,(n)/2); /* Vladimir Kruchinin, Dec 17 2011 */
    
  • PARI
    a(n)=tn=[1,1,1;1,0,0;0,1,0]^n;tn[3,1]+tn[3,2]+tn[3,3] \\ Charles R Greathouse IV, Feb 18 2011
    
  • Python
    alst = [1, 1, 1]
    [alst.append(alst[n-1] + alst[n-2] + alst[n-3]) for n in range(3, 37)]
    print(alst) # Michael S. Branicky, Sep 21 2021
  • Sage
    ((1-x^2)/(1-x-x^2-x^3)).series(x, 45).coefficients(x, sparse=False) # G. C. Greubel, Jun 09 2019
    

Formula

G.f.: (1-x)*(1+x)/(1-x-x^2-x^3). - Ralf Stephan, Feb 11 2004
G.f.: 1 / (1 - x / (1 - 2*x^2 / (1 + x^2))). - Michael Somos, May 12 2012
a(n) = rightmost term of M^n * [1 1 1], where M is the 3 X 3 matrix [1 1 1 / 1 0 0 / 0 1 0]. M^n * [1 1 1] = [a(n+2) a(n+1) a(n)]. a(n)/a(n-1) tends to the tribonacci constant, 1.839286755...; an eigenvalue of M and a root of x^3 - x^2 - x - 1 = 0. - Gary W. Adamson, Dec 17 2004
a(n) = A001590(n+3) - A001590(n+2); a(n+1) - a(n) = 2*A000073(n); a(n) = A000073(n+3) - A000073(n+1). - Reinhard Zumkeller, May 22 2006
a(n) = A001590(n) + A001590(n+1). - Philippe Deléham, Sep 25 2006
a(n) ~ (F - 1) * T^n, where F = A086254 and T = A058265. - Charles R Greathouse IV, Nov 09 2008
a(n) = 2*a(n-1) - a(n-4), n > 3. - Gary Detlefs, Sep 13 2010
a(n) = Sum_{m=0..n/2} Sum_{i=0..m} binomial(n-2*m+1,m-i)*binomial(n-2*m+i, n-2*m). - Vladimir Kruchinin, Dec 17 2011
a(n) = 2*A008937(n-2) + 1 for n > 1. - Reinhard Zumkeller, Apr 07 2012
G.f.: 1+x/(U(0) - x) where U(k) = 1 - x^2/(1 - 1/(1 + 1/U(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Nov 16 2012
G.f.: 1 + x + x^2/(G(0)-x) where G(k) = 1 - x*(2*k+1)/(1 - 1/(1 + (2*k+1)/G(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Nov 17 2012
G.f.: (1+x)*(1-x)*(1 + x*(G(0)-1)/(x+1)) where G(k) = 1 + (1+x+x^2)/(1-x/(x+1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 26 2013
G.f.: 1/(1+x-G(0)), where G(k) = 1 - 1/(1 - x/(x - 1/(1 + 1/(1 - x/(x + 1/G(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, Jun 20 2013
a(n) = (-1)^n * A180735(-1-n) for all n in Z. - Michael Somos, Aug 15 2015
a(n) = Sum_{r root of x^3-x^2-x-1} r^n/(-r^2+2*r+2). - Fabian Pereyra, Nov 21 2024

A011655 Period 3: repeat [0, 1, 1].

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1
Offset: 0

Views

Author

Keywords

Comments

A binary m-sequence: expansion of reciprocal of x^2+x+1 (mod 2).
A Chebyshev transform of the Jacobsthal numbers A001045: if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))*A(x/(1+x^2)). - Paul Barry, Feb 16 2004
This is the r = 1 member of the r-family of sequences S_r(n) defined in A092184 where more information can be found.
This is the Fibonacci sequence (A000045) modulo 2. - Stephen Jordan (sjordan(AT)mit.edu), Sep 10 2007
For n > 0: a(n) = A084937(n-1) mod 2. - Reinhard Zumkeller, Dec 16 2007
This is also the Lucas numbers (A000032) mod 2. In general, this is the parity of any Lucas sequence associated with any pair (P,Q) when P and Q are odd; i.e., a(n) = U_n(P,Q) mod 2 = V_n(P,Q) mod 2. See Ribenboim. - Rick L. Shepherd, Feb 07 2009
Starting with offset 1: (1, 1, 0, 1, 1, 0, ...) = INVERTi transform of the tribonacci sequence A001590 starting (1, 2, 3, 6, 11, 20, 37, ...). - Gary W. Adamson, May 04 2009
From Reinhard Zumkeller, Nov 30 2009: (Start)
Characteristic function of numbers coprime to 3.
a(n) = 1 - A079978(n); a(A001651(n)) = 1; a(A008585(n)) = 0;
A000212(n) = Sum_{k=0..n} a(k)*(n-k). (End)
Sum_{k>0} a(k)/k/2^k = log(7)/3. - Jaume Oliver Lafont, Jun 01 2010
The sequence is the principal Dirichlet character of the reduced residue system mod 3 (the other is A102283). Associated Dirichlet L-functions are L(2,chi) = Sum_{n>=1} a(n)/n^2 = 4*Pi^2/27 = A214549, and L(3,chi) = Sum_{n>=1} a(n)/n^3 = 1.157536... = -(psi''(1/3) + psi''(2/3))/54 where psi'' is the tetragamma function. [Jolley eq 309 and arXiv:1008.2547, L(m = 3, r = 1, s)]. - R. J. Mathar, Jul 15 2010
a(n+1), n >= 0, is the sequence of the row sums of the Riordan triangle A158454. - Wolfdieter Lang, Dec 18 2010
Removing the first two elements and keeping the offset at 0, this is a periodic sequence (1, 0, 1, 1, 0, 1, ...). Its INVERTi transform is (1, -1, 2, -2, 2, -2, ...) with period (2,-2). - Gary W. Adamson, Jan 21 2011
Column k = 1 of triangle in A198295. - Philippe Deléham, Jan 31 2012
The set of natural numbers, A000027: (1, 2, 3, ...); is the INVERT transform of the signed periodic sequence (1, 1, 0, -1, -1, 0, 1, 1, 0, ...). - Gary W. Adamson, Apr 28 2013
Any integer sequence s(n) = |s(n-1) - s(n-2)| (equivalently, max(s(n-1), s(n-2)) - min(s(n-1), s(n-2))) for n > i + 1 with s(i) = j and s(i+1) = k, where j and k are not both 0, is or eventually becomes a multiple of this sequence, namely, the sequence repeat gcd(j, k), gcd(j, k), 0 (at some offset). In particular, if j and k are coprime, then s(n) is or eventually becomes this sequence (see, e.g., A110044). - Rick L. Shepherd, Jan 21 2014
For n >= 1, a(n) is also the characteristic function for rational g-adic integers (+n/3)A001651).%20See%20the%20definition%20in%20the%20Mahler%20reference,%20p.%207%20and%20also%20p.%2010.%20-%20_Wolfdieter%20Lang">g and also (-n/3)_g for all integers g >= 2 without a factor 3 (A001651). See the definition in the Mahler reference, p. 7 and also p. 10. - _Wolfdieter Lang, Jul 11 2014
Characteristic function for A007908(n+1) being divisible by 3. a(n) = bit flipped A007908(n+1) (mod 3) = bit flipped A079978(n). - Wolfdieter Lang, Jun 12 2017
Also Jacobi or Kronecker symbol (n/9) (or (n/9^e) for all e >= 1). - Jianing Song, Jul 09 2018
The binomial trans. is 0, 1, 3, 6, 11, 21, 42, 85, 171, 342,.. (see A024495). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = x + x^2 + x^4 + x^5 + x^7 + x^8 + x^10 + x^11 + x^13 + x^14 + x^16 + x^17 + ...
		

References

  • S. W. Golomb, Shift-Register Sequences, Holden-Day, San Francisco, 1967.
  • H. D. Lueke, Korrelationssignale, Springer 1992, pp. 43-48.
  • F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier/North Holland, 1978, p. 408.
  • K. Mahler, p-adic numbers and their functions, 2nd ed., Cambridge University press, 1981.
  • Paulo Ribenboim, The Little Book of Big Primes. Springer-Verlag, NY, 1991, p. 46. [Rick L. Shepherd, Feb 07 2009]

Crossrefs

Partial sums of A057078 give A011655(n+1).
Cf. A035191 (Mobius transform), A001590, A002487, A049347.
Cf. A000027, A000045, A004523 (partial sums), A057078 (first differences).
Cf. A007908, A079978 (bit flipped).
Cf. A011656 - A011751 for other binary m-sequences.
Cf. A002264.

Programs

Formula

G.f.: (x + x^2) / (1 - x^3) = Sum_{k>0} (x^k - x^(3*k)).
G.f.: x / (1 - x / (1 + x / (1 + x / (1 - 2*x / (1 + x))))). - Michael Somos, Apr 02 2012
a(n) = a(n+3) = a(-n), a(3*n) = 0, a(3*n + 1) = a(3*n + 2) = 1 for all n in Z.
a(n) = (1/2)*( (-1)^(floor((2n + 4)/3)) + 1 ). - Mario Catalani (mario.catalani(AT)unito.it), Oct 22 2003
a(n) = Fibonacci(n) mod 2. - Paul Barry, Nov 12 2003
a(n) = (2/3)*(1 - cos(2*Pi*n/3)). - Ralf Stephan, Jan 06 2004
a(n) = 1 - a(n-1)*a(n-2), a(n) = n for n < 2. - Reinhard Zumkeller, Feb 28 2004
a(n) = 2*(1 - T(n, -1/2))/3 with Chebyshev's polynomials T(n, x) of the first kind; see A053120. - Wolfdieter Lang, Oct 18 2004
a(n) = n*Sum_{k=0..floor(n/2)} (-1)^k*binomial(n-k, k)*A001045(n-2k)/(n-k). - Paul Barry, Oct 31 2004
a(n) = A002487(n) mod 2. - Paul Barry, Jan 14 2005
From Bruce Corrigan (scentman(AT)myfamily.com), Aug 08 2005: (Start)
a(n) = n^2 mod 3.
a(n) = (1/3)*(2 - (r^n + r^(2*n))) where r = (-1 + sqrt(-3))/2. (End)
From Michael Somos, Sep 23 2005: (Start)
Euler transform of length 3 sequence [ 1, -1, 1].
Moebius transform is length 3 sequence [ 1, 0, -1].
Multiplicative with a(3^e) = 0^e, a(p^e) = 1 otherwise. (End)
From Hieronymus Fischer, Jun 27 2007: (Start)
a(n) = (4/3)*(|sin(Pi*(n-2)/3)| + |sin(Pi*(n-1)/3)|)*|sin(Pi*n/3)|.
a(n) = ((n+1) mod 3 + 1) mod 2 = (1 - (-1)^(n - 3*floor((n+1)/3)))/2. (End)
a(n) = 2 - a(n-1) - a(n-2) for n > 1. - Reinhard Zumkeller, Apr 13 2008
a(2*n+1) = a(n+1) XOR a(n), a(2*n) = a(n), a(1) = 1, a(0) = 0. - Reinhard Zumkeller, Dec 27 2008
Sum_{n>=1} a(n)/n^s = (1-1/3^s)*Riemann_zeta(s), s > 1. - R. J. Mathar, Jul 31 2010
a(n) = floor((4*n-5)/3) mod 2. - Gary Detlefs, May 15 2011
a(n) = (a(n-1) - a(n-2))^2 with a(0) = 0, a(1) = 1. - Francesco Daddi, Aug 02 2011
Convolution of A040000 with A049347. - R. J. Mathar, Jul 21 2012
G.f.: Sum_{k>0} x^A001651(k). - L. Edson Jeffery, Dec 05 2012
G.f.: x/(G(0) - x^2) where G(k) = 1 - x/(x + 1/(1 - x/G(k+1))); (recursively defined continued fraction). - Sergei N. Gladkovskii, Feb 15 2013
For the general case: The characteristic function of numbers that are not multiples of m is a(n) = floor((n-1)/m) - floor(n/m) + 1, with m,n > 0. - Boris Putievskiy, May 08 2013
a(n) = sign(n mod 3). - Wesley Ivan Hurt, Jun 22 2013
a(n) = A000035(A000032(n)) = A000035(A000045(n)). - Omar E. Pol, Oct 28 2013
a(n) = (-n mod 3)^((n-1) mod 3). - Wesley Ivan Hurt, Apr 16 2015
a(n) = (2/3) * (1 - sin((Pi/6) * (4*n + 3))) for n >= 0. - Werner Schulte, Jul 20 2017
a(n) = a(n-1) XOR a(n-2) with a(0) = 0, a(1) = 1. - Chunqing Liu, Dec 18 2022
a(n) = floor((n+2)/3) - floor(n/3) = A002264(n+2) - A002264(n). - Aaron J Grech, Jul 30 2024
E.g.f.: 2*(exp(x) - exp(-x/2)*cos(sqrt(3)*x/2))/3. - Stefano Spezia, Mar 30 2025
Dirichlet g.f.: zeta(s)*(1-1/3^s). - R. J. Mathar, Aug 10 2025

Extensions

Better name from Omar E. Pol, Oct 28 2013

A008288 Square array of Delannoy numbers D(i,j) (i >= 0, j >= 0) read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 7, 13, 7, 1, 1, 9, 25, 25, 9, 1, 1, 11, 41, 63, 41, 11, 1, 1, 13, 61, 129, 129, 61, 13, 1, 1, 15, 85, 231, 321, 231, 85, 15, 1, 1, 17, 113, 377, 681, 681, 377, 113, 17, 1, 1, 19, 145, 575, 1289, 1683, 1289, 575, 145, 19, 1, 1, 21, 181, 833, 2241, 3653, 3653
Offset: 0

Views

Author

Keywords

Comments

In the Formula section, some contributors use T(n,k) = D(n-k, k) (for 0 <= k <= n), which is the triangular version of the square array (D(n,k): n,k >= 0). Conversely, D(n,k) = T(n+k,k) for n,k >= 0. - Petros Hadjicostas, Aug 05 2020
Also called the tribonacci triangle [Alladi and Hoggatt (1977)]. - N. J. A. Sloane, Mar 23 2014
D(n,k) is the number of lattice paths from (0,0) to (n,k) using steps (1,0), (0,1), (1,1). - Joerg Arndt, Jul 01 2011 [Corrected by N. J. A. Sloane, May 30 2020]
Or, triangle read by rows of coefficients of polynomials P[n](x) defined by P[0] = 1, P[1] = x+1; for n >= 2, P[n] = (x+1)*P[n-1] + x*P[n-2].
D(n, k) is the number of k-matchings of a comb-like graph with n+k teeth. Example: D(1, 3) = 7 because the graph consisting of a horizontal path ABCD and the teeth Aa, Bb, Cc, Dd has seven 3-matchings: four triples of three teeth and the three triples {Aa, Bb, CD}, {Aa, Dd, BC}, {Cc, Dd, AB}. Also D(3, 1)=7, the 1-matchings of the same graph being the seven edges: {AB}, {BC}, {CD}, {Aa}, {Bb}, {Cc}, {Dd}. - Emeric Deutsch, Jul 01 2002
Sum of n-th antidiagonal of the array D is A000129(n+1). - Reinhard Zumkeller, Dec 03 2004 [Edited by Petros Hadjicostas, Aug 05 2020 so that the counting of antidiagonals of D starts at n = 0. That is, the sum of the terms in the n-th row of the triangles T is A000129(n+1).]
The A-sequence for this Riordan type triangle (see one of Paul Barry's comments under Formula) is A112478 and the Z-sequence the trivial: {1, 0, 0, 0, ...}. See the W. Lang link under A006232 for Sheffer a- and z-sequences where also Riordan A- and Z-sequences are explained. This leads to the recurrence for the triangle given below. - Wolfdieter Lang, Jan 21 2008
The triangle or chess sums, see A180662 for their definitions, link the Delannoy numbers with twelve different sequences, see the crossrefs. All sums come in pairs due to the symmetrical nature of this triangle. The knight sums Kn14 and Kn15 have been added. It is remarkable that all knight sums are related to the tribonacci numbers, that is, A000073 and A001590, but none of the others. - Johannes W. Meijer, Sep 22 2010
This sequence, A008288, is jointly generated with A035607 as an array of coefficients of polynomials u(n,x): initially, u(1,x) = v(1,x) = 1; for n > 1, u(n,x) = x*u(n-1,x) + v(n-1) and v(n,x) = 2*x*u(n-1,x) + v(n-1,x). See the Mathematica section. - Clark Kimberling, Mar 09 2012
Row n, for n > 0, of Roger L. Bagula's triangle in the Example section shows the coefficients of the polynomial u(n) = c(0) + c(1)*x + ... + c(n)*x^n which is the numerator of the n-th convergent of the continued fraction [k, k, k, ...], where k = sqrt(x) + 1/sqrt(x); see A230000. - Clark Kimberling, Nov 13 2013
In an n-dimensional hypercube lattice, D(n,k) gives the number of nodes situated at a Minkowski (Manhattan) distance of k from a given node. In cellular automata theory, the cells at Manhattan distance k are called the von Neumann neighborhood of radius k. For k=1, see A005843. - Dmitry Zaitsev, Dec 10 2015
These numbers appear as the coefficients of series relating spherical and bispherical harmonics, in the solutions of Laplace's equation in 3D. [Majic 2019, Eq. 22] - Matt Majic, Nov 24 2019
From Peter Bala, Feb 19 2020: (Start)
The following remarks assume an offset of 1 in the row and column indices of the triangle.
The sequence of row polynomials T(n,x), beginning with T(1,x) = x, T(2,x) = x + x^2, T(3,x) = x + 3*x^2 + x^3, ..., is a strong divisibility sequence of polynomials in the ring Z[x]; that is, for all positive integers n and m, poly_gcd(T(n,x), T(m,x)) = T(gcd(n, m), x) - apply Norfleet (2005), Theorem 3. Consequently, the sequence (T(n,x): n >= 1) is a divisibility sequence in the polynomial ring Z[x]; that is, if n divides m then T(n,x) divides T(m,x) in Z[x].
Let S(x) = 1 + 2*x + 6*x^2 + 22*x^3 + ... denote the o.g.f. for the large Schröder numbers A006318. The power series (x*S(x))^n, n = 2, 3, 4, ..., can be expressed as a linear combination with polynomial coefficients of S(x) and 1: (x*S(x))^n = T(n-1,-x) - T(n,-x)*S(x). The result can be extended to negative integer n if we define T(0,x) = 0 and T(-n,x) = (-1)^(n+1) * T(n,x)/x^n. Cf. A115139.
[In the previous two paragraphs, D(n,x) was replaced with T(n,x) because the contributor is referring to the rows of the triangle T(n,k), not the rows of the array D(n,k). - Petros Hadjicostas, Aug 05 2020] (End)
Named after the French amateur mathematician Henri-Auguste Delannoy (1833-1915). - Amiram Eldar, Apr 15 2021
D(i,j) = D(j,i). With this and Dmitry Zaitsev's Dec 10 2015 comment, D(i,j) can be considered the number of points at L1 distance <= i in Z^j or the number of points at L1 distance <= j in Z^i from any given point. The rows and columns of D(i,j) are the crystal ball sequences on cubic lattices. See the first example below. The n-th term in the k-th crystal ball sequence can be considered the number of points at distance <= n from any point in a k-dimensional cubic lattice, or the number of points at distance <= k from any point in an n-dimensional cubic lattice. - Shel Kaphan, Jan 01 2023 and Jan 07 2023
Dimensions of hom spaces Hom(R^{(i)}, R^{(j)}) in the Delannoy category attached to the oligomorphic group of order preserving self-bijections of the real line. - Noah Snyder, Mar 22 2023

Examples

			The square array D(i,j) (i >= 0, j >= 0) begins:
  1, 1,  1,   1,   1,   1,    1,    1,    1,    1, ... = A000012
  1, 3,  5,   7,   9,  11,   13,   15,   17,   19, ... = A005408
  1, 5, 13,  25,  41,  61,   85,  113,  145,  181, ... = A001844
  1, 7, 25,  63, 129, 231,  377,  575,  833, 1159, ... = A001845
  1, 9, 41, 129, 321, 681, 1289, 2241, 3649, 5641, ... = A001846
  ...
For D(2,5) = 61, which is seen above in the row labeled A001844, we calculate the sum (9 + 11 + 41) of the 3 nearest terms above and/or to the left. - _Peter Munn_, Jan 01 2023
D(2,5) = 61 can also be obtained from the row labeled A005408 using a recurrence mentioned in the formula section:  D(2,5) = D(1,5) + 2*Sum_{k=0..4} D(1,k), so D(2,5) = 11 + 2*(1+3+5+7+9) = 11 + 2*25. - _Shel Kaphan_, Jan 01 2023
As a triangular array (on its side) this begins:
   0,   0,   0,   0,   1,   0,  11,   0, ...
   0,   0,   0,   1,   0,   9,   0,  61, ...
   0,   0,   1,   0,   7,   0,  41,   0, ...
   0,   1,   0,   5,   0,  25,   0, 129, ...
   1,   0,   3,   0,  13,   0,  63,   0, ...
   0,   1,   0,   5,   0,  25,   0, 129, ...
   0,   0,   1,   0,   7,   0,  41,   0, ...
   0,   0,   0,   1,   0,   9,   0,  61, ...
   0,   0,   0,   0,   1,   0,  11,   0, ...
   [Edited by _Shel Kaphan_, Jan 01 2023]
From _Roger L. Bagula_, Dec 09 2008: (Start)
As a triangle T(n,k) (with rows n >= 0 and columns k = 0..n), this begins:
   1;
   1,  1;
   1,  3,   1;
   1,  5,   5,   1;
   1,  7,  13,   7,    1;
   1,  9,  25,  25,    9,    1;
   1, 11,  41,  63,   41,   11,    1;
   1, 13,  61, 129,  129,   61,   13,   1;
   1, 15,  85, 231,  321,  231,   85,  15,   1;
   1, 17, 113, 377,  681,  681,  377, 113,  17,  1;
   1, 19, 145, 575, 1289, 1683, 1289, 575, 145, 19, 1;
   ... (End)
Triangle T(n,k) recurrence: 63 = T(6,3) = 25 + 13 + 25 = T(5,2) + T(4,2) + T(5,3).
Triangle T(n,k) recurrence with A-sequence A112478: 63 = T(6,3) = 1*25 + 2*25 - 2*9 + 6*1 (T entries from row n = 5 only). [Here the formula T(n,k) = Sum_{j=0..n-k} A112478(j) * T(n-1, k-1+j) is used with n = 6 and k = 3; i.e., T(6,3) = Sum_{j=0..3} A111478(j) * T(5, 2+j). - _Petros Hadjicostas_, Aug 05 2020]
From _Philippe Deléham_, Mar 29 2012: (Start)
Subtriangle of the triangle given by (1, 0, 1, -1, 0, 0, 0, ...) DELTA (0, 1, 0, 0, 0, ...) where DELTA is the operator defined in A084938:
   1;
   1,  0;
   1,  1,  0;
   1,  3,  1,  0;
   1,  5,  5,  1,  0;
   1,  7, 13,  7,  1,  0;
   1,  9, 25, 25,  9,  1, 0;
   1, 11, 41, 63, 41, 11, 1, 0;
   ...
Subtriangle of the triangle given by (0, 1, 0, 0, 0, ...) DELTA (1, 0, 1, -1, 0, 0, 0, ...) where DELTA is the operator defined in A084938:
   1;
   0, 1;
   0, 1,  1;
   0, 1,  3,  1;
   0, 1,  5,  5,  1;
   0, 1,  7, 13,  7,  1;
   0, 1,  9, 25, 25,  9,  1;
   0, 1, 11, 41, 63, 41, 11, 1;
   ... (End)
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 593.
  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 81.
  • L. Moser and W. Zayachkowski, Lattice paths with diagonal steps, Scripta Mathematica, 26 (1963), 223-229.
  • G. Picou, Note #2235, L'Intermédiaire des Mathématiciens, 8 (1901), page 281. - N. J. A. Sloane, Mar 02 2022
  • D. B. West, Combinatorial Mathematics, Cambridge, 2021, p. 28.

Crossrefs

Sums of antidiagonals: A000129 (Pell numbers).
Main diagonal: A001850 (central Delannoy numbers), which has further information and references.
A002002, A026002, and A190666 are +-k-diagonals for k=1, 2, 3 resp. - Shel Kaphan, Jan 01 2023
See also A027618.
Cf. A059446.
Has same main diagonal as A064861. Different from A100936.
Read mod small primes: A211312, A211313, A211314, A211315.
Triangle sums (see the comments): A000129 (Row1); A056594 (Row2); A000073 (Kn11 & Kn21); A089068 (Kn12 & Kn22); A180668 (Kn13 & Kn23); A180669 (Kn14 & Kn24); A180670 (Kn15 & Kn25); A099463 (Kn3 & Kn4); A116404 (Fi1 & Fi2); A006498 (Ca1 & Ca2); A006498(3*n) (Ca3 & Ca4); A079972 (Gi1 & Gi2); A079972(4*n) (Gi3 & Gi4); A079973(3*n) (Ze1 & Ze2); A079973(2*n) (Ze3 & Ze4).
Cf. A102413, A128966. (D(n,1)) = A005843. Cf. A115139.

Programs

  • Haskell
    a008288 n k = a008288_tabl !! n !! k
    a008288_row n = a008288_tabl !! n
    a008288_tabl = map fst $ iterate
        (\(us, vs) -> (vs, zipWith (+) ([0] ++ us ++ [0]) $
                           zipWith (+) ([0] ++ vs) (vs ++ [0]))) ([1], [1, 1])
    -- Reinhard Zumkeller, Jul 21 2013
    
  • Maple
    A008288 := proc(n, k) option remember; if k = 0 then 1 elif n=k then 1 else procname(n-1, k-1) + procname(n-2, k-1) + procname(n-1, k) end if; end proc: seq(seq(A008288(n,k),k=0..n), n=0..10); # triangular indices n and k
    P[0]:=1; P[1]:=x+1; for n from 2 to 12 do P[n]:=expand((x+1)*P[n-1]+x*P[n-2]); lprint(P[n]); lprint(seriestolist(series(P[n],x,200))); end do:
  • Mathematica
    (* Next, A008288 jointly generated with A035607 *)
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := x*u[n - 1, x] + v[n - 1, x];
    v[n_, x_] := 2 x*u[n - 1, x] + v[n - 1, x];
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A008288 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A035607 *)
    (* Clark Kimberling, Mar 09 2012 *)
    d[n_, k_] := Binomial[n+k, k]*Hypergeometric2F1[-k, -n, -n-k, -1]; A008288 = Flatten[Table[d[n-k, k], {n, 0, 12}, {k, 0, n}]] (* Jean-François Alcover, Apr 05 2012, after 3rd formula *)
  • Python
    from functools import cache
    @cache
    def delannoy_row(n: int) -> list[int]:
        if n == 0: return [1]
        if n == 1: return [1, 1]
        rov = delannoy_row(n - 2)
        row = delannoy_row(n - 1) + [1]
        for k in range(n - 1, 0, -1):
            row[k] += row[k - 1] + rov[k - 1]
        return row
    for n in range(10): print(delannoy_row(n))  # Peter Luschny, Jul 30 2023
  • Sage
    for k in range(8):  # seen as an array, read row by row
        a = lambda n: hypergeometric([-n, -k], [1], 2)
        print([simplify(a(n)) for n in range(11)]) # Peter Luschny, Nov 19 2014
    

Formula

D(n, 0) = 1 = D(0, n) for n >= 0; D(n, k) = D(n, k-1) + D(n-1, k-1) + D(n-1, k).
Bivariate o.g.f.: Sum_{n >= 0, k >= 0} D(n, k)*x^n*y^k = 1/(1 - x - y - x*y).
D(n, k) = Sum_{d = 0..min(n,k)} binomial(k, d)*binomial(n+k-d, k) = Sum_{d=0..min(n,k)} 2^d*binomial(n, d)*binomial(k, d). [Edited by Petros Hadjicostas, Aug 05 2020]
Seen as a triangle read by rows: T(n, 0) = T(n, n) = 1 for n >= 0 and T(n, k) = T(n-1, k-1) + T(n-2, k-1) + T(n-1, k), 0 < k < n and n > 1. - Reinhard Zumkeller, Dec 03 2004
Read as a number triangle, this is the Riordan array (1/(1-x), x(1+x)/(1-x)) with T(n, k) = Sum_{j=0..n-k} C(n-k, j) * C(k, j) * 2^j. - Paul Barry, Jul 18 2005
T(n,k) = Sum_{j=0..n-k} C(k,j)*C(n-j,k). - Paul Barry, May 21 2006
Let y^k(n) be the number of Khalimsky-continuous functions f from [0,n-1] to Z such that f(0) = 0 and f(n-1) = k. Then y^k(n) = D(i,j) for i = (1/2)*(n-1-k) and j = (1/2)*(n-1+k) where n-1+k belongs to 2Z. - Shiva Samieinia (shiva(AT)math.su.se), Oct 08 2007
Recurrence for triangle from A-sequence (see the Wolfdieter Lang comment above): T(n,k) = Sum_{j=0..n-k} A112478(j) * T(n-1, k-1+j), n >= 1, k >= 1. [For k > n, the sum is empty, in which case T(n,k) = 0.]
From Peter Bala, Jul 17 2008: (Start)
The n-th row of the square array is the crystal ball sequence for the product lattice A_1 x ... x A_1 (n copies). A035607 is the table of the associated coordination sequences for these lattices.
The polynomial p_n(x) := Sum {k = 0..n} 2^k * C(n,k) * C(x,k) = Sum_{k = 0..n} C(n,k) * C(x+k,n), whose values [p_n(0), p_n(1), p_n(2), ... ] give the n-th row of the square array, is the Ehrhart polynomial of the n-dimensional cross polytope (the hyperoctahedron) [Bump et al. (2000), Theorem 6].
The first few values are p_0(x) = 1, p_1(x) = 2*x + 1, p_2(x) = 2*x^2 + 2*x + 1 and p_3(x) = (4*x^3 + 6*x^2 + 8*x + 3)/3.
The reciprocity law p_n(m) = p_m(n) reflects the symmetry of the table.
The polynomial p_n(x) is the unique polynomial solution of the difference equation (x+1)*f(x+1) - x*f(x-1) = (2*n+1)*f(x), normalized so that f(0) = 1.
These polynomials have their zeros on the vertical line Re x = -1/2 in the complex plane; that is, the polynomials p_n(x-1), n = 1,2,3,..., satisfy a Riemann hypothesis [Bump et al. (2000), Theorem 4]. The o.g.f. for the p_n(x) is (1 + t)^x/(1 - t)^(x + 1) = 1 + (2*x + 1)*t + (2*x^2 + 2*x + 1)*t^2 + ... .
The square array of Delannoy numbers has a close connection with the constant log(2). The entries in the n-th row of the array occur in the series acceleration formula log(2) = (1 - 1/2 + 1/3 - ... + (-1)^(n+1)/n) + (-1)^n * Sum_{k>=1} (-1)^(k+1)/(k*D(n,k-1)*D(n,k)). [T(n,k) was replaced with D(n,k) in the formula to agree with the beginning of the paragraph. - Petros Hadjicostas, Aug 05 2020]
For example, the fourth row of the table (n = 3) gives the series log(2) = 1 - 1/2 + 1/3 - 1/(1*1*7) + 1/(2*7*25) - 1/(3*25*63) + 1/(4*63*129) - ... . See A142979 for further details.
Also the main diagonal entries (the central Delannoy numbers) give the series acceleration formula Sum_{n>=1} 1/(n*D(n-1,n-1)*D(n,n)) = (1/2)*log(2), a result due to Burnside. [T(n,n) was replaced here with D(n,n) to agree with the previous paragraphs. - Petros Hadjicostas, Aug 05 2020]
Similar relations hold between log(2) and the crystal ball sequences of the C_n lattices A142992. For corresponding results for the constants zeta(2) and zeta(3), involving the crystal ball sequences for root lattices of type A_n and A_n x A_n, see A108625 and A143007 respectively. (End)
From Peter Bala, Oct 28 2008: (Start)
Hilbert transform of Pascal's triangle A007318 (see A145905 for the definition of this term).
D(n+a,n) = P_n(a,0;3) for all integer a such that a >= -n, where P_n(a,0;x) is the Jacobi polynomial with parameters (a,0) [Hetyei]. The related formula A(n,k) = P_k(0,n-k;3) defines the table of asymmetric Delannoy numbers, essentially A049600. (End)
Seen as a triangle read by rows: T(n, k) = Hyper2F1([k-n, -k], [1], 2). - Peter Luschny, Aug 02 2014, Oct 13 2024.
From Peter Bala, Jun 25 2015: (Start)
O.g.f. for triangle T(n,k): A(z,t) = 1/(1 - (1 + t)*z - t*z^2) = 1 + (1 + t)*z + (1 + 3*t + t^2)*z^2 + (1 + 5*t + 5*t^2 + t^3)*z^3 + ....
1 + z*d/dz(A(z,t))/A(z,t) is the o.g.f. for A102413. (End)
E.g.f. for the n-th subdiagonal of T(n,k), n >= 0, equals exp(x)*P(n,x), where P(n,x) is the polynomial Sum_{k = 0..n} binomial(n,k)*(2*x)^k/k!. For example, the e.g.f. for the second subdiagonal is exp(x)*(1 + 4*x + 4*x^2/2) = 1 + 5*x + 13*x^2/2! + 25*x^3/3! + 41*x^4/4! + 61*x^5/5! + .... - Peter Bala, Mar 05 2017 [The n-th subdiagonal of triangle T(n,k) is the n-th row of array D(n,k).]
Let a_i(n) be multiplicative with a_i(p^e) = D(i, e), p prime and e >= 0, then Sum_{n > 0} a_i(n)/n^s = (zeta(s))^(2*i+1)/(zeta(2*s))^i for i >= 0. - Werner Schulte, Feb 14 2018
Seen as a triangle read by rows: T(n,k) = Sum_{i=0..k} binomial(n-i, i) * binomial(n-2*i, k-i) for 0 <= k <= n. - Werner Schulte, Jan 09 2019
Univariate generating function: Sum_{k >= 0} D(n,k)*z^k = (1 + z)^n/(1 - z)^(n+1). [Dziemianczuk (2013), Eq. 5.3] - Matt Majic, Nov 24 2019
(n+1)*D(n+1,k) = (2*k+1)*D(n,k) + n*D(n-1,k). [Majic (2019), Eq. 22] - Matt Majic, Nov 24 2019
For i, j >= 1, D(i,j) = D(i,j-1) + 2*Sum_{k=0..i-1} D(k,j-1), or, because D(i,j) = D(j,i), D(i,j) = D(i-1,j) + 2*Sum_{k=0..j-1} D(i-1,k). - Shel Kaphan, Jan 01 2023
Sum_{k=0..n} T(n,k)^2 = A026933(n). - R. J. Mathar, Nov 07 2023
Let S(x) = (1 - x - (1 - 6*x + x^2)^(1/2))/(2*x) denote the g.f. of the sequence of large Schröder numbers A006318. Read as a lower triangular array, the signed n-th row polynomial R(n, -x) = 1/sqrt(1 - 6*x + x^2) *( 1/S(x)^(n+1) + (x*S(x))^(n+1) ). For example, R(4, -x) = 1 - 7*x + 13*x^2 - 7*x^3 + x^4 = 1/sqrt(1 - 6*x + x^2) * ( 1/S(x)^5 + (x*S(x))^5 ). Cf. A102413. - Peter Bala, Aug 01 2024

Extensions

Expanded description from Clark Kimberling, Jun 15 1997
Additional references from Sylviane R. Schwer (schwer(AT)lipn.univ-paris13.fr), Nov 28 2001
Changed the notation to make the formulas more precise. - N. J. A. Sloane, Jul 01 2002
Showing 1-10 of 135 results. Next