A097487 Write the nonprime positive integers on labels in numerical order, forming an infinite sequence L. Now consider the succession of single digits of A000040 (prime numbers): 2 3 5 7 1 1 1 3 1 7 1 9 2 3 2 9 3 1 3 7 4 1 4 3 4 7 5 3 ... (A033308). This sequence gives an arrangement L that produces the same succession of digits, subject to the constraint that the smallest unused label must be used that does not lead to a contradiction.
235, 711, 1, 3171, 9, 232, 93, 1374, 14, 34, 75, 35, 96, 16, 77, 1737, 98, 38, 99, 710, 110, 310, 71091, 1312, 713, 1137, 1391, 4, 91, 51, 15, 716, 316, 717, 3179, 18, 119, 11931, 97199, 21, 12, 2322, 72, 292, 33, 2392, 412, 512, 57, 26, 32, 6, 92, 712, 772, 8
Offset: 1
Examples
We must begin with 2,3,5,7,11,13,... and we cannot represent "2" with the label "2" or "23", so the next possibility is the label "235" (first available nonprime number in L).
Links
- Alois P. Heinz, 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.
Programs
-
Mathematica
f[lst_List, k_] := Block[{L = lst, g, a = {}, m = 0}, g[] := {Set[m, First@ FromDigits@ Append[IntegerDigits@ m, First@ #]], Set[L, Last@ #]} &@ TakeDrop[L, 1]; Do[g[]; While[Or[PrimeQ@ m, MemberQ[a, m]], g[]]; AppendTo[a, m]; m = 0, {k}]; a]; f[Flatten@ Map[IntegerDigits, Prime@ Range@ 200], 56] (* Michael De Vlieger, Nov 29 2015, Version 10.2 *)
Comments