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.

Showing 1-2 of 2 results.

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]

A345707 Primes prime(k) at which A345706(k) attains a record value.

Original entry on oeis.org

2, 5, 11, 13, 19, 41, 47, 67, 89, 149, 211, 331, 433, 677, 859, 1301
Offset: 1

Views

Author

Amiram Eldar, Jun 24 2021

Keywords

Comments

The corresponding records values are 1, 2, 3, 6, 12, 20, 24, 58, 322, 414, 483, 527, 1065, 2597, 3181, 6022, ...

Examples

			The first 6 terms of A345706 are 1, 1, 2, 2, 3 and 6. The record values, 1, 2, 3 and 6, occur at k = 1, 3, 5 and 6. The corresponding primes are prime(k) = 2, 5, 11 and 13, the first 4 terms of this sequence.
		

Crossrefs

Programs

  • Mathematica
    f[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]; fm = 0; s = {}; Do[f1 = f[k]; If[f1 > fm, fm = f1; AppendTo[s, Prime[ k]]], {k, 1, 50}]; s
Showing 1-2 of 2 results.