A338929 a(n) is the smallest prime number p larger than A072668(n) such that p is equal to 1 (mod A072668(n)).
7, 11, 29, 17, 19, 23, 53, 29, 31, 103, 191, 41, 43, 47, 73, 101, 53, 109, 59, 311, 97, 67, 103, 71, 149, 191, 79, 83, 173, 89, 181, 283, 97, 197, 101, 103, 107, 109, 331, 113, 229, 709, 367, 311, 127, 193, 131, 269, 137, 139, 569, 293, 149, 151, 229, 463
Offset: 1
Keywords
Examples
For n=20, A072668(20)=31, and 311 is the smallest prime number p larger than 31 such that p is equal to 1 (mod 31), so a(20)=311.
Links
- Michel Marcus, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Map[Block[{p = NextPrime[#]}, While[Mod[p, #] != 1, p = NextPrime[p]]; p] &, Select[Range[4, 78], CompositeQ] - 1] (* Michael De Vlieger, Dec 10 2020 *)
-
PARI
f(x) = {my(p=nextprime(x)); while ((p % x) != 1, p = nextprime(p+1)); p;} lista(nn) = {my(list = List()); forcomposite(c=1, nn, listput(list, f(c-1));); Vec(list);} \\ Michel Marcus, Nov 17 2020
Extensions
More terms from Michel Marcus, Nov 17 2020
Comments