[go: up one dir, main page]

login
A195336
Smallest number k such that k^n is the sum of numbers in a twin prime pair.
2
8, 6, 2, 150, 96, 324, 6, 1518, 174, 168, 21384, 18, 20754, 2988, 2424, 8196, 3786, 14952, 34056, 48, 1620, 8256, 31344, 1176, 123360, 147456, 28650, 132, 90, 12834, 81126, 11790, 2340, 9702, 11496, 33000, 10716, 66954, 6816, 234, 109956, 3012, 6744, 117654, 19950, 26550, 8226, 40584, 23640, 30660
OFFSET
1,1
COMMENTS
Schinzel's hypothesis H implies that a(n) exists for every n. [Charles R Greathouse IV, Sep 18 2011]
FORMULA
a(n) is the least k such that (1/2)*k^n - 1 and (1/2)*k^n + 1 are prime.
MAPLE
isA054735 := proc(n)
if type(n, 'odd') then
false;
else
isprime(n/2-1) and isprime(n/2+1) ;
end if;
end proc:
A195336 := proc(n)
for k from 1 do
if isA054735(k^n) then
return k;
end if;
end do:
end proc:
for n from 1 do print(A195336(n)) ; end do: # R. J. Mathar, Sep 20 2011
PROG
(PARI) a(n)=my(k=2); while(!ispseudoprime(k^n/2-1)||!ispseudoprime(k^n/2+1), k+=2); k \\ Charles R Greathouse IV, Sep 18 2011
(Python)
from sympy import isprime
def cond(k, n): m = (k**n)//2; return isprime(m-1) and isprime(m+1)
def a(n):
k = 2
while not cond(k, n): k += 2
return k
print([a(n) for n in range(1, 25)]) # Michael S. Branicky, Aug 06 2021
CROSSREFS
Cf. A054735.
Sequence in context: A316588 A323810 A342946 * A196773 A197824 A085666
KEYWORD
nonn
AUTHOR
Kausthub Gudipati, Sep 16 2011
EXTENSIONS
a(11)-a(50) from Charles R Greathouse IV, Sep 18 2011
STATUS
approved