

A128280


a(1)=2, then a(n) is the least number absent among a(1)..a(n1) and such that a(n)+a(n1) is prime.


3



0, 2, 1, 4, 3, 8, 5, 6, 7, 10, 9, 14, 15, 16, 13, 18, 11, 12, 17, 20, 21, 22, 19, 24, 23, 30, 29, 32, 27, 26, 33, 28, 25, 34, 37, 36, 31, 40, 39, 44, 35, 38, 41, 42, 47, 50, 51, 46, 43, 54, 49, 48, 53, 56, 45, 52, 55, 58, 69, 62, 65, 66, 61, 70, 57, 74, 63, 64, 67, 60, 71, 68, 59
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

The sequence may well be a rearrangement of natural numbers. Interestingly, subsets of n first terms for n={2,4,8,10,18,22,24,56,..} are permutations of 1..n. E.g. first 56 terms: {2,1,4,3,8,5,6,7,10,9,14,15,16,13,18,11,12,17,20,21,22, 19,24,23, 30,29,32,27,26,33,28,25,34,37,36,31,40,39,44,35,38,41,42,47,50,51, 46,43,54,49,48,53,56,45,52,55} are permutation of 1..56.
Without altering the definition nor the existing values, one can as well start with a(0)=0 and get (conjecturally) a permutation of the nonnegative integers. This sequence is in some sense the "arithmetical" analog of the "digital" variant A231433: Here we add subsequent terms, there the digits are "added"/concatenated.  M. F. Hasler, Nov 09 2013


LINKS

Lars Blomberg, Table of n, a(n) for n = 0..9999


PROG

(PARI) {a=0; u=0; for(n=1, 99, u+=1<<a; print1(a", "); for(k=1, 9e9, bittest(u, k)&&next; isprime(a+k)&&(a=k)&&next(2)))}


CROSSREFS

Cf. A083236.
Sequence in context: A179206 A074987 A294096 * A182177 A281878 A106625
Adjacent sequences: A128277 A128278 A128279 * A128281 A128282 A128283


KEYWORD

nonn


AUTHOR

Zak Seidov, May 03 2007


EXTENSIONS

Initial a(0)=0 prefixed by M. F. Hasler, Nov 09 2013


STATUS

approved



