OFFSET
0,2
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
Julien Cassaigne, Juhani Karhumäki, Svetlana Puzynina, On k-abelian palindromes, Information and Computation, Volume 260, June 2018, Pages 89-98. See Lemma 1.
FORMULA
From Robert Israel, Aug 20 2018: (Start)
a(3*k) = a(3*k+2) = a(k).
a(3*k+1) == 1 + a(k) mod 4. (End)
MAPLE
A:= [1]:
for k from 1 to 5 do A:= subs([1=(1, 2, 1), 2=(2, 3, 2), 3=(3, 4, 3), 4=(4, 1, 4)], A);
od:
op(A); # Robert Israel, Aug 20 2018
MATHEMATICA
SubstitutionSystem[{1 -> {1, 2, 1}, 2 -> {2, 3, 2}, 3 -> {3, 4, 3}, 4 -> {4, 1, 4}}, 1, 5] // Last (* Jean-François Alcover, Apr 06 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 20 2018
STATUS
approved