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.

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

This page as a plain text file.
%I A270817 #19 Nov 28 2024 10:49:27
%S A270817 1,3,4,9,11,69,117,449,675,1119,1959,2687,2859,8001,8175,24269,110247
%N A270817 Integers k such that (2^k - 1) + (3^k - 1) + (5^k - 1) is prime.
%C A270817 Inspired by A268067.
%C A270817 Corresponding primes are 7, 157, 719, 1973317, 49007317, ...
%e A270817 4 is a term because (2^4 - 1) + (3^4 - 1) + (5^4 - 1) = 719 is a prime number.
%t A270817 Select[Range@ 3000, PrimeQ[(2^# - 1) + (3^# - 1) + (5^# - 1)] &] (* _Michael De Vlieger_, Mar 23 2016 *)
%o A270817 (PARI) lista(nn) = for(n=1, nn, if(ispseudoprime(-3 + 2^n + 3^n + 5^n), print1(n, ", ")));
%o A270817 (Python)
%o A270817 from sympy import isprime
%o A270817 def afind(limit, startk=1):
%o A270817     pow2, pow3, pow5 = 2**startk, 3**startk, 5**startk
%o A270817     for k in range(startk, limit+1):
%o A270817         if isprime(pow2 + pow3 + pow5 - 3): print(k, end=", ")
%o A270817         pow2 *= 2; pow3 *= 3; pow5 *= 5
%o A270817 afind(1200) # _Michael S. Branicky_, Sep 08 2021
%Y A270817 Cf. A268064, A268067.
%K A270817 nonn,more
%O A270817 1,2
%A A270817 _Altug Alkan_, Mar 23 2016
%E A270817 a(14)-a(15) from _Michael S. Branicky_, Sep 08 2021
%E A270817 a(16) from _Michael S. Branicky_, Apr 13 2023
%E A270817 a(17) from _Michael S. Branicky_, Nov 27 2024