(MAGMAMagma) I:=[1, 0, 1, 1]; [n le 4 select I[n] else Self(n-1) + Self(n-4): n in [1..50]]; // G. C. Greubel, Mar 10 2019
(MAGMAMagma) I:=[1, 0, 1, 1]; [n le 4 select I[n] else Self(n-1) + Self(n-4): n in [1..50]]; // G. C. Greubel, Mar 10 2019
proposed
approved
editing
proposed
V. E. Hoggatt, Jr., and Marjorie Bicknell, Palindromic compositions, Fibonacci Quart., Vol. 13(4), 1975, pp. 350-356.
V. E. Hoggatt, Jr., and Marjorie Bicknell, <a href="http://www.fq.math.ca/Scanned/13-4/hoggatt1.pdf">Palindromic compositions</a>, Fibonacci Quart., Vol. 13(4), 1975, pp. 350-356.
proposed
editing
editing
proposed
LinearRecurrence[{1, 0, 0, 1}, {1, 0, 1, 1}, 50] (* G. C. Greubel, Mar 10 2019 *)
(PARI) my(x='x+O('x^50)); Vec((1-x+x^2)/(1-x-x^4)) \\ G. C. Greubel, Mar 10 2019
(MAGMA) I:=[1, 0, 1, 1]; [n le 4 select I[n] else Self(n-1) + Self(n-4): n in [1..50]]; // G. C. Greubel, Mar 10 2019
(Sage) ((1-x+x^2)/(1-x-x^4)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Mar 10 2019
proposed
editing
editing
proposed
Expansion of (1 - x + x^2)/(1 - x - x^4).
The Kn11 sums, see A180662, of triangle A065941 equal the terms of this sequence without a(0) and a(1). [- _Johannes W. Meijer, _, Aug 11 2011]
For n >= 2, a(n) is the number of palindromic compositions of n-2 with parts in {2,1,3,5,7,9,...}. The generating function follows easily from Theorem 1,2 of the Hoggatt et al. reference. Example: a(9) = 8 because we have 7, 151, 11311, 232, 313, 12121, 21112, and 1111111. - Emeric Deutsch, Aug 17 2016
Formula corrected by _Johannes W. Meijer, _, Aug 11 2011
approved
editing
reviewed
approved
proposed
reviewed