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!)
 A329566 For all n >= 0, exactly six sums are prime among a(n+i) + a(n+j), 0 <= i < j < 6; lexicographically earliest such sequence of distinct nonnegative numbers. 10
 0, 1, 2, 3, 4, 24, 5, 7, 6, 8, 9, 10, 11, 13, 18, 19, 16, 12, 28, 31, 17, 15, 14, 22, 26, 20, 21, 27, 23, 30, 32, 80, 41, 38, 51, 39, 62, 29, 35, 44, 34, 45, 54, 25, 49, 33, 64, 36, 37, 40, 46, 61, 47, 42, 43, 55, 66, 58, 65, 48, 72, 79, 52, 53, 59, 78, 50, 57, 60, 89, 71, 56, 68, 63, 74, 75, 76, 69, 82, 81, 67, 91, 88, 70, 100 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS That is, there are 6 primes, counted with multiplicity, among the 15 pairwise sums of any 6 consecutive terms. Is this a permutation of the nonnegative integers? If so, then the restriction to [1..oo) is a permutation of the positive integers, but not the lexicographically earliest one with this property, which starts (1, 2, 3, 4, 5, 7, 6, 8, 9, 10, 11, 13, 18, 19, 16, 12, 24...). LINKS M. F. Hasler, Prime sums from neighboring terms, OEIS wiki, Nov. 23, 2019 EXAMPLE For n = 0, we consider pairwise sums of the first 6 terms a(0..5) = (0, 1, 2, 3, 4, 24): We have (a(i) + a(j), 0 <= i < j < 6) = (1; 2, 3; 3, 4, 5; 4, 5, 6, 7; 24, 25, 26, 27, 28) among which there are 6 primes, counted with repetition. This justifies to take a(0..4) = (0, ..., 4), the smallest possible choices for these first 5 terms. Since no smaller a(5) between 5 and 23 has this property, this is the start of the lexicographically earliest nonnegative sequence with this property and no duplicate terms. Then we find that a(6) = 5 is possible, giving also 6 prime sums for n = 1, so this is the correct continuation (modulo later confirmation that the sequence can be continued without contradiction given this choice). Next we find that a(7) = 6 is not possible, it would give only 5 prime sums using the 6 consecutive terms (2, 3, 4, 24, 5, 6). However, a(7) = 7 is a valid continuation, and so on. PROG (PARI) A329566(n, show=0, o=0, N=6, M=5, p=[], U, u=o)={for(n=o, n-1, if(show>0, print1(o", "), show<0, listput(L, o)); U+=1<<(o-u); U>>=-u+u+=valuation(U+1, 2); p=concat(if(#p>=M, p[^1], p), o); my(c=N-sum(i=2, #p, sum(j=1, i-1, isprime(p[i]+p[j])))); if(#p

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 7 13:32 EDT 2020. Contains 333305 sequences. (Running on oeis4.)