login
A061766
a(1) = 4; a(n) = smallest composite number of the form k*a(n-1) + 1.
4
4, 9, 10, 21, 22, 45, 46, 93, 94, 95, 96, 289, 290, 291, 292, 585, 586, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 2370, 4741, 4742, 4743, 4744, 4745, 4746, 4747, 4748, 4749, 4750, 9501, 9502, 9503
OFFSET
1,1
LINKS
EXAMPLE
After 96 the next term is 289 = 3*96+ 1 as 97 and 193 are both primes.
MATHEMATICA
scp[n_]:=Module[{k=1}, While[!CompositeQ[k n+1], k++]; k n+1]; NestList[scp, 4, 50] (* Harvey P. Dale, Jan 17 2025 *)
CROSSREFS
Sequence in context: A107621 A098144 A109412 * A109448 A177927 A062398
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, May 22 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), May 29 2001
STATUS
approved