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.

This page as a plain text file.
%I A111223 #40 Sep 27 2023 15:26:45
%S A111223 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 A111223 97,109,111,115,117,121,123,129,135,145,151,157,159,165,171,175,177,
%U A111223 181,187,189,193,195,199,217,219,223,237,243,247,255,259,261,265,273,285
%N A111223 Numbers n such that 5*n + 2 is prime.
%D A111223 T. Koshy, Fibonacci and Lucas Numbers with Applications, John Wiley, New York, 2001, p. 410 (Theorem 34.8).
%H A111223 Vincenzo Librandi, <a href="/A111223/b111223.txt">Table of n, a(n) for n = 1..1000</a>
%F A111223 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 A111223 97 is in the sequence because 5*97 + 2 = 487 is prime.
%t A111223 Select[Range[0, 1000], PrimeQ[5 # + 2] &] (* _Vincenzo Librandi_, May 20 2014 *)
%t A111223 Table[If[PrimeQ[5p+2], Mod[5^(-1) Fibonacci[5p], 5p+2],  Unevaluated[Sequence[]]], {p, 0, 250}] (* _Rigoberto Florez_, Mar 02 2020 *)
%t A111223 Select[(#-2)/5&/@Prime[Range[250]],IntegerQ] (* _Harvey P. Dale_, Sep 27 2023 *)
%o A111223 (Magma) [n: n in [0..350] | IsPrime(5*n+2)]; // _Vincenzo Librandi_, Nov 13 2010
%o A111223 (PARI) is(n)=isprime(5*n+2) \\ _Charles R Greathouse IV_, Feb 17 2017
%Y A111223 Cf. A024894.
%K A111223 nonn,easy
%O A111223 1,3
%A A111223 _Parthasarathy Nambi_, Oct 26 2005