login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A111223
Numbers n such that 5*n + 2 is prime.
6
0, 1, 3, 7, 9, 13, 19, 21, 25, 27, 31, 33, 39, 45, 51, 55, 61, 63, 67, 69, 73, 79, 91, 93, 97, 109, 111, 115, 117, 121, 123, 129, 135, 145, 151, 157, 159, 165, 171, 175, 177, 181, 187, 189, 193, 195, 199, 217, 219, 223, 237, 243, 247, 255, 259, 261, 265, 273, 285
OFFSET
1,3
REFERENCES
T. Koshy, Fibonacci and Lucas Numbers with Applications, John Wiley, New York, 2001, p. 410 (Theorem 34.8).
LINKS
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
Cf. A024894.
Sequence in context: A032375 A089556 A225495 * A266836 A066207 A141544
KEYWORD
nonn,easy
AUTHOR
Parthasarathy Nambi, Oct 26 2005
STATUS
approved