[go: up one dir, main page]

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!)
A329579 For every n >= 0, exactly nine sums are prime among a(n+i) + a(n+j), 0 <= i < j < 7; lexicographically earliest such sequence of distinct nonnegative numbers. 4
0, 1, 2, 3, 4, 5, 20, 9, 10, 8, 33, 11, 6, 50, 21, 17, 56, 12, 47, 14, 26, 7, 125, 15, 24, 83, 54, 66, 13, 35, 22, 18, 19, 48, 23, 31, 28, 30, 25, 16, 36, 42, 121, 29, 43, 37, 46, 70, 72, 60, 27, 79, 67, 40, 34, 39, 32, 69, 38, 41, 44, 45, 51, 58, 62, 86, 52, 53, 105, 171, 65, 74, 146, 68, 63, 123, 76 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
That is, there are 9 primes, counted with multiplicity, among the 21 pairwise sums of any 7 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 maybe not the lexicographically earliest one with this property.
LINKS
PROG
(PARI) A329579(n, show=0, o=0, N=9, M=6, 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<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: append them on global list L, in both cases print [least unused number] at the end; o=1: start at a(1)=1; N, M: find N primes using M+1 terms
CROSSREFS
Cf. A329577 (7 primes using 7 consecutive terms), A329566 (6 primes using 6 consecutive terms), A329449 (4 primes using 4 consecutive terms).
Cf. A329425 (6 primes using 5 consecutive terms), A329455 (4 primes using 5 consecutive terms), A329455 (3 primes using 5 consecutive terms), A329453 (2 primes using 5 consecutive terms), A329452 (2 primes using 4 consecutive terms).
Cf. A329454 (3 primes using 4 consecutive terms), A329411 (2 primes using 3 consecutive terms), A329333 (1 odd prime using 3 terms), A329450 (0 primes using 3 terms).
Cf. A329405 ff: other variants defined for positive integers.
Sequence in context: A333993 A362064 A342617 * A024635 A217679 A248901
KEYWORD
nonn
AUTHOR
M. F. Hasler, Nov 17 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 August 30 07:09 EDT 2024. Contains 375532 sequences. (Running on oeis4.)