A367953 Fixed point of the morphism 2 -> {2,2,4}, t -> {t-2,t,t,t+2} (for t > 2), starting from {2}.
2, 2, 4, 2, 2, 4, 2, 4, 4, 6, 2, 2, 4, 2, 2, 4, 2, 4, 4, 6, 2, 2, 4, 2, 4, 4, 6, 2, 4, 4, 6, 4, 6, 6, 8, 2, 2, 4, 2, 2, 4, 2, 4, 4, 6, 2, 2, 4, 2, 2, 4, 2, 4, 4, 6, 2, 2, 4, 2, 4, 4, 6, 2, 4, 4, 6, 4, 6, 6, 8, 2, 2, 4, 2, 2, 4, 2, 4, 4, 6, 2, 2, 4, 2, 4, 4, 6, 2, 4, 4
Offset: 1
Keywords
Links
- Paolo Xausa, Table of n, a(n) for n = 1..24310 (first 8 iterations).
Programs
-
Mathematica
Nest[Flatten[ReplaceAll[#,{2->{2,2,4},t_/;t>2:>{t-2,t,t,t+2}}]]&,{2},5]
-
Python
from itertools import islice def A367953_gen(): # generator of terms a, l = [2], 0 while True: yield from a[l:] c = sum(([2,2,4] if d==2 else [d-2,d,d,d+2] for d in a), start=[]) l, a = len(a), c A367953_list = list(islice(A367953_gen(),30)) # Chai Wah Wu, Dec 26 2023
Comments