OFFSET
1,1
COMMENTS
A value of 0 indicates a Wall-Sun-Sun prime. No such prime is currently known. - Felix Fröhlich, Jun 07 2014
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Wall-Sun-Sun Prime
MATHEMATICA
a[n_]:= ( p=Prime[n]; Mod[Fibonacci[p-JacobiSymbol[p, 5]], Power[p, 2]]); Table[a[n], {n, 1, 50}] (* Javier Rivera Romeu, Mar 03 2022 *)
PROG
(PARI) a(n)=my(p=prime(n)); lift(Mod([1, 1; 1, 0]^(p-kronecker(p, 5)), p^2)[1, 2]) \\ Charles R Greathouse IV, Oct 31 2011
(Sage)
def a(n):
p = Primes().unrank(n-1)
return fibonacci(p-jacobi_symbol(p, 5))%pow(p, 2)
for n in range(1, 100): print(a(n), end=", ") # Javier Rivera Romeu, Mar 04 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Nov 03 2005
STATUS
approved