OFFSET
0,2
COMMENTS
LINKS
Jinyuan Wang, Table of n, a(n) for n = 0..222
PROG
(PARI) a(n) = my(p=3); if(isprime(abs(n-6)), 2, if(n%3, while(!ispseudoprime((3^p-(3-n)^p)/n), p=nextprime(p+1)); p, 0)); \\ Jinyuan Wang, Nov 28 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Feb 12 2007
EXTENSIONS
Name changed by Jinyuan Wang, Nov 28 2020
STATUS
approved