A093324 a(n) is the smallest natural number m such that n^m + m is prime.
2, 1, 1, 2, 1, 7954, 1, 34, 101, 2, 1, 1181716, 1, 54, 17, 2, 1, 1080, 1, 57910, 9, 2, 1, 202, 2075, 5538, 3
Offset: 0
Examples
a(3)=2 because 3^2 + 2 is prime and 3^1 + 1 is composite.
Links
- Henri Lifchitz & Renaud Lifchitz, 11^1181716+1181716, a(11).
- Henri Lifchitz & Renaud Lifchitz, 19^57910+57910, a(19).
Programs
-
Magma
function A093324(n) t:=0; while not IsPrime(n^t + t) do t+:=1; end while; return t; end function; [A093324(n): n in [0..10]]; // G. C. Greubel, Aug 10 2023
-
Mathematica
a[n_]:= (For[m=1, !PrimeQ[n^m+m], m++]; m); Do[Print[a[n]], {n,0,10}]
-
Python
from sympy import isprime def a(n): m = 0 while not isprime(n**m + m): m += 1 return m for n in range(11): print(a(n), end=", ") # Michael S. Branicky, Feb 01 2021
Extensions
a(11)-a(26) from Kellen Shenton, Aug 14 2023
Comments