A078012 a(n) = a(n-1) + a(n-3) for n >= 3, with a(0) = 1, a(1) = a(2) = 0. This recurrence can also be used to define a(n) for n < 0.
1, 0, 0, 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
G.f. = 1 + x^3 + x^4 + x^5 + 2*x^6 + 3*x^7 + 4*x^8 + 6*x^9 + 9*x^10 + 13*x^11 + ...
References
- Taylor L. Booth, Sequential Machines and Automata Theory, John Wiley and Sons, Inc., 1967, page 331ff.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Christian Ballot, On Functions Expressible as Words on a Pair of Beatty Sequences, Journal of Integer Sequences, Vol. 20 (2017), Article 17.4.2.
- C. K. Fan, Structure of a Hecke algebra quotient, J. Amer. Math. Soc. 10 (1997), no. 1, 139-167. [Page 156, f_n.]
- Taras Goy, On identities with multinomial coefficients for Fibonacci-Narayana sequence, Annales Mathematicae et Informaticae, Vol. 49 (2018), 75-84.
- Bahar Kuloğlu, Engin Özkan, and Marin Marin, On the period of Pell-Narayana sequence in some groups, arXiv:2305.04786 [math.CO], 2023.
- J. D. Opdyke, A unified approach to algorithms generating unrestricted.., J. Math. Model. Algor. 9 (2010) 53-97.
- Yüksel Soykan, Summing Formulas For Generalized Tribonacci Numbers, arXiv:1910.03490 [math.GM], 2019.
- Index entries for linear recurrences with constant coefficients, signature (1,0,1).
Programs
-
GAP
a:=[1,0,0];; for n in [4..50] do a[n]:=a[n-1]+a[n-3]; od; a; # G. C. Greubel, Jun 28 2019
-
Haskell
a078012 n = a078012_list !! n a078012_list = 1 : 0 : 0 : 1 : zipWith (+) a078012_list (zipWith (+) (tail a078012_list) (drop 2 a078012_list)) -- Reinhard Zumkeller, Mar 23 2012
-
Magma
I:=[1,0,0]; [n le 3 select I[n] else Self(n-1) + Self(n-3): n in [1..50]]; // G. C. Greubel, Jan 19 2018
-
Maple
A078012 := proc(n): if n=0 then 1 else add(binomial(n-3-2*i,i),i=0..(n-3)/3) fi: end: seq(A078012(n), n=0..46); # Johannes W. Meijer, Aug 11 2011 # second Maple program: a:= n-> (<<0|1|0>, <0|0|1>, <1|0|1>>^n)[1, 1]: seq(a(n), n=0..46); # Alois P. Heinz, May 08 2025
-
Mathematica
CoefficientList[ Series[(1-x)/(1-x-x^3), {x,0,50}], x] (* Robert G. Wilson v, May 25 2011 *) LinearRecurrence[{1,0,1}, {1,0,0}, 50] (* Vladimir Joseph Stephan Orlovsky, Feb 24 2012 *) a[ n_]:= If[ n >= 0, SeriesCoefficient[ (1-x)/(1-x-x^3), {x, 0, n}], SeriesCoefficient[1/(1+x^2-x^3), {x, 0, -n}]]; (* Michael Somos, Feb 03 2018 *)
-
PARI
{a(n) = if( n<0, n = -n; polcoeff( 1 / (1 + x^2 - x^3) + x * O(x^n), n), polcoeff( (1 - x) / (1 - x - x^3) + x * O(x^n), n))}; /* Michael Somos, May 03 2011 */
-
Sage
((1-x)/(1-x-x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Jun 28 2019
Formula
a(n) = Sum_{i=0..(n-3)/3} binomial(n-3-2*i, i), n >= 1, a(0) = 1.
From Michael Somos, May 03 2011: (Start)
Euler transform of A065417.
G.f.: (1 - x) / (1 - x - x^3).
a(n+5) = A068921(n). (End)
G.f.: 1/(1 - Sum_{k>=3} x^k). - Joerg Arndt, Aug 13 2012
G.f.: Q(0)*(1-x)/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
0 = -1 + a(n)*(a(n)*(a(n) + a(n+2)) + a(n+1)*(a(n+1) - 3*a(n+2))) + a(n+1)*(+a(n+1)*(+a(n+1) + a(n+2)) + a(n+2)*(-2*a(n+2))) + a(n+2)^3 for all n in Z. - Michael Somos, Feb 03 2018
a(-n) = a(n)*a(n+3) - a(n+1)*a(n+2) for all n in Z. - Greg Dresden, May 07 2025
Extensions
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021
Entry revised by N. J. A. Sloane, May 11 2025, making use of comments from Michael Somos, May 03 2011 and Greg Dresden, May 11 2025
Comments