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!)
A282578 Least k such that k^n is the sum of two distinct proper prime powers (A246547), or 0 if no such k exists. 0
12, 5, 5, 3, 62 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Corresponding values of k^n are 12, 25, 125, 81, 916132832, ...
LINKS
FORMULA
a(p) <= 2 * (2^p - 1) where p is in A000043 since (2^p - 1)^p + (2^p - 1)^(p + 1) = (2 * (2^p - 1))^p.
EXAMPLE
a(1) = 12 because 12 = 2^2 + 2^3.
a(2) = 5 because 5^2 = 2^4 + 3^2.
a(3) = 5 because 5^3 = 2^2 + 11^2.
a(4) = 3 because 3^4 = 2^5 + 7^2.
a(5) = 62 because 62^5 = 31^5 + 31^6.
a(9) = 2 because 2^9 = 7^3 + 13^2.
PROG
(Python)
from sympy import nextprime, perfect_power
def ppupto(limit): # distinct proper prime powers <= limit
p = 2; p2 = pk = p*p; pklist = []
while p2 <= limit:
while pk <= limit: pklist.append(pk); pk *= p
p = nextprime(p); p2 = pk = p*p
return sorted(pklist)
def sum_of_pp(n):
pp = ppupto(n); ppset = set(pp)
for p in pp:
if p > n//2: break
if n - p in ppset and n - p != p: return True
return False
def a(n):
k = 2
while not sum_of_pp(k**n): k += 1
return k
print([a(n) for n in range(1, 6)]) # Michael S. Branicky, Dec 05 2021
CROSSREFS
Sequence in context: A157782 A335949 A002679 * A205141 A122561 A110185
KEYWORD
nonn,more
AUTHOR
Altug Alkan, Feb 20 2017
STATUS
approved

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 March 18 22:56 EDT 2024. Contains 370952 sequences. (Running on oeis4.)