login
A367951
Fixed point of the morphism 1 -> {1,3}, t -> {t-2,t,t,t+2} (for t > 1), starting from {1}.
5
1, 3, 1, 3, 3, 5, 1, 3, 1, 3, 3, 5, 1, 3, 3, 5, 3, 5, 5, 7, 1, 3, 1, 3, 3, 5, 1, 3, 1, 3, 3, 5, 1, 3, 3, 5, 3, 5, 5, 7, 1, 3, 1, 3, 3, 5, 1, 3, 3, 5, 3, 5, 5, 7, 1, 3, 3, 5, 3, 5, 5, 7, 3, 5, 5, 7, 5, 7, 7, 9, 1, 3, 1, 3, 3, 5, 1, 3, 1, 3, 3, 5, 1, 3, 3, 5, 3, 5, 5, 7
OFFSET
1,2
COMMENTS
The first binomial(2*k,k) = A000984(k) terms (k >= 1) are the row lengths of the Christmas tree pattern (A367508) of order 2*k. See A367953 for the morphism that generates row lengths for odd orders.
REFERENCES
Donald E. Knuth, The Art of Computer Programming, Vol. 4A: Combinatorial Algorithms, Part 1, Addison-Wesley, 2011, Section 7.2.1.6, exercise 76, pp. 479 and 800.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..12870 (first 8 iterations).
MATHEMATICA
Nest[Flatten[ReplaceAll[#, {1->{1, 3}, t_/; t>1:>{t-2, t, t, t+2}}]]&, {1}, 5]
PROG
(Python)
from itertools import islice
def A367951_gen(): # generator of terms
a, l = [1], 0
while True:
yield from a[l:]
c = sum(([1, 3] if d==1 else [d-2, d, d, d+2] for d in a), start=[])
l, a = len(a), c
A367951_list = list(islice(A367951_gen(), 30)) # Chai Wah Wu, Dec 26 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo Xausa, Dec 05 2023
STATUS
approved