login
A219043
Numbers k such that 3^k - 22 is prime.
16
3, 4, 9, 13, 28, 45, 46, 184, 285, 688, 697, 1257, 1785, 2368, 3721, 7444, 51613
OFFSET
1,1
COMMENTS
a(18) > 2*10^5. - Robert Price, Oct 18 2013
EXAMPLE
3^3 - 22 = 5 (prime), so 3 is in the sequence.
MATHEMATICA
Do[If[PrimeQ[3^n - 22], Print[n]], {n, 10000}]
PROG
(PARI) is(n)=isprime(3^n-22) \\ Charles R Greathouse IV, Feb 17 2017
(Python)
from sympy import isprime
def ok(n): return isprime(3**n - 22)
print([m for m in range(700) if ok(m)]) # Michael S. Branicky, Mar 04 2021
CROSSREFS
Cf. Sequences of numbers k such that 3^k + m is prime:
(m = 2) A051783, (m = -2) A014224, (m = 4) A058958, (m = -4) A058959,
(m = 8) A217136, (m = -8) A217135, (m = 10) A217137, (m = -10) A217347,
(m = 14) A219035, (m = -14) A219038, (m = 16) A205647, (m = -16) A219039,
(m = 20) A219040, (m = -20) A219041, (m = 22) A219042, (m = -22) A219043,
(m = 26) A219044, (m = -26) A219045, (m = 28) A219046, (m = -28) A219047,
(m = 32) A219048, (m = -32) A219049, (m = 34) A219050, (m = -34) A219051. Note that if m is a multiple of 3, 3^k + m is also a multiple of 3 (for k greater than 0), and as such isn't prime.
Sequence in context: A357238 A056514 A151517 * A342570 A050163 A207016
KEYWORD
nonn,more
AUTHOR
Nicolas M. Perrault, Nov 10 2012
EXTENSIONS
a(17) from Robert Price, Oct 18 2013
STATUS
approved