Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #7 Jan 17 2025 19:22:42
%S 4,9,10,21,22,45,46,93,94,95,96,289,290,291,292,585,586,1173,1174,
%T 1175,1176,1177,1178,1179,1180,2361,2362,2363,2364,2365,2366,2367,
%U 2368,2369,2370,4741,4742,4743,4744,4745,4746,4747,4748,4749,4750,9501,9502,9503
%N a(1) = 4; a(n) = smallest composite number of the form k*a(n-1) + 1.
%H Harvey P. Dale, <a href="/A061766/b061766.txt">Table of n, a(n) for n = 1..1000</a>
%e After 96 the next term is 289 = 3*96+ 1 as 97 and 193 are both primes.
%t scp[n_]:=Module[{k=1},While[!CompositeQ[k n+1],k++];k n+1]; NestList[scp,4,50] (* _Harvey P. Dale_, Jan 17 2025 *)
%K nonn,easy,changed
%O 1,1
%A _Amarnath Murthy_, May 22 2001
%E More terms from Larry Reeves (larryr(AT)acm.org), May 29 2001