cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Eric Angelini, Sep 19 2004; corrected Sep 23 2004

Keywords

Comments

This could be roughly rephrased like this: "Rewrite in the most economical way the prime numbers 'pattern' using only nonprime numbers. Do not use any nonprime twice."

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).
		

Crossrefs

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 *)