A100596 Numbers k such that (prime(k)-1)! + prime(k)^10 is prime.
2, 8, 15, 33, 52, 205, 751
Offset: 1
Examples
a(1) = 2 because (prime(2)-1)! + prime(2)^10 = (3-1)! + 3^10 = 59051 is the smallest prime of that form. a(2) = 8 because (prime(8)-1)! + prime(8)^10 = (19-1)! + 19^10 = 6408504771985801 is the 2nd smallest prime of that form.
Programs
-
Mathematica
lst={};Do[p=Prime[n];If[PrimeQ[(p-1)!+p^10], AppendTo[lst, n]], {n, 10^2}];lst (* Vladimir Joseph Stephan Orlovsky, Sep 08 2008 *) Select[Range[250],PrimeQ[(Prime[#]-1)!+Prime[#]^10]&] (* The program generates the first 6 terms of the sequence. *) (* Harvey P. Dale, Dec 27 2024 *)
-
Python
from math import factorial from sympy import isprime, prime def afind(limit, startat=1): for k in range(startat, limit+1): s = str(k) pk = prime(k) if isprime( factorial(pk-1) + pk**10 ): print(k, end=", ") afind(100) # Michael S. Branicky, Nov 30 2021
Formula
Primes of the form (prime(k)-1)! + prime(k)^10, where prime(k) is the k-th prime.
Extensions
a(6) from Jinyuan Wang, Apr 10 2020
a(7) from Michael S. Branicky, Nov 30 2021
Comments