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

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

A007283 a(n) = 3*2^n.

Original entry on oeis.org

3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304, 196608, 393216, 786432, 1572864, 3145728, 6291456, 12582912, 25165824, 50331648, 100663296, 201326592, 402653184, 805306368, 1610612736, 3221225472, 6442450944, 12884901888
Offset: 0

Views

Author

Keywords

Comments

Same as Pisot sequences E(3, 6), L(3, 6), P(3, 6), T(3, 6). See A008776 for definitions of Pisot sequences.
Numbers k such that A006530(A000010(k)) = A000010(A006530(k)) = 2. - Labos Elemer, May 07 2002
Also least number m such that 2^n is the smallest proper divisor of m which is also a suffix of m in binary representation, see A080940. - Reinhard Zumkeller, Feb 25 2003
Length of the period of the sequence Fibonacci(k) (mod 2^(n+1)). - Benoit Cloitre, Mar 12 2003
The sequence of first differences is this sequence itself. - Alexandre Wajnberg and Eric Angelini, Sep 07 2005
Subsequence of A122132. - Reinhard Zumkeller, Aug 21 2006
Apart from the first term, a subsequence of A124509. - Reinhard Zumkeller, Nov 04 2006
Total number of Latin n-dimensional hypercubes (Latin polyhedra) of order 3. - Kenji Ohkuma (k-ookuma(AT)ipa.go.jp), Jan 10 2007
Number of different ternary hypercubes of dimension n. - Edwin Soedarmadji (edwin(AT)systems.caltech.edu), Dec 10 2005
For n >= 1, a(n) is equal to the number of functions f:{1, 2, ..., n + 1} -> {1, 2, 3} such that for fixed, different x_1, x_2,...,x_n in {1, 2, ..., n + 1} and fixed y_1, y_2,...,y_n in {1, 2, 3} we have f(x_i) <> y_i, (i = 1,2,...,n). - Milan Janjic, May 10 2007
a(n) written in base 2: 11, 110, 11000, 110000, ..., i.e.: 2 times 1, n times 0 (see A003953). - Jaroslav Krizek, Aug 17 2009
Subsequence of A051916. - Reinhard Zumkeller, Mar 20 2010
Numbers containing the number 3 in their Collatz trajectories. - Reinhard Zumkeller, Feb 20 2012
a(n-1) gives the number of ternary numbers with n digits with no two adjacent digits in common; e.g., for n=3 we have 010, 012, 020, 021, 101, 102, 120, 121, 201, 202, 210 and 212. - Jon Perry, Oct 10 2012
If n > 1, then a(n) is a solution for the equation sigma(x) + phi(x) = 3x-4. This equation also has solutions 84, 3348, 1450092, ... which are not of the form 3*2^n. - Farideh Firoozbakht, Nov 30 2013
a(n) is the upper bound for the "X-ray number" of any convex body in E^(n + 2), conjectured by Bezdek and Zamfirescu, and proved in the plane E^2 (see the paper by Bezdek and Zamfirescu). - L. Edson Jeffery, Jan 11 2014
If T is a topology on a set V of size n and T is not the discrete topology, then T has at most 3 * 2^(n-2) many open sets. See Brown and Stephen references. - Ross La Haye, Jan 19 2014
Comment from Charles Fefferman, courtesy of Doron Zeilberger, Dec 02 2014: (Start)
Fix a dimension n. For a real-valued function f defined on a finite set E in R^n, let Norm(f, E) denote the inf of the C^2 norms of all functions F on R^n that agree with f on E. Then there exist constants k and C depending only on the dimension n such that Norm(f, E) <= C*max{ Norm(f, S) }, where the max is taken over all k-point subsets S in E. Moreover, the best possible k is 3 * 2^(n-1).
The analogous result, with the same k, holds when the C^2 norm is replaced, e.g., by the C^1, alpha norm (0 < alpha <= 1). However, the optimal analogous k, e.g., for the C^3 norm is unknown.
For the above results, see Y. Brudnyi and P. Shvartsman (1994). (End)
Also, coordination sequence for (infinity, infinity, infinity) tiling of hyperbolic plane. - N. J. A. Sloane, Dec 29 2015
The average of consecutive powers of 2 beginning with 2^1. - Melvin Peralta and Miriam Ong Ante, May 14 2016
For n > 1, a(n) is the smallest Zumkeller number with n divisors that are also Zumkeller numbers (A083207). - Ivan N. Ianakiev, Dec 09 2016
Also, for n >= 2, the number of length-n strings over the alphabet {0,1,2,3} having only the single letters as nonempty palindromic subwords. (Corollary 21 in Fleischer and Shallit) - Jeffrey Shallit, Dec 02 2019
Also, a(n) is the minimum link-length of any covering trail, circuit, path, and cycle for the set of the 2^(n+2) vertices of an (n+2)-dimensional hypercube. - Marco Ripà, Aug 22 2022
The known fixed points of maps n -> A163511(n) and n -> A243071(n). [See comments in A163511]. - Antti Karttunen, Sep 06 2023
The finite subsequence a(3), a(4), a(5), a(6) = 24, 48, 96, 192 is one of only two geometric sequences that can be formed with all interior angles (all integer, in degrees) of a simple polygon. The other sequence is a subsequence of A000244 (see comment there). - Felix Huber, Feb 15 2024
A level 1 Sierpiński triangle is a triangle. Level n+1 is formed from three copies of level n by identifying pairs of corner vertices of each pair of triangles. For n>2, a(n-3) is the radius of the level n Sierpiński triangle graph. - Allan Bickle, Aug 03 2024

References

  • Jason I. Brown, Discrete Structures and Their Interactions, CRC Press, 2013, p. 71.
  • T. Ito, Method, equipment, program and storage media for producing tables, Publication number JP2004-272104A, Japan Patent Office (written in Japanese, a(2)=12, a(3)=24, a(4)=48, a(5)=96, a(6)=192, a(7)=384 (a(7)=284 was corrected)).
  • Kenji Ohkuma, Atsuhiro Yamagishi and Toru Ito, Cryptography Research Group Technical report, IT Security Center, Information-Technology Promotion Agency, JAPAN.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of the following sequences: A029744, A029747, A029748, A029750, A362804 (after 3), A364494, A364496, A364289, A364291, A364292, A364295, A364497, A364964, A365422.
Essentially same as A003945 and A042950.
Row sums of (5, 1)-Pascal triangle A093562 and of (1, 5) Pascal triangle A096940.
Cf. Latin squares: A000315, A002860, A003090, A040082, A003191; Latin cubes: A098843, A098846, A098679, A099321.

Programs

Formula

G.f.: 3/(1-2*x).
a(n) = 2*a(n - 1), n > 0; a(0) = 3.
a(n) = Sum_{k = 0..n} (-1)^(k reduced (mod 3))*binomial(n, k). - Benoit Cloitre, Aug 20 2002
a(n) = A118416(n + 1, 2) for n > 1. - Reinhard Zumkeller, Apr 27 2006
a(n) = A000079(n) + A000079(n + 1). - Zerinvary Lajos, May 12 2007
a(n) = A000079(n)*3. - Omar E. Pol, Dec 16 2008
From Paul Curtz, Feb 05 2009: (Start)
a(n) = b(n) + b(n+3) for b = A001045, A078008, A154879.
a(n) = abs(b(n) - b(n+3)) with b(n) = (-1)^n*A084247(n). (End)
a(n) = 2^n + 2^(n + 1). - Jaroslav Krizek, Aug 17 2009
a(n) = A173786(n + 1, n) = A173787(n + 2, n). - Reinhard Zumkeller, Feb 28 2010
A216022(a(n)) = 6 and A216059(a(n)) = 7, for n > 0. - Reinhard Zumkeller, Sep 01 2012
a(n) = (A000225(n) + 1)*3. - Martin Ettl, Nov 11 2012
E.g.f.: 3*exp(2*x). - Ilya Gutkovskiy, May 15 2016
A020651(a(n)) = 2. - Yosu Yurramendi, Jun 01 2016
a(n) = sqrt(A014551(n + 1)*A014551(n + 2) + A014551(n)^2). - Ezhilarasu Velayutham, Sep 01 2019
a(A048672(n)) = A225546(A133466(n)). - Michel Marcus and Peter Munn, Nov 29 2019
Sum_{n>=1} 1/a(n) = 2/3. - Amiram Eldar, Oct 28 2020

A001630 Tetranacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4), with a(0)=a(1)=0, a(2)=1, a(3)=2.

Original entry on oeis.org

0, 0, 1, 2, 3, 6, 12, 23, 44, 85, 164, 316, 609, 1174, 2263, 4362, 8408, 16207, 31240, 60217, 116072, 223736, 431265, 831290, 1602363, 3088654, 5953572, 11475879, 22120468, 42638573, 82188492, 158423412, 305370945, 588621422, 1134604271, 2187020050
Offset: 0

Views

Author

Keywords

Comments

Also (with a different offset), coordination sequence for (4,infinity,infinity) tiling of hyperbolic plane. - N. J. A. Sloane, Dec 29 2015
Apparently for n>=2 the number of 1-D walks of length n-2 using steps +1, +3 and -1, avoiding consecutive -1 steps. - David Scambler, Jul 15 2013
From Elkhan Aday and Greg Dresden, Jun 24 2024: (Start)
For n > 1, a(n) is the number of ways to tile a skew double-strip of n-1 cells with one extra initial cell, using squares and all possible "dominoes". Here is the skew double-strip corresponding to n=12, with 11 cells:
_ ___ _ ___ _
| | | | | |
_ _|_|___|_|___|_|
| | | | | | |
|_|___|_|___|_|___|,
and here are the three possible "domino" tiles:
_ _
| | | |
| | | | | |
|_|, |_|, |_____|.
As an example, here is one of the a(12) = 609 ways to tile the skew double-strip of 11 cells:
_ _______ _____
| | | | | |
___|_ |_|_ | _| _|
| | | | | |
|_____|___|_|___|_|. (End)

Examples

			G.f. = x^2 + 2*x^3 + 3*x^4 + 6*x^5 + 12*x^6 + 23*x^7 + 44*x^8 + 85*x^9 + ...
		

References

  • 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

  • Magma
    I:=[0, 0, 1, 2]; [n le 4 select I[n] else Self(n-1)+ Self(n-2) + Self(n-3) + Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jan 29 2013
    
  • Maple
    a:= proc(n) option operator; local M; M := Matrix(4, (i,j)-> if (i=j-1) or j=1 then 1 else 0 fi)^n; M[1,4]+M[1,3] end; seq (a(n), n=0..34); # Alois P. Heinz, Aug 01 2008
  • Mathematica
    a=0; b=0; c=1; d=2; lst={a, b, c, d}; Do[e=a+b+c+d; AppendTo[lst, e]; a=b; b=c; c=d; d=e, {n, 4!}]; lst (* Vladimir Joseph Stephan Orlovsky, Sep 30 2008 *)
    RecurrenceTable[{a[0] == a[1] == 0, a[2] == 1, a[3] == 2, a[n] == a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4]}, a, {n, 35}] (* or *) a = {0, 0, 1, 2}; Do[AppendTo[a, a[[-1]] + a[[-2]] + a[[-3]] + a[[-4]]], {35}]; a (* Bruno Berselli, Jan 29 2013 *)
    CoefficientList[Series[- x^2 * (1 + x)/(- 1 + x + x^2 + x^3 + x^4), {x, 0, 35}], x] (* Vincenzo Librandi, Jan 29 2013 *)
    LinearRecurrence[{1,1,1,1},{0,0,1,2},40] (* Harvey P. Dale, Aug 25 2013 *)
  • PARI
    concat([0, 0], Vec(-x^2*(1+x)/(-1+x+x^2+x^3+x^4) + O(x^50))) \\ Michel Marcus, Dec 30 2015

Formula

G.f.: -x^2*(1+x)/(-1+x+x^2+x^3+x^4). [Simon Plouffe in his 1992 dissertation]
a(n) = A000078(n) + A000078(n+1) = a(n-1) + A000078(n+1) - A000078(n-1). - Henry Bottomley
a(n) = 2*a(n-1) - a(n-5) with n>4, a(0)=a(1)=0, a(2)=1, a(3)=2, a(4)=3. - Vincenzo Librandi, Dec 21 2010
G.f.: x^2 + x^3*G(0) where G(k) = 2 + x*(1 + x + x^2 + (1+x)*(1+x^2)*G(k+1)). - Sergei N. Gladkovskii, Jan 27 2013 [Edited by Michael Somos, Nov 12 2013]

A054886 Layer counting sequence for hyperbolic tessellation by cuspidal triangles of angles (Pi/3,Pi/3,0) (this is the classical modular tessellation).

Original entry on oeis.org

1, 3, 6, 10, 16, 26, 42, 68, 110, 178, 288, 466, 754, 1220, 1974, 3194, 5168, 8362, 13530, 21892, 35422, 57314, 92736, 150050, 242786, 392836, 635622, 1028458, 1664080, 2692538, 4356618, 7049156, 11405774, 18454930, 29860704, 48315634, 78176338, 126491972
Offset: 0

Views

Author

Paolo Dominici (pl.dm(AT)libero.it), May 23 2000

Keywords

Comments

The layer sequence is the sequence of the cardinalities of the layers accumulating around a ( finite-sided ) polygon of the tessellation under successive side-reflections; see the illustration accompanying A054888.
Equivalently, coordination sequence for (3,3,infinity) tiling of hyperbolic plane. - N. J. A. Sloane, Dec 29 2015
Equivalently, spherical growth series for modular group.
Also, number of sequences of length n with terms 1, 2, and 3, with no adjacent terms equal, and no three consecutive terms (1, 2, 3) or (3, 2, 1). - Pontus von Brömssen, Jan 03 2022

References

  • P. de la Harpe, Topics in Geometric Group Theory, Univ. Chicago Press, 2000, p. 156.

Crossrefs

Essentially the same as A006355.

Programs

  • Mathematica
    Join[{1,3},2Fibonacci[Range[4,40]]] (* Harvey P. Dale, Jan 06 2012 *)
  • PARI
    my(x='x+O('x^50)); Vec((1+2*x+2*x^2+x^3)/(1-x-x^2)) \\ G. C. Greubel, Aug 06 2017

Formula

G.f.: (1+2*x+2*x^2+x^3)/(1-x-x^2) = (x^2+x+1)*(1+x)/(1-x-x^2).
a(n) = 2*F(n+2) for n >= 2, with F(n) the n-th Fibonacci number (cf. A000045).
E.g.f.: 2*exp(x/2)*(5*cosh(sqrt(5)*x/2) + 3*sqrt(5)*sinh(sqrt(5)*x/2))/5 - 1 - x. - Stefano Spezia, Apr 18 2022

Extensions

Offset changed to 0 by N. J. A. Sloane, Jan 03 2022 at the suggestion of Pontus von Brömssen

A078042 Expansion of (1-x)/(1+x-x^2+x^3).

Original entry on oeis.org

1, -2, 3, -6, 11, -20, 37, -68, 125, -230, 423, -778, 1431, -2632, 4841, -8904, 16377, -30122, 55403, -101902, 187427, -344732, 634061, -1166220, 2145013, -3945294, 7256527, -13346834, 24548655, -45152016, 83047505, -152748176, 280947697, -516743378, 950439251, -1748130326, 3215312955
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Absolute values give coordination sequence for (3,infinity,infinity) tiling of hyperbolic plane. - N. J. A. Sloane, Dec 29 2015
a(n) is the upper left entry of the n-th power of the 3 X 3 matrix M = [-2, -2, 1; 1, 1, 0; 1, 0, 0]; a(n) = M^n [1, 1]. - Philippe Deléham, Apr 19 2023

Crossrefs

Programs

  • Magma
    [n le 3 select -n*(-1)^n else -Self(n-1)+Self(n-2)-Self(n-3): n in [1..50]]; // Vincenzo Librandi, Dec 30 2015
  • Mathematica
    CoefficientList[Series[(1-x)/(1+x-x^2+x^3),{x,0,40}],x] (* or *) LinearRecurrence[{-1,1,-1},{1,-2,3},40] (* Harvey P. Dale, Jun 01 2012 *)
  • PARI
    Vec((1-x)/(1+x-x^2+x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
    

Formula

a(n) = -a(n-1) + a(n-2) - a(n-3) for n > 2; a(0)=1, a(1)=-2, a(2)=3. - Harvey P. Dale, Jun 01 2012
a(n) = (-1)^n * A001590(n+2).
a(n) = Sum_{k=0..n} A188316(n,k)*(-2)^k. - Philippe Deléham, Apr 19 2023

A163876 Number of reduced words of length n in Coxeter group on 3 generators S_i with relations (S_i)^2 = (S_i S_j)^6 = I.

Original entry on oeis.org

1, 3, 6, 12, 24, 48, 93, 180, 351, 684, 1332, 2592, 5046, 9825, 19128, 37239, 72498, 141144, 274788, 534972, 1041513, 2027676, 3947595, 7685400, 14962368, 29129580, 56711106, 110408373, 214949232, 418475259, 814711182, 1586125572, 3087958512
Offset: 0

Views

Author

John Cannon and N. J. A. Sloane, Dec 03 2009

Keywords

Comments

Also, coordination sequence for (6,6,6) tiling of hyperbolic plane. - N. J. A. Sloane, Dec 29 2015
The initial terms coincide with those of A003945, although the two sequences are eventually different.
Computed with MAGMA using commands similar to those used to compute A154638.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1+x)*(1-x^6)/(1-2*x+2*x^6-x^7) )); // G. C. Greubel, Apr 25 2019
    
  • Mathematica
    coxG[{6,1,-1,40}] (* The coxG program is at A169452 *) (* Harvey P. Dale, Mar 22 2015 *)
    CoefficientList[Series[(1+x)*(1-x^6)/(1-2*x+2*x^6-x^7), {x,0,40}], x] (* G. C. Greubel, Aug 06 2017, modified Apr 25 2019 *)
  • PARI
    x='x+O('x^40); Vec((x^6+2*x^5+2*x^4+2*x^3+2*x^2+2*x+1)/(x^6-x^5- x^4-x^3-x^2-x+1)) \\ G. C. Greubel, Aug 06 2017
    
  • Sage
    ((1+x)*(1-x^6)/(1-2*x+2*x^6-x^7)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 25 2019

Formula

G.f.: (x^6 + 2*x^5 + 2*x^4 + 2*x^3 + 2*x^2 + 2*x + 1)/(x^6 - x^5 - x^4 - x^3 - x^2 - x + 1).
G.f.: (1+x)*(1-x^6)/(1-2*x+2*x^6-x^7). - G. C. Greubel, Apr 25 2019
a(n) = -a(n-6) + Sum_{k=1..5} a(n-k). - Wesley Ivan Hurt, May 07 2021

A265057 Coordination sequence for (2,3,7) tiling of hyperbolic plane.

Original entry on oeis.org

1, 3, 5, 7, 9, 12, 16, 20, 24, 28, 33, 40, 48, 57, 67, 78, 92, 109, 129, 152, 178, 209, 246, 290, 342, 402, 472, 555, 653, 769, 905, 1064, 1251, 1471, 1731, 2037, 2396, 2818, 3314, 3898, 4586, 5395, 6346, 7464, 8779, 10327, 12148, 14290, 16809, 19771, 23256, 27356, 32179, 37852, 44524, 52372
Offset: 0

Views

Author

N. J. A. Sloane, Dec 29 2015

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(x^6 + x^5 + x^4 + x^3 + x^2 + x + 1) (x^2 + x + 1) (x + 1)^2/(x^10 + x^9 - x^7 - x^6 - x^5 - x^4 - x^3 + x + 1), {x, 0, 60}], x] (* Vincenzo Librandi, Dec 30 2015 *)
  • PARI
    x='x+O('x^50); Vec((x^6+x^5+x^4+x^3+x^2+x+1)*(x^2+x+1)*(x+1)^2/(x^10+x^9-x^7-x^6-x^5-x^4-x^3+x+1)) \\ G. C. Greubel, Aug 06 2017

Formula

G.f.: (x^6+x^5+x^4+x^3+x^2+x+1)*(x^2+x+1)*(x+1)^2/(x^10+x^9-x^7-x^6-x^5-x^4-x^3+x+1).

A265058 Coordination sequence for (2,3,8) tiling of hyperbolic plane.

Original entry on oeis.org

1, 3, 5, 7, 9, 12, 16, 21, 27, 33, 40, 49, 61, 76, 94, 116, 142, 174, 214, 264, 326, 401, 493, 606, 745, 917, 1129, 1390, 1710, 2103, 2587, 3183, 3917, 4820, 5931, 7297, 8977, 11045, 13590, 16722, 20575, 25315, 31147, 38322, 47151, 58015, 71382, 87828, 108062, 132958, 163590, 201280, 247654
Offset: 0

Views

Author

N. J. A. Sloane, Dec 29 2015

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(x + 1)^2 (x^2 + x + 1) (x^6 + x^4 + x^2 + 1)/(x^10 - x^7 - x^5 - x^3 + 1), {x, 0, 60}], x] (* Vincenzo Librandi, Dec 30 2015 *)
  • PARI
    x='x+O('x^50); Vec((x+1)^2*(x^2+x+1)*(x^6+x^4+x^2+1)/(x^10-x^7-x^5-x^3+1)) \\ G. C. Greubel, Aug 06 2017

Formula

G.f.: (x+1)^2*(x^2+x+1)*(x^6+x^4+x^2+1)/(x^10-x^7-x^5-x^3+1).

A265059 Coordination sequence for (2,3,9) tiling of hyperbolic plane.

Original entry on oeis.org

1, 3, 5, 7, 9, 12, 16, 21, 28, 36, 45, 56, 70, 89, 113, 143, 181, 228, 287, 361, 455, 575, 726, 916, 1155, 1456, 1836, 2315, 2920, 3684, 4647, 5861, 7391, 9321, 11756, 14827, 18701, 23587, 29749, 37520, 47320, 59681, 75272, 94936, 119737, 151016, 190466, 240221, 302973, 382119, 481941, 607840, 766627
Offset: 0

Views

Author

N. J. A. Sloane, Dec 29 2015

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(x + 1)^2 (x^2 + x + 1) (x^6 + x^3 + 1)/(x^10 - x^8 - x^5 - x^2 + 1), {x, 0, 60}], x] (* Vincenzo Librandi, Dec 30 2015 *)
  • PARI
    x='x+O('x^50); Vec((x+1)^2*(x^2+x+1)*(x^6+x^3+1)/(x^10-x^8-x^5-x^2+1)) \\ G. C. Greubel, Aug 06 2017

Formula

G.f.: (x+1)^2*(x^2+x+1)*(x^6+x^3+1)/(x^10-x^8-x^5-x^2+1).

A265060 Coordination sequence for (2,4,5) tiling of hyperbolic plane.

Original entry on oeis.org

1, 3, 5, 8, 12, 16, 21, 28, 36, 46, 60, 77, 98, 126, 162, 207, 265, 340, 435, 557, 714, 914, 1170, 1499, 1920, 2458, 3148, 4032, 5163, 6612, 8468, 10844, 13887, 17785, 22776, 29167, 37353, 47836, 61260, 78452, 100469, 128664, 164772, 211014, 270232, 346069, 443190, 567566, 726846, 930827, 1192053, 1526588
Offset: 0

Views

Author

N. J. A. Sloane, Dec 29 2015

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(x + 1)^2 (x^2 + 1) (x^4 + x^3 + x^2 + x + 1)/(x^8 - x^5 - x^4 - x^3 + 1), {x, 0, 60}], x] (* Vincenzo Librandi, Dec 30 2015 *)
  • PARI
    x='x+O('x^50); Vec((x+1)^2*(x^2+1)*(x^4+x^3+x^2+x+1)/(x^8-x^5-x^4-x^3+1)) \\ G. C. Greubel, Aug 06 2017

Formula

G.f.: (x+1)^2*(x^2+1)*(x^4+x^3+x^2+x+1)/(x^8-x^5-x^4-x^3+1).
Showing 1-10 of 43 results. Next