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!)
A371694 a(1) = 2; a(n+1) is the larger prime between nextprime(a(n)) and prevprime(a(n)+n-m+1), where m is the number of primes < a(n) that are missing from the sequence. 0

%I #4 Apr 04 2024 10:32:38

%S 2,3,5,7,11,13,19,23,29,37,43,47,53,61,71,79,89,97,107,113,127,137,

%T 139,151,163,173,181,193,199,211,223,233,241,251,263,277,283,293,307,

%U 317,331,337,353,367,379,389,401,409,421,433,449,463,467,479,491,503

%N a(1) = 2; a(n+1) is the larger prime between nextprime(a(n)) and prevprime(a(n)+n-m+1), where m is the number of primes < a(n) that are missing from the sequence.

%C The first missing prime in the sequence is 17. First occurrence of a(n)+n-m < nextprime(a(n)) is at n = 20 (see Examples). It seems that 1/2 < n/(n+m) <= 1 and lim_{n->oo} n/(n+m) = 1/2 (or half of the primes are in this sequence).

%e primes 2 3 5 7 11 13 17 19 23 29 31 37 41 43 .. 97 101 103 107 109 113 127

%e n 1 2 3 4 5 6 7 8 9 10 11 .. 18 19 20 21

%e a(n) 2 3 5 7 11 13 19 23 29 37 43 .. 97 107 113 127

%e m 0 0 0 0 0 0 1 1 1 2 3 .. 7 9 10 10

%e a(n)+n-m 3 5 8 11 16 19 25 30 37 45 51 .. 108 117 123 138

%e a(n+1) 3 5 7 11 13 19 23 29 37 43 47 .. 107 113 127 137

%o (Python)

%o from sympy import primerange, prevprime, nextprime; p = 2; b = 0

%o for n in range(1, 57): print(p, end = ", "); q = max(nextprime(p), prevprime(p + n - b + 1)); m = len(list(primerange(p+1, q))); p = q; b += m

%Y Cf. A362527.

%K nonn

%O 1,1

%A _Ya-Ping Lu_, Apr 03 2024

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 September 17 09:48 EDT 2024. Contains 375987 sequences. (Running on oeis4.)