login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A111232
Least k such that k^prime(n) - k^((prime(n)+1)/2) + 1 is prime for n > 1.
0
2, 5, 2, 3, 5, 5, 9, 26, 9, 16, 11, 5, 6, 2, 46, 18, 16, 89, 10, 2, 2, 94, 7, 7, 16, 26, 230, 5, 2, 140, 34, 69, 114, 6, 2, 179, 994, 2, 76, 165, 8, 69, 3, 294, 230, 96, 7, 720, 684, 2029, 2, 2, 25, 135, 523, 271, 161, 1210, 139, 14, 34, 194, 238, 87, 355, 636, 40, 1114, 519, 2
OFFSET
2,1
EXAMPLE
2^3 - 2^2 + 1 = 5, which is prime, so a(2) = 2.
2^5 - 2^3 + 1 = 25 = 5*5, and
3^5 - 3^3 + 1 = 217 = 7*31, but
5^5 - 5^3 + 1 = 3001, which is prime, so a(3) = 5.
MATHEMATICA
seq={}; Do[k=1; Until[PrimeQ[k^Prime[n]-k^((Prime[n]+1)/2)+1], k++]; AppendTo[seq, k], {n, 2, 71}]; seq (* James C. McMahon, May 06 2024 *)
PROG
(PARI) a(n) = {my(k=1, p=prime(n)); while (!isprime(k^p-k^((p+1)/2)+1), k++); k; } \\ Michel Marcus, Sep 16 2019
CROSSREFS
Sequence in context: A192885 A246904 A199611 * A087892 A078372 A154751
KEYWORD
nonn
AUTHOR
Pierre CAMI, Oct 28 2005
EXTENSIONS
a(33) and a(34) concatenated by Georg Fischer, Jun 22 2022
STATUS
approved