OFFSET
0,1
MATHEMATICA
Do[ k = 1; While[ ! PrimeQ[ k*12^n + 1 ] || ! PrimeQ[ k*12^n - 1 ], k++ ]; Print[ k ], {n, 0, 50} ]
lktpQ[n_]:=Module[{c=12^n, k=1}, While[!AllTrue[k*c+{1, -1}, PrimeQ], k++]; k]; Array[lktpQ, 60, 0] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 21 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Sep 21 2001
EXTENSIONS
Offset corrected by Georg Fischer, May 01 2022
STATUS
approved