A000930 Narayana's cows sequence: a(0) = a(1) = a(2) = 1; thereafter a(n) = a(n-1) + a(n-3).
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
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).
Links
- Harvey P. Dale and T. D. Noe, Table of n, a(n) for n = 0..5000 [The first 500 terms were computed by T. D. Noe]
- Gene Abrams, Stefan Erickson, and Cristóbal Gil Canto, Leavitt path algebras of Cayley graphs C_n^j, arXiv:1712.06480 [math.RA], 2017.
- Jarib R. Acosta, Yadira Caicedo, Juan P. Poveda, José L. Ramírez, and Mark Shattuck, Some New Restricted n-Color Composition Functions, J. Int. Seq., Vol. 22 (2019), Article 19.6.4.
- Mudit Aggarwal and Samrith Ram, Generating Functions for Straight Polyomino Tilings of Narrow Rectangles, J. Int. Seq., Vol. 26 (2023), Article 23.1.4.
- J.-P. Allouche and T. Johnson, Narayana's cows and delayed morphisms, in G. Assayag, M. Chemillier, and C. Eloy, Troisièmes Journées d'Informatique Musicale, JIM '96, Île de Tatihou, France, 1996, pp. 2-7. [The hal link does not always work. - _N. J. A. Sloane_, Feb 19 2025]
- J.-P. Allouche and T. Johnson, Narayana's cows and delayed morphisms, in G. Assayag, M. Chemillier, and C. Eloy, Troisièmes Journées d'Informatique Musicale, JIM '96, Île de Tatihou, France, 1996, pp. 2-7. [Local copy with annotations and a correction from _N. J. A. Sloane_, Feb 19 2025]
- I. Amburg, K. Dasaratha, L. Flapan, T. Garrity, C. Lee, C. Mihailak, N. Neumann-Chun, S. Peluse, and M. Stoffregen, Stern Sequences for a Family of Multidimensional Continued Fractions: TRIP-Stern Sequences, arXiv:1509.05239v1 [math.CO] Sep 17 2015. See Conjecture 5.8.
- Andrei Asinowski, Cyril Banderier, and Valerie Roitner, Generating functions for lattice paths with several forbidden patterns, (2019).
- Bruce M. Boman, Geometric Capitulum Patterns Based on Fibonacci p-Proportions, Fibonacci Quart. 58 (2020), no. 5, 91-102.
- Bruce M. Boman, Thien-Nam Dinh, Keith Decker, Brooks Emerick, Christopher Raymond, and Gilberto Schleinger, Why do Fibonacci numbers appear in patterns of growth in nature?, in Fibonacci Quarterly, 55(5): pp 30-41, (2017).
- Eric Fernando Bravo, On concatenations of Padovan and Perrin numbers, Math. Commun. (2023) Vol 28, 105-119.
- Russ Chamberlain, Sam Ginsburg and Chi Zhang, Generating Functions and Wilf-equivalence on Theta_k-embeddings, University of Wisconsin, April 2012.
- Eunice Y. S. Chan, A comparison of solution methods for Mandelbrot-like polynomials, MS Thesis, 2016, University of Western Ontario; Electronic Thesis and Dissertation Repository. 4028.
- Eunice Y. S. Chan, Algebraic Companions and Linearizations, The University of Western Ontario (Canada, 2019) Electronic Thesis and Dissertation Repository. 6414.
- Eunice Y. S. Chan and Robert Corless, A new kind of companion matrix, Electronic Journal of Linear Algebra, Volume 32, Article 25, 2017, see p. 339.
- P. Chinn and S. Heubach, (1, k)-compositions, Congr. Numer. 164 (2003), 183-194. [Local copy]
- Hùng Việt Chu, Various sequences from counting subsets, version 2, June 2021.
- Johann Cigler, Some remarks on generalized Fibonacci and Lucas polynomials, arXiv:1912.06651 [math.CO], 2019.
- Tony Crilly, A supergolden rectangle, The Mathematical Gazette 78, No. 483 (1994): 320-325. See page 234.
- Tony Crilly, Narayana's integer sequence revisited, Math. Gaz. (2024) Vol. 108, Issue 572, 262-269.
- E. Di Cera and Y. Kong, Theory of multivalent binding in one and two-dimensional lattices, Biophysical Chemistry, Vol. 61 (1996), pp. 107-124.
- James East and Nicholas Ham, Lattice paths and submonoids of Z^2, arXiv:1811.05735 [math.CO], 2018.
- Richard Ehrenborg, Gábor Hetyei, and Margaret Readdy, Catalan-Spitzer permutations, arXiv:2310.06288 [math.CO], 2023. See p. 11.
- Larry Ericksen and Peter G. Anderson, Patterns in differences between rows in k-Zeckendorf arrays, The Fibonacci Quarterly, Vol. 50, February 2012. - _N. J. A. Sloane_, Jun 10 2012
- M. Feinberg, New slants, Fib. Quart. 2 (1964), 223-227.
- Steven Finch, Cantor-solus and Cantor-multus distributions, arXiv:2003.09458 [math.CO], 2020.
- P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009; see page 373.
- Lukas Fleischer and Jeffrey Shallit, Words With Few Palindromes, Revisited, arXiv:1911.12464 [cs.FL], 2019.
- I. M. Gessel and Ji Li, Compositions and Fibonacci identities, J. Int. Seq. 16 (2013) 13.4.5.
- Philip Gibbs and Judson McCranie, The Ulam Numbers up to One Trillion, (2017).
- Maria M. Gillespie, Kenneth G. Monks, and Kenneth M. Monks, Enumerating Anchored Permutations with Bounded Gaps, arXiv:1808.03573 [math.CO], 2018.
- Taras Goy, On identities with multinomial coefficients for Fibonacci-Narayana sequence, Annales Mathematicae et Informaticae (2018) 49, Eszterházy Károly University Institute of Mathematics and Informatics, 75-84.
- T. M. Green, Recurrent sequences and Pascal's triangle, Math. Mag., 41 (1968), 13-21.
- Russelle Guadalupe, On the 3-adic valuation of the Narayana numbers, arXiv:2112.06187 [math.NT], 2021.
- R. K. Guy, Anyone for Twopins?, in D. A. Klarner, editor, The Mathematical Gardner. Prindle, Weber and Schmidt, Boston, 1981, pp. 2-15. [Annotated scanned copy, with permission]
- R. K. Guy, The strong law of small numbers, Amer. Math. Monthly 95 (1988), no. 8, 697-712. [Annotated scanned copy]
- V. C. Harris and C. C. Styles, A generalization of Fibonacci numbers, Fib. Quart. 2 (1964) 277-289, sequence u(n,2,1).
- W. R. Heinson, Simulation studies on shape and growth kinetics for fractal aggregates in aerosol and colloidal systems, PhD Dissertation, Kansas State Univ., Manhattan, Kansas, 2015; see page 49.
- J. Hermes, Anzahl der Zerlegungen einer ganzen rationalen Zahl in Summanden, Math. Ann., 45 (1894), 371-380.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 14
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 376
- Milan Janjic, Recurrence Relations and Determinants, arXiv preprint arXiv:1112.2466 [math.CO], 2011.
- Milan Janjic, Determinants and Recurrence Sequences, Journal of Integer Sequences, 2012, Article 12.3.5.
- Dov Jarden, Recurring Sequences, Riveon Lematematika, Jerusalem, 1966. [Annotated scanned copy] See p. 91.
- Tom Johnson, Illustrated Music #8, Narayana's Cows
- B. Keszegh, N Lemons and D. Palvolgyi, Online and quasi-online colorings of wedges and intervals, arXiv preprint arXiv:1207.4415 [math.CO], 2012-2015.
- K. Kirthi, Narayana Sequences for Cryptographic Applications, arXiv preprint arXiv:1509.05745 [math.NT], 2015.
- Martin Küttler, Maksym Planeta, Jan Bierbaum, Carsten Weinhold, Hermann Härtig, Amnon Barak, and Torsten Hoefler, Corrected trees for reliable group communication, Proceedings of the 24th Symposium on Principles and Practice of Parallel Programming (PPoPP 2019), 287-299.
- Steven Linton, James Propp, Tom Roby, and Julian West, Equivalence Classes of Permutations under Various Relations Generated by Constrained Transpositions, Journal of Integer Sequences, Vol. 15 (2012), #12.9.1.
- K. Manes, A. Sapounakis, I. Tasoulas, and P. Tsikouras, Equivalence classes of ballot paths modulo strings of length 2 and 3, arXiv:1510.01952 [math.CO], 2015.
- T. Mansour and M. Shattuck, Polynomials whose coefficients are generalized Tribonacci numbers, Applied Mathematics and Computation, Volume 219, Issue 15, Apr 01 2013, Pages 8366-8374.
- T. Mansour and M. Shattuck, A monotonicity property for generalized Fibonacci sequences, arXiv preprint arXiv:1410.6943 [math.CO], 2014.
- R. J. Mathar, Paving Rectangular Regions with Rectangular Tiles: Tatami and Non-Tatami Tilings, arXiv:1311.6135 [math.CO], 2013, Table 17.
- R. J. Mathar, Tiling n x m rectangles with 1 x 1 and s x s squares, arXiv:1609.03964 [math.CO] (2016), Section 4.2.
- Augustine O. Munagi, Integer Compositions and Higher-Order Conjugation, J. Int. Seq., Vol. 21 (2018), Article 18.8.5.
- Denis Neiter and Amsha Proag, Links Between Sums Over Paths in Bernoulli's Triangles and the Fibonacci Numbers, Journal of Integer Sequences, Vol. 19 (2016), #16.8.3.
- J. Noonan and D. Zeilberger, The Goulden-Jackson Cluster Method: Extensions, Applications and Implementations, arXiv:math/9806036 [math.CO], Jun 08 1998.
- Antonio M. Oller-Marcén, The Dying Rabbit Problem Revisited, INTEGERS, 9 (2009), 129-138.
- Pagdame Tiebekabe and Kouèssi Norbert Adédji, Narayana's cows numbers which are concatenations of three repdigits in base Rho, arXiv:2304.00773 [math.NT], 2023.
- Dömötör Pálvölgyi, Coloring Geometric Hypergraphs, Ph. D. Dissertation, Hungarian Acad. Sci. (Hungary, 2023). See p. 35.
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992.
- Abhishek Raj, Vadim Oganesyan, and Antonello Scardicchio, A kinetically constrained model exhibiting non-linear diffusion and jamming, arXiv:2412.05231 [cond-mat.stat-mech], 2024. See p. 8.
- Narad Rampersad and Max Wiebe, Sums of products of binomial coefficients mod 2 and 2-regular sequences, Integers (2024) Vol. 24, Art. No. A73. See p. 9.
- M. Randic, D. Morales, and O. Araujo, Higher-order Lucas numbers, Divulgaciones Matematicas 6:2 (2008), pp. 275-283.
- Frank Ruskey and Jennifer Woodcock, Counting Fixed-Height Tatami Tilings, Electronic Journal of Combinatorics, Paper R126 (2009), 20 pages.
- Jeffrey Shallit, The Narayana Morphism and Related Words, arXiv:2503.01026 [math.CO], 2025.
- T. Sillke, The binary form of Conway's Sequence
- Parmanand Singh, The Ganita Kaumudi of Narayana Pandita, Ganita-Bharati, Vol. 20, No. 1-4 (1998), pp. 25-82. See pp. 79-80.
- Z. Skupien, Sparse Hamiltonian 2-decompositions together with exact count of numerous Hamiltonian cycles, Discr. Math., 309 (2009), 6382-6390. - _N. J. A. Sloane_, Feb 12 2010
- Yüksel Soykan, On Generalized co-Narayana Numbers, Earthline Journal of Mathematical Sciences, 15(4), 605-638, (2025). See p. 607.
- Krzysztof Strasburger, The order of three lowest-energy states of the six-electron harmonium at small force constant, The Journal of Chemical Physics 144, 234304 (2016).
- Krzysztof Strasburger, Explicitly correlated wavefunctions of the ground state and the lowest 5-tuple state of the carbon atom, arXiv:1903.06051 [physics.chem-ph], 2019.
- Krzysztof Strasburger, Energy difference between the lowest doublet and quartet states of the boron atom, arXiv:2009.08723 [physics.chem-ph], 2020.
- Liam Taylor-West, Modularity, technology, and geometry in compositional practice: a portfolio of original compositions, D. mus. dissertation, Royal College of Music (London, England 2023), p. 56.
- Eric Weisstein's World of Mathematics, Narayana Cow Sequence.
- E. Wilson, The Scales of Mt. Meru
- Index entries for linear recurrences with constant coefficients, signature (1,0,1).
Crossrefs
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)^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
Comments