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!)
A329577 For every n >= 0, exactly seven sums are prime among a(n+i) + a(n+j), 0 <= i < j < 7; lexicographically earliest such sequence of distinct nonnegative numbers. 5

%I #10 Nov 28 2019 11:02:51

%S 0,1,2,3,4,6,24,9,5,7,11,10,8,14,12,29,15,17,13,16,30,18,23,19,20,41,

%T 45,22,38,26,25,27,28,75,21,33,34,39,31,40,36,32,35,37,42,47,49,54,48,

%U 52,53,43,44,55,84,46,50,57,51,59,56,60,71,92,68,63,83,66,61,131,62,96,58,65,102,69,77,164

%N For every n >= 0, exactly seven sums are prime among a(n+i) + a(n+j), 0 <= i < j < 7; lexicographically earliest such sequence of distinct nonnegative numbers.

%C That is, there are 7 primes, counted with multiplicity, among the 21 pairwise sums of any 7 consecutive terms.

%C Is this a permutation of the nonnegative integers?

%C 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, 6, 89, 8, 7, 9, 10, 11, 14, 12, 17, 19, 18, 13, ...).

%o (PARI) A329577(n,show=0,o=0,N=7,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

%Y Cf. A329425 (6 primes using 5 consecutive terms), A329566 (6 primes using 6 consecutive terms).

%Y Cf. A329449 (4 primes using 4 consecutive terms), A329455 (4 primes using 5 consecutive terms).

%Y Cf. A329454 (3 primes using 4 consecutive terms), A329455 (3 primes using 5 consecutive terms).

%Y Cf. A329411 (2 primes using 3 consecutive terms), A329452 (2 primes using 4 consecutive terms), A329453 (2 primes using 5 consecutive terms).

%Y Cf. A329333 (1 odd prime using 3 terms), A329450 (0 primes using 3 terms).

%Y Cf. A329405 ff: other variants defined for positive integers.

%K nonn

%O 0,3

%A _M. F. Hasler_, Nov 17 2019

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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)