A124123 Primes not of the form nextprime(f(p)) with p prime, where f(p)=p/2 if p=2 (mod 3), f(p)=2p otherwise (cf. A138750).
5, 19, 61, 73, 83, 103, 107, 109, 113, 139, 151, 167, 173, 191, 199, 229, 269, 271, 277, 313, 337, 349, 359, 379, 397, 439, 463, 503, 523, 563, 571, 601, 607, 619, 733, 773, 823, 827, 829, 859, 883, 887, 911, 971, 983, 997, 1013, 1031, 1063, 1091, 1093, 1103
Offset: 1
Examples
Example: a(1) = 5 because there is no prime gb(n) such that gb(n+1) = 5.
References
- Communication paper by Georges Brougnard.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..6470
- Georges Brougnard, Definition of GB-sequences.
- Georges Brougnard, GB-sequence of length 96, obtained for gb[0]=1381.
- Georges Brougnard, GB-sequence of length 63337, obtained for gb[0]=4499221.
Programs
-
Mathematica
lim = PrimePi[1000]; f[p_ /; Mod[p, 3] == 2] := p/2; f[p_] := 2*p; Complement[Prime[Range[lim]], Table[ NextPrime[ f[Prime[k]]], {k, 1, 2*lim}]] (* Jean-François Alcover, Sep 20 2011 *)
-
PARI
{forprime( p=3,10^3, for( i=precprime(p-1)+1,p, (2*i)%3==0 & isprime(2*i-1) & next(2); i%2==0 & ( i/2 )%3!=2 & isprime( i/2 ) & next(2)); print1( p", " ))} nextA124123(p)={ while( p=nextprime(p+1), for( i=precprime(p-1)+1,p, (2*i)%3==0 & isprime(2*i-1) & next(2); i%2==0 & ( i/2 )%3!=2 & isprime( i/2 ) & next(2)); return( p )) } t=2;vector(200,i,t=nextA124123(t)) \\ 60% of the first 200 terms are in 1+3Z: t=[0,0];vector(#%,i,t[%[i]%3]++);t \\ yields [120, 80] t=10^11;vector(200,i,t=nextA124123(t)) \\ exactly 50% of these terms are in 1+3Z: t=[0,0];vector(#%,i,t[%[i]%3]++);t \\ yields [100, 100] t=10^30;vector(200,i,t=nextA124123(t+1));t-10^30 \\ yields 31773 = distance of 200th term beyond 10^30 t=10^30;vector(200,i,t=nextprime(t+1));(t-1e30)/% \\ yields 0.52..., approx. local density in the primes. (End)
Formula
Recurrence for a gb-sequence starting with gb(0) = a prime > 2 (the seed):
| If gb(n) = 2 (mod 3) then gb(n+1) := least prime > gb(n)/2;
| otherwise gb(n+1) := least prime > gb(n)*2.
A gb-sequence of length L ends in the loop 7, 17, 11, 7, ... ; gb(L-1) = 7.
Extensions
Edited by M. F. Hasler, Mar 27 2008, Nov 18 2018
Comments