OFFSET
1,1
COMMENTS
a(1)=4, a(n)=2*a(n-1)+k, where k is least positive integer chosen so that a(n) is the product of two primes. Corresponding k's are 1, 3, 4, 1, 1, 3, 1, 3, 1, 5, 9, 3, 15, 1, 9, 3, 1, 3, 17, 11, 1, 13, 1, 15, 1, 1, 5, 7, 7, 11, 5, 5, 15, 1, 3, 9, 9, 5, 7, 8, ... - Zak Seidov, Dec 24 2007
EXAMPLE
a(1)=4, then
k=1, a(2)=2*4+1=9,
k=3, a(3)=2*9+3=21,
k=4, a(4)=2*21+4=46,
k=1, a(5)=2*46+1=93,
k=1, a(6)=2*93+1=187.
MATHEMATICA
a=4; Do[Do[b=2a+n; If[2==Plus@@FactorInteger[b][[All, 2]], Print[{b, n}]; Break[]], {n, 1000}]; a=b, {40}] - Zak Seidov, Dec 24 2007
ssp[n_]:=Module[{k=2n+1}, While[PrimeOmega[k]!=2, k++]; k]; NestList[ssp, 4, 30] (* Harvey P. Dale, Apr 14 2022 *)
CROSSREFS
KEYWORD
easy,nonn,less
AUTHOR
Jonathan Vos Post, May 04 2006
EXTENSIONS
Edited by N. J. A. Sloane, Jul 01 2008 at the suggestion of R. J. Mathar
STATUS
approved