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!)
A329455 There are exactly three primes in {a(n+i) + a(n+j), 0 <= i < j <= 4} for any n >= 0: lexicographically earliest such sequence of distinct nonnegative integers. 14
0, 1, 2, 4, 8, 6, 3, 10, 14, 11, 5, 9, 15, 26, 12, 17, 13, 7, 18, 16, 20, 21, 19, 23, 27, 40, 22, 31, 24, 25, 29, 28, 30, 32, 33, 39, 34, 36, 35, 38, 41, 46, 37, 43, 48, 42, 55, 47, 44, 45, 52, 49, 50, 53, 56, 58, 54, 57, 51, 73, 76, 61, 59, 63, 64, 68, 60, 69, 67, 62, 65, 66, 70, 71, 72, 79, 77, 74, 81, 86, 78, 89, 82, 85, 80, 99, 84, 83, 75, 92, 87, 88, 90, 91, 93, 94, 100 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
That is, there are exactly three primes among the 10 pairwise sums of any five consecutive terms.
It is unknown whether this is a permutation of the nonnegative numbers. There is hope that this could be the case, and it seems coherent to choose offset 0 not only in view of this. The restriction to positive indices would then be a permutation of the positive integers, but not the smallest one with the given property.
Concerning the existence of the sequence: If the sequence is to be computed in a greedy manner, this means that for given n, we assume given P(n) := {a(n-1), a(n-2), a(n-3), a(n-4)} and thus S(n) := #{ primes x + y with x, y in P(n), x < y} which may equal 0, 1, 2 or 3. We have to find a(n) such that we have exactly 3 - S(n) primes in a(n) + P(n). It is easy to prove that this is always possible when 3 - S(n) = 0 or 1, and for S(n) = 0 or 1, this is similar to the case of A329452 or A329453. However, the sequence does not need to be computable in a greedy manner. That is, if for given P(n) no a(n) would exist such that a(n) + P(n) contains 3 - S(n) primes, this simply means that the considered value of a(n-1) was incorrect, and the next larger choice has to be made. Given this freedom, well-definedness of this sequence up to infinity is far more probable than, for example, the k-tuple conjecture.
Computational results are as follows:
a(10^5) = 99954 and all numbers below 99915 have appeared at that point.
a(10^6) = 1000053 and all numbers below 999845 have appeared at that point.
LINKS
Eric Angelini, Prime sums from neighbouring terms, personal blog "Cinquante signes" (and post to the SeqFan list), Nov. 11, 2019.
EXAMPLE
We start with a(0) = 0, a(1) = 1, a(2) = 2, the smallest possibilities which do not lead to a contradiction.
Now there are already 2 primes, 0 + 2 and 1 + 2, among the pairwise sums, so the next term must generate exactly one further prime. It appears that a(3) = 4 is the smallest possible choice.
Then there are 3 primes among the pairwise sums using {0, 1, 2, 4}, and the next term must not produce an additional prime as sum with these. The terms 0 and 1 exclude primes and (primes - 1). We find that a(4) = 8 is the smallest possibility.
Then there are 2 primes (1+2 and 1+4) among the pairwise sums using {1, 2, 4, 8}, and the next term must produce exactly one additional prime as sum with these terms. We find that a(5) = 6 is the smallest possibility (since 5+2 and 5+8 would give 2 primes).
PROG
(PARI) A329455(n, show=0, o=0, N=3, M=4, p=[], U, u=o)={for(n=o, n-1, show>0&& print1(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<M && sum(i=1, #p, isprime(p[i]+u))<=c, o=u)|| for(k=u, oo, bittest(U, k-u) || sum(i=1, #p, isprime(p[i]+k))!=c || [o=k, break])); show&&print([u]); o} \\ Optional args: show=1: print a(o..n-1), show=-1: print only [least unused number] at the end; o=1: start with a(1)=1; N, M: get N primes using M+1 consecutive terms.
CROSSREFS
Cf. A329454 (3 primes among a(n+i)+a(n+j), 0 <= i < j <= 3).
Cf. A329452 (2 primes among a(n+i)+a(n+j), 0 <= i < j <= 3), A329453 (2 primes among a(n+i)+a(n+j), 0 <= i < j <= 4).
Cf. A329333 (1 odd prime among a(n+i)+a(n+j), 0 <= i < j <= 2), A329450 (0 primes among a(n+i)+a(n+j), 0 <= i < j <= 2).
Cf. A329405 ff: variants defined for positive integers.
Sequence in context: A046260 A254065 A354727 * A292808 A300813 A086354
KEYWORD
nonn
AUTHOR
M. F. Hasler, based on an idea from Eric Angelini, Nov 15 2019
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 March 28 22:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)