OFFSET
1,1
COMMENTS
Original name: "Write each odd integer >0 on a single label. Put the labels in numerical order to form an infinite sequence L. Now consider the succession of single digits of A005843 (even numbers): 2 4 6 8 1 0 1 2 1 4 1 6 1 8 2 0 2 2 2 4 2 6 2 8 3 0 3 2 3 4 3 6 3 8... The sequence S gives a rearrangement of the labels that reproduces the same succession of digits, subject to the constraint that the smallest label must be used that does not lead to a contradiction."
This could be roughly rephrased like this: Rewrite in the most economical way the "even numbers pattern" using only odd numbers, but rearranged. All the numbers of the sequence must be different one from another.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Eric Angelini, Jeux de suites, in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris.
EXAMPLE
We must begin with "2,4,6..." and we cannot use "2" or "24" or "246" (only odd terms are available), so the first possibility is "2468101". We could not have used "24681" since no term begins with a 0.
MATHEMATICA
f[lst_List, k_] := Block[{L = lst, g, w, a = {}, m}, g[x_] := First@ FirstPosition[x, i_ /; OddQ@ i]; Do[w = Take[L, g@ L]; L = Drop[L, Length@ w]; m = Take[L, g@ L]; While[Or[MemberQ[a, FromDigits@ w], IntegerLength@ FromDigits@ m < Length@ m], w = Join[w, m]; L = Drop[L, Length@ m]; m = Take[L, g@ L]]; AppendTo[a, FromDigits@ w], {k}]; a]; f[Flatten@ Map[IntegerDigits, 2 Range@ 80], 40] (* Michael De Vlieger, Nov 28 2015, Version 10 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, Sep 22 2004
EXTENSIONS
Name and Example edited by Danny Rorabaugh, Nov 28 2015
STATUS
approved