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.

A345706 a(n) is the least exponent k > 0 of the n-th prime such that (Product_{j=1..n-1} prime(j)) * prime(n)^k + 1 is a Euclid-Pocklington prime (A053341).

Original entry on oeis.org

1, 1, 2, 2, 3, 6, 5, 12, 9, 8, 10, 9, 20, 14, 24, 18, 12, 16, 58, 26, 20, 30, 42, 322, 276, 27, 25, 48, 27, 208, 38, 77, 48, 55, 414, 94, 67, 107, 53, 33, 56, 38, 34, 52, 60, 60, 483, 41, 155, 105, 43, 476, 68, 126, 51, 387, 49, 121, 46, 65, 395, 68, 78, 308
Offset: 1

Views

Author

Amiram Eldar, Jun 24 2021

Keywords

Comments

The corresponding primes are 3, 7, 151, 1471, 279511, 11149928791, 42638305711, 1129919399332465852111, ...

Examples

			a(1) = 1 since prime(1) = 2, 2^1 > 1 and 2 + 1 = 3 is a prime.
a(2) = 1 since prime(2) = 3, 3^1 > 2 and 2*3 + 1 = 7 is a prime.
a(3) = 2 since prime(3) = 5, 5^2 > 2*3 and 2*3*5^2 + 1 = 151 is a prime.
		

Crossrefs

Cf. A053341.

Programs

  • Mathematica
    a[n_] := Module[{r = Product[Prime[j], {j, 1, n - 1}], p = Prime[n], k}, k = Max[1, Ceiling @ Log[p, r]]; While[!PrimeQ[r*p^k + 1], k++]; k]; Array[a, 64]