OFFSET
1,1
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
Maxie D. Schmidt, New Congruences and Finite Difference Equations for Generalized Factorial Functions, arXiv:1701.04741 [math.CO], 2017.
Eric Weisstein's World of Mathematics, Sexy Primes. [The definition in this webpage is unsatisfactory, because it defines a "sexy prime" as a pair of primes.- N. J. A. Sloane, Mar 07 2021].
FORMULA
MAPLE
A023201 := proc(n)
option remember;
if n = 1 then
5;
else
for a from procname(n-1)+2 by 2 do
if isprime(a) and isprime(a+6) then
return a;
end if;
end do:
end if;
end proc: # R. J. Mathar, May 28 2013
MATHEMATICA
Select[Range[10^2], PrimeQ[ # ]&&PrimeQ[ #+6] &] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
Select[Prime[Range[120]], PrimeQ[#+6]&] (* Harvey P. Dale, Mar 20 2018 *)
PROG
(Magma) [n: n in [0..40000] | IsPrime(n) and IsPrime(n+6)] // Vincenzo Librandi, Aug 04 2010
(Haskell)
a023201 n = a023201_list !! (n-1)
a023201_list = filter ((== 1) . a010051 . (+ 6)) a000040_list
-- Reinhard Zumkeller, Feb 25 2013
(PARI) is(n)=isprime(n+6)&&isprime(n) \\ Charles R Greathouse IV, Mar 20 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved