A322424 Start with (1, 2, 3, 4); when the sequence has n terms, extend it by appending a(n) copies of a(1..n-1). (Cf. "Look to the left" sequence A293630.)
1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 1, 2, 3
Offset: 1
Keywords
Examples
Sequence starts with 1, 2, 3, 4. Then 4 copies of 1, 2, 3 are appended, giving 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3. Then 3 copies of everything but the final entry 3 are appended, giving 16 + 15 + 15 + 15 = 61 terms.
Links
- Iain Fox, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Nest[Join[#, Flatten@ ConstantArray[Drop[#, -1], #[[-1]]] ] &, Range@ 4, 3] (* Michael De Vlieger, Dec 08 2018 *)
-
PARI
gen(n, v=[1,2,3,4], w) = for(x=1, n, w=vector(#v-1, i, v[i]); for(y=1, v[#v], v=concat(v, w))); v
Formula
Lim_{n->infinity} (a(1) + a(2) + ... + a(n))/n = 2.08405776...
Extensions
Self-contained definition from M. F. Hasler, Dec 10 2018