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.

A358656 Least prime p such that p^n + 2 is the product of n distinct primes.

Original entry on oeis.org

3, 2, 7, 71, 241, 83, 157, 6947, 4231, 35509, 15541, 199499, 649147
Offset: 1

Views

Author

J.W.L. (Jan) Eerland, Nov 27 2022

Keywords

Comments

Corresponding values of p^n + 2 are 5, 6, 345, 25411683, 812990017203, 326940373371, 2351243277537495, ...

Examples

			a(1) = 3; 3^1 + 2 = 5.
a(2) = 2; 2^2 + 2 = 2 * 3.
a(3) = 7; 7^3 + 2 = 3 * 5 * 23.
a(4) = 71; 71^4 + 2 = 3 * 11 * 19 * 40529.
		

Crossrefs

Programs

  • Mathematica
    Table[b=2;y[a_]:=FactorInteger[Prime[a]^n+b];k=1;Monitor[Parallelize[While[True,If[And[Length[y[k]]==n,Count[Flatten[y[k]],1]==n],Break[]];k++];k],k]//Prime,{n,1,10}]
  • PARI
    a(n) = forprime(p=2, , my(f=factor(p^n + 2)); if (issquarefree(f) && (omega(f) == n), return(p))); \\ Michel Marcus, Nov 29 2022

Extensions

a(13) from Daniel Suteu, Dec 09 2022