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.

A363274 a(n) is the smallest prime such that a(1)*a(2)*...*a(n) +/- 1 is prime.

This page as a plain text file.
%I A363274 #32 Jul 11 2023 08:56:55
%S A363274 2,2,2,2,2,3,2,2,2,11,3,3,2,2,5,2,2,3,3,5,2,2,5,2,2,7,3,3,2,2,23,47,2,
%T A363274 2,2,29,2,53,13,5,17,29,5,3,3,3,5,17,2,3,3,79,31,11,7,23,2,7,3,7,2,13,
%U A363274 5,7,5,7,23,17,23,13,31,29,7,67,47,7,2,23,13,23,23,31,73,13,23,3,17
%N A363274 a(n) is the smallest prime such that a(1)*a(2)*...*a(n) +/- 1 is prime.
%t A363274 a[1] = 2; a[n_] := a[n] = Module[{r = Product[a[k], {k, 1, n - 1}], p = 2}, While[! PrimeQ[r*p - 1] && ! PrimeQ[r*p + 1], p = NextPrime[p]]; p]; Array[a, 100] (* _Amiram Eldar_, Jul 08 2023 *)
%Y A363274 Cf. A036014, A236465.
%K A363274 nonn
%O A363274 1,1
%A A363274 _Dmitry Kamenetsky_, Jul 08 2023