OFFSET
1,3
REFERENCES
T. Koshy, Fibonacci and Lucas Numbers with Applications, John Wiley, New York, 2001, p. 410 (Theorem 34.8).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = F(p-2)/5 mod p, where p is the n-th prime number such that p==2 (mod 5) and F(m) is m-th Fibonacci number. - Rigoberto Florez, Mar 02 2020
EXAMPLE
97 is in the sequence because 5*97 + 2 = 487 is prime.
MATHEMATICA
Select[Range[0, 1000], PrimeQ[5 # + 2] &] (* Vincenzo Librandi, May 20 2014 *)
Table[If[PrimeQ[5p+2], Mod[5^(-1) Fibonacci[5p], 5p+2], Unevaluated[Sequence[]]], {p, 0, 250}] (* Rigoberto Florez, Mar 02 2020 *)
Select[(#-2)/5&/@Prime[Range[250]], IntegerQ] (* Harvey P. Dale, Sep 27 2023 *)
PROG
(Magma) [n: n in [0..350] | IsPrime(5*n+2)]; // Vincenzo Librandi, Nov 13 2010
(PARI) is(n)=isprime(5*n+2) \\ Charles R Greathouse IV, Feb 17 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Parthasarathy Nambi, Oct 26 2005
STATUS
approved