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!)
A142247 Primes of the four types: {2^Prime[n] - 1, 2^Prime[n] + 1, 2^Prime[n] - 3, 2^Prime[n] + 3}. 0

%I #2 Mar 30 2012 17:34:27

%S 3,5,7,11,29,31,127,131,8191,131071,524287,536870909,2147483647,

%T 2305843009213693951,147573952589676412931,

%U 618970019642690137449562111,162259276829213363391578010288127

%N Primes of the four types: {2^Prime[n] - 1, 2^Prime[n] + 1, 2^Prime[n] - 3, 2^Prime[n] + 3}.

%F a(n) = If[PrimeQ[{2^Prime[n] - 1, 2^Prime[n] + 1, 2^Prime[n] - 3, 2^Prime[n] + 3}, which of them is prime]

%t f[n_] := If[PrimeQ[2^Prime[n] - 1] || PrimeQ[2^Prime[n] + 1] || PrimeQ[2^Prime[n] - 3] || PrimeQ[2^Prime[n] + 3], {2^Prime[n] - 1, 2^Prime[n] + 1, 2^Prime[n] - 3, 2^Prime[n] + 3}, {}]; a = Flatten[Table[f[n], {n, 1, 100}]]; Union[Flatten[Table[If[PrimeQ[a[[n]]], a[[n]], {}], {n, 1, Length[a]}]]]

%K nonn,uned

%O 1,1

%A _Roger L. Bagula_, Sep 18 2008

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 April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)