login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A111223 Numbers n such that 5*n + 2 is prime. 6

%I #40 Sep 27 2023 15:26:45

%S 0,1,3,7,9,13,19,21,25,27,31,33,39,45,51,55,61,63,67,69,73,79,91,93,

%T 97,109,111,115,117,121,123,129,135,145,151,157,159,165,171,175,177,

%U 181,187,189,193,195,199,217,219,223,237,243,247,255,259,261,265,273,285

%N Numbers n such that 5*n + 2 is prime.

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

%H Vincenzo Librandi, <a href="/A111223/b111223.txt">Table of n, a(n) for n = 1..1000</a>

%F 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

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

%t Select[Range[0, 1000], PrimeQ[5 # + 2] &] (* _Vincenzo Librandi_, May 20 2014 *)

%t Table[If[PrimeQ[5p+2], Mod[5^(-1) Fibonacci[5p], 5p+2], Unevaluated[Sequence[]]], {p, 0, 250}] (* _Rigoberto Florez_, Mar 02 2020 *)

%t Select[(#-2)/5&/@Prime[Range[250]],IntegerQ] (* _Harvey P. Dale_, Sep 27 2023 *)

%o (Magma) [n: n in [0..350] | IsPrime(5*n+2)]; // _Vincenzo Librandi_, Nov 13 2010

%o (PARI) is(n)=isprime(5*n+2) \\ _Charles R Greathouse IV_, Feb 17 2017

%Y Cf. A024894.

%K nonn,easy

%O 1,3

%A _Parthasarathy Nambi_, Oct 26 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 2 19:04 EDT 2024. Contains 372203 sequences. (Running on oeis4.)