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”).

A348258
Records in A083876.
0
341, 1105, 1729, 29341, 162401, 252601, 1152271, 2508013, 3828001, 6733693, 17098369, 17236801, 29111881, 82929001, 172947529, 216821881, 228842209, 366652201, 413138881, 2301745249, 2438403661, 5255104513, 5781222721, 8251854001, 12173703001, 13946829751, 15906120889, 23224518901
OFFSET
1,1
MATHEMATICA
f[1] = 341; f[2] = 1105; f[3] = 1729; f[n_] := f[n] = Block[{k = f[n -1], lp = Prime@ Range[2, n -1], p = Prime@ n}, While[ PrimeQ@ k || PowerMod[2, k -1, k] != 1 || PowerMod[p, k -1, k] != 1 || Union[ PowerMod[lp, k -1, k]] != {1}, k += 2]; k]; Union[ Table[ f@n, {n, 1012}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Oct 08 2021
STATUS
approved