A061766 a(1) = 4; a(n) = smallest composite number of the form k*a(n-1) + 1.
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
Examples
After 96 the next term is 289 = 3*96+ 1 as 97 and 193 are both primes.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
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 *)
Extensions
More terms from Larry Reeves (larryr(AT)acm.org), May 29 2001