login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A164121
a(1)=1. a(n) = the smallest odd integer > a(n-1) such that a(n)*2 - a(n-1) is prime.
2
1, 3, 5, 9, 11, 15, 17, 23, 27, 29, 33, 35, 39, 41, 47, 53, 57, 59, 63, 65, 69, 71, 75, 77, 83, 93, 95, 99, 101, 105, 107, 117, 127, 129, 133, 135, 137, 143, 147, 149, 153, 155, 159, 161, 167, 173, 177, 179, 185, 189, 191, 195, 197, 213, 221, 225, 227, 233, 237, 239
OFFSET
1,2
LINKS
MAPLE
R:= 1; x:= 1: count:= 1:
for y from x+2 by 2 do
if isprime(2*y-x) then
R:= R, y; x:= y; count:= count+1;
if count = 100 then break fi;
fi
od:
R; # Robert Israel, Mar 22 2023
MATHEMATICA
soi[a_]:=Module[{k=a+2}, While[!PrimeQ[2k-a], k=k+2]; k]; NestList[soi, 1, 60] (* Harvey P. Dale, Sep 02 2023 *)
CROSSREFS
Cf. A164122.
Sequence in context: A040976 A268174 A166104 * A333171 A078651 A268732
KEYWORD
nonn
AUTHOR
Leroy Quet, Aug 10 2009
EXTENSIONS
More terms from R. J. Mathar, Oct 24 2009
STATUS
approved