login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A230086 Lexicographically earliest permutation of the positive integers such that a(n+a(n)) is prime for all n. 2
1, 2, 3, 5, 4, 7, 6, 8, 11, 9, 10, 12, 13, 14, 15, 17, 16, 18, 19, 23, 29, 20, 21, 31, 22, 37, 24, 41, 25, 43, 26, 27, 47, 28, 30, 53, 32, 59, 33, 34, 35, 61, 67, 71, 36, 38, 73, 39, 40, 79, 83, 42, 44, 89, 97, 45, 101, 46, 103, 48, 49, 107, 109, 50 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
"Lexicographically earliest" means that a(n) is chosen as small as possible, in the order of increasing n, without leading to a contradiction. "Permutation" means that no integer may appear more than once, and together with the former prescription, every integer will indeed appear.
Existence of the sequence is guaranteed since terms can be filled in one after the other, and each time the place n+a(n) (which comes later) is required to be filled with a prime. This does not prevent from filling other places with primes. Since at each step the smallest available number is used, the primes as well as the composites appear in their natural order.
It appears that the primes are exactly the "early birds" of this sequence, i.e., the terms such that a(n)>n, except for {2, 3, 13, 19} which appear in their natural position. - M. F. Hasler, Oct 09 2013
LINKS
Eric Angelini, a(a(n) + n) is prime, SeqFan list, Oct 08 2013.
PROG
(PARI) {u=0; a=vector(1000); for(i=1, #a, a[i]>0 && next; for(x=1, 9e9, (!a[i] || isprime(x)) && !bittest(u, x) && (a[i]=x) && break); u+=1<<a[i]; i+a[i]<=#a && a[i+a[i]]=-1); vecextract(a, "..100")}
CROSSREFS
Sequence in context: A098313 A098311 A342265 * A333404 A227082 A227142
KEYWORD
nonn
AUTHOR
Eric Angelini and M. F. Hasler, Oct 08 2013
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 14:51 EDT 2024. Contains 371749 sequences. (Running on oeis4.)