OFFSET
1,2
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..16384
FORMULA
Limit_{n->oo} (Sum_{i=1..n} a(i))/n = 133/60; density of 1's is 19/60; density of 2's is 17/60; density of 3's is 4/15; density of 4's is 2/15.
EXAMPLE
Concatenate 1,2,3,4 gives 1,2,3,4,1,2,3,4 change 4 -> 1, hence first 8 terms are 1,2,3,4,1,2,3,1. Concatenate again: 1,2,3,4,1,2,3,1,1,2,3,4,1,2,3,1 change 1->2, hence first 16 terms are 1,2,3,4,1,2,3,1,1,2,3,4,1,2,3,2.
MATHEMATICA
A078978list[i_]:=Nest[Join[#, Most[#], {Mod[Last[#], 4]+1}]&, Range[4], i];
A078978list[5] (* Each iteration doubles the number of terms *) (* Paolo Xausa, Aug 31 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Dec 19 2002
STATUS
approved