OFFSET
2,2
REFERENCES
Paulo Ribenboim, "The Little Book of Bigger Primes", Springer-Verlag, 2004, p. 232.
LINKS
Amiram Eldar, Table of n, a(n) for n = 2..10000
FORMULA
Fermat quotients mod p = A007663: (1, 3, 9, 93, 315, ...) mod p; where the Fermat quotients for base 2 = (2^(p-1) - 1). Applies to the odd primes.
EXAMPLE
a(4) = 2 = 9 mod 7 where A007663(4) = 9.
The Fermat prime(base 2) for 7 = 9 = (2^6 - 1)/7. Then 9 mod 7 = 2.
MAPLE
a := 2 : for n from 2 to 120 do p := ithprime(n) ; fq := (a^(p-1)-1)/p ; printf("%d, ", fq mod p) ; od: # R. J. Mathar, Oct 28 2008
MATHEMATICA
Mod[(2^(#-1)-1)/#, #]&/@Prime[Range[2, 70]] (* Harvey P. Dale, Mar 31 2013 *)
PROG
(PARI) forprime(p=3, 1e3, my(t=(2^(p-1)-1)/p); print1(t%p, ", ")); \\ Felix Fröhlich, Jul 26 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Jun 08 2007
EXTENSIONS
More terms from R. J. Mathar, Oct 28 2008
STATUS
approved