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!)
A329415 Lexicographically earliest sequence of distinct positive numbers such that among the pairwise sums of any seven consecutive terms there are exactly two prime sums. 2
1, 2, 3, 7, 13, 19, 23, 5, 20, 9, 15, 25, 29, 10, 35, 21, 27, 11, 17, 28, 14, 37, 38, 4, 8, 6, 12, 18, 31, 24, 26, 32, 16, 22, 34, 33, 30, 40, 36, 42, 44, 45, 52, 46, 48, 50, 54, 39, 41, 69, 67, 43, 47, 56, 49, 51, 55, 59, 61, 53, 60, 62, 58, 65, 57, 63, 64, 71, 70, 77, 83, 72, 73, 76, 82, 88, 68, 66, 74 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Condition a(1) = 1 follows from minimality. Conjectured to be a permutation of the positive integers: a(10^6) = 999994 and all numbers up to there have appeared at that point. - M. F. Hasler, Nov 15 2019
LINKS
EXAMPLE
a(1) = 1 by minimality.
a(2) = 2 as 2 is the smallest available integer not leading to a contradiction. Note that as 1 + 2 = 3 we already have one prime sum (on the required two) with the septet {1,2,a(3),a(4),a(5),a(6),a(7)}.
a(3) = 3 as 3 is the smallest available integer not leading to a contradiction. Note that as 2 + 3 = 5 we now have the two prime sums required with the septet {1,2,3,a(4),a(5),a(6),a(7)}.
a(4) = 7 as a(4) = 4, 5 or 6 would lead to a contradiction: indeed, the septets {1,2,3,4,a(5),a(6),a(7)}, {1,2,3,5,a(5),a(6),a(7)} and {1,2,3,6,a(5),a(6),a(7)} will produce more than the two required prime sums. With a(4) = 7 we have no contradiction as the septet {1,2,3,7,a(5),a(6),a(7)} has two prime sums so far: 1 + 2 = 3 and 2 + 3 = 5.
a(5) = 13 as a(5) = 4, 5, 6, 8, 9, 10, 11 or 12 would again lead to a contradiction (more than 2 prime sums with the septet); in combination with any other term before it, a(5) = 13 will produce only composite sums.
a(6) = 19 as 19 is the smallest available integer not leading to a contradiction: indeed, the septet {1,2,3,7,13,19,a(7)} shows two prime sums so far: 1 + 2 = 3 and 2 + 3 = 5.
a(7) = 23 as 23 is the smallest available integer not leading to a contradiction; indeed, the septet {1,2,3,7,13,19,23} shows now exactly two prime sums, which are 1 + 2 = 3 and 2 + 3 = 5.
a(8) = 5 as 5 is the smallest available integer not leading to a contradiction and producing exactly two prime sums with the septet {2,3,7,13,19,23,5}, which are 2 + 3 = 5 and 2 + 5 = 7.
And so on.
PROG
(PARI) A329415(n, show=0, o=1, N=2, M=6, p=[], U, u=o)={for(n=o, n-1, show&&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])); print([u]); o} \\ Optional args: show=1: print terms a(o..n-1); o=0: start with a(0)=0; N, M: produce N primes using M+1 consecutive terms. - M. F. Hasler, Nov 15 2019
CROSSREFS
Cf. A329333 (3 consecutive terms, exactly 1 prime sum). See also A329450, A329452 onwards.
Sequence in context: A068947 A068948 A329414 * A329416 A155479 A019411
KEYWORD
nonn
AUTHOR
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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)