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
Robert Israel, Table of n, a(n) for n = 1..10000
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