cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A061766 a(1) = 4; a(n) = smallest composite number of the form k*a(n-1) + 1.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, May 22 2001

Keywords

Examples

			After 96 the next term is 289 = 3*96+ 1 as 97 and 193 are both primes.
		

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