cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A111223 Numbers n such that 5*n + 2 is prime.

Original entry on oeis.org

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

Views

Author

Parthasarathy Nambi, Oct 26 2005

Keywords

Examples

			97 is in the sequence because 5*97 + 2 = 487 is prime.
		

References

  • T. Koshy, Fibonacci and Lucas Numbers with Applications, John Wiley, New York, 2001, p. 410 (Theorem 34.8).

Crossrefs

Cf. A024894.

Programs

  • Magma
    [n: n in [0..350] | IsPrime(5*n+2)]; // Vincenzo Librandi, Nov 13 2010
    
  • 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 *)
  • PARI
    is(n)=isprime(5*n+2) \\ Charles R Greathouse IV, Feb 17 2017

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