OFFSET
1,2
FORMULA
a(n) = floor(c*2^n), where c = 0.8359335658... - Lorenzo Sauras Altuzarra, Jan 01 2023
MAPLE
a := proc(n)
local c, k:
c, k := 1, 1:
while c < n do
if isprime(k) then k := 2*k: else k := 2*k+1: fi:
c := c+1: od:
k: end: # Lorenzo Sauras Altuzarra, Jan 02 2023
MATHEMATICA
NestList[If[PrimeQ[#], 2#, 2#+1]&, 1, 40] (* Harvey P. Dale, Sep 01 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Nov 17 2006
STATUS
approved