login
A255609
a(1)=2; a(n) = the smallest prime p such that a(n)-a(n-1) is semiprime (A001358).
9
2, 11, 17, 23, 29, 43, 47, 53, 59, 73, 79, 83, 89, 103, 107, 113, 127, 131, 137, 151, 157, 163, 167, 173, 179, 193, 197, 211, 233, 239, 277, 281, 307, 311, 317, 331, 337, 347, 353, 359, 373, 379, 383, 389, 463, 467, 541, 547, 557, 563, 569, 607
OFFSET
1,1
COMMENTS
Sequence with any initial prime term a(1) eventually merges with this sequence: 3,7,11; 5,11; 13,17; 19,23; 31,37,41,47.
For n > 1, a(n) = A289750(n+1). - Jon E. Schoenfield, Nov 26 2017
LINKS
EXAMPLE
a(2) - a(1) = 11 - 2 = 9 = 3*3;
a(3) - a(2) = 17 - 11 = 6 = 2*3;
a(81) - a(80) = 1009 - 887 = 122 = 2*61.
MAPLE
A:= Vector(100): A[1]:= 2:
for n from 2 to 100 do
p:= A[n-1];
do
p:= nextprime(p);
until numtheory:-bigomega(p-A[n-1]) = 2;
A[n]:= p;
od:
convert(A, list); # Robert Israel, Dec 28 2022
MATHEMATICA
s = {2}; p = 2; Do[q = NextPrime[p]; While[2 != PrimeOmega[q - p], q = NextPrime[q]]; AppendTo[s, q]; p = q, {100}]; s
sp[n_]:=Module[{p=NextPrime[n]}, While[PrimeOmega[p-n]!=2, p= NextPrime[ p]]; p]; NestList[sp, 2, 60] (* Harvey P. Dale, Oct 10 2015 *)
PROG
(PARI) v=[2]; forprime(p=3, 300, if(bigomega(p-v[#v])==2, v=concat(v, p))); v \\ Derek Orr, Feb 28 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Feb 28 2015
STATUS
approved