The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A098103 Consider the succession of single digits of the primes (A000040): 2 3 5 7 1 1 1 3 1 7 1 9 2 3 2 9 3 1 ... (A033308). This sequence is the lexicographically earliest derangement of A000040 that produces the same succession of digits. 2
 23, 5, 7, 11, 13, 17, 19, 2, 3, 293, 137, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 1371391491511, 571, 631, 67173179181191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Derangement here means a(n) != A000040(n) for all n. Original name: "Write each prime number >0 on a single label. Put the labels in numerical order to form an infinite sequence L. Consider the succession of single digits of L: 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 5 9 6 1 6 7 7 1 7 3 7 9... (see A033308). The sequence S gives a rearrangement of the labels that reproduces the same succession of digits, subject to the constraints that a label of L cannot represent itself, and 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 'prime numbers pattern' using only prime numbers, but rearranged. Do not use any prime more than once." a(180) has over 1000 digits. - Danny Rorabaugh, Nov 29 2015 LINKS Danny Rorabaugh, Table of n, a(n) for n = 1..179 Eric Angelini, Sequence re-writing Eric Angelini, Sequence re-writing [Cached copy, with permission] EXAMPLE We must begin with "2,3,5,7,11,..." and we cannot have the first term be 2, the first prime, so the smallest available prime is 23. 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[m == Prime[Length@ a + 1], ! PrimeQ@ m, MemberQ[a, m]], g[]]; AppendTo[a, m]; m = 0, {k}]; a]; f[Flatten@ Map[IntegerDigits, Prime@ Range@ 120], 53] (* Michael De Vlieger, Nov 29 2015, Version 10.2 *) PROG (Sage) def A098103(n):   Pr, p, s, A, i = Primes(), 2, "", [], 1   while len(A)

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 19 08:59 EDT 2021. Contains 343110 sequences. (Running on oeis4.)