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

 


Indices of the Fermat primes in the sequence of primes.
8

%I #31 Aug 07 2022 13:52:11

%S 2,3,7,55,6543

%N Indices of the Fermat primes in the sequence of primes.

%C A098006(a(n)) = 0. - _Reinhard Zumkeller_, Mar 26 2013

%H <a href="/index/Pri">Index entries for sequences that are related to primes dividing Fermat numbers</a>

%F a(n) = A000720(A019434(n)). - _Michel Marcus_, Apr 29 2021

%e 3, the 1st Fermat prime is the 2nd prime, so a(1) = 2.

%e 17, the 3rd Fermat prime is the 7th prime, so a(3) = 7.

%t PrimePi/@{3,5,17,257,65537} (* _Harvey P. Dale_, Aug 07 2022 *)

%o (Haskell)

%o import Data.List (elemIndices)

%o a159611 n = a159611_list !! (n-1)

%o a159611_list = map (+ 2) $ elemIndices 0 a098006_list

%o -- _Reinhard Zumkeller_, Mar 26 2013

%o (PARI) for(i=0, 10, isprime(f=2^2^i+1) & print1(primepi(f), ", ")) \\ _Michel Marcus_, Apr 28 2016

%o (PARI) a152155(n) = centerlift(Mod(3, 2^(2^n)+1)^(2^(2^n-1)))

%o print1(2, ", "); for(x=0, oo, if(a152155(x)==-1, print1(primepi(2^(2^x)+1), ", "))) \\ _Felix Fröhlich_, Apr 30 2021

%Y Cf. A000040 (primes), A000720, A019434 (Fermat primes).

%Y Cf. A098006.

%K nonn,more

%O 1,1

%A _Walter Nissen_, Apr 16 2009

%E Name edited by _Felix Fröhlich_, Apr 30 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 23 02:59 EDT 2024. Contains 376140 sequences. (Running on oeis4.)