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!)
A270817 Integers k such that (2^k - 1) + (3^k - 1) + (5^k - 1) is prime. 0

%I #15 Apr 14 2023 13:52:38

%S 1,3,4,9,11,69,117,449,675,1119,1959,2687,2859,8001,8175,24269

%N Integers k such that (2^k - 1) + (3^k - 1) + (5^k - 1) is prime.

%C Inspired by A268067.

%C Corresponding primes are 7, 157, 719, 1973317, 49007317, ...

%e 4 is a term because (2^4 - 1) + (3^4 - 1) + (5^4 - 1) = 719 is a prime number.

%t Select[Range@ 3000, PrimeQ[(2^# - 1) + (3^# - 1) + (5^# - 1)] &] (* _Michael De Vlieger_, Mar 23 2016 *)

%o (PARI) lista(nn) = for(n=1, nn, if(ispseudoprime(-3 + 2^n + 3^n + 5^n), print1(n, ", ")));

%o (Python)

%o from sympy import isprime

%o def afind(limit, startk=1):

%o pow2, pow3, pow5 = 2**startk, 3**startk, 5**startk

%o for k in range(startk, limit+1):

%o if isprime(pow2 + pow3 + pow5 - 3): print(k, end=", ")

%o pow2 *= 2; pow3 *= 3; pow5 *= 5

%o afind(1200) # _Michael S. Branicky_, Sep 08 2021

%Y Cf. A268064, A268067.

%K nonn,more

%O 1,2

%A _Altug Alkan_, Mar 23 2016

%E a(14)-a(15) from _Michael S. Branicky_, Sep 08 2021

%E a(16) from _Michael S. Branicky_, Apr 13 2023

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 17 22:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)