A370688 Numbers k such that A052410(k) = A010888(k).
0, 1, 2, 3, 5, 6, 7, 128, 2401, 8192, 78125, 524288, 823543, 33554432, 282475249, 1220703125, 2147483648, 96889010407, 137438953472, 8796093022208, 19073486328125, 33232930569601, 562949953421312, 11398895185373143, 36028797018963968, 298023223876953125, 2305843009213693952
Offset: 1
Programs
-
Mathematica
A052409[n_]:=GCD@@Last/@FactorInteger[n]; A010888[n_]:=If[n==0, 0, n-9 Floor[(n-1)/9]]; a={}; kmax = 10^9; For[k=0, k<=kmax, k++, If[k^(1/A052409[k])==A010888[k], AppendTo[a,k]]]; a
-
Python
from itertools import count, islice from math import gcd from sympy import factorint, integer_nthroot def A370688_gen(startvalue=0): # generator of terms >= startvalue if startvalue <=0: yield 0 if startvalue <=1: yield 1 for k in count(max(startvalue,2)): r = 1 + (k - 1) % 9 if r>1: kmin, kmax = 0, 1 while r**kmax <= k: kmax <<= 1 while True: kmid = kmax+kmin>>1 if r**kmid > k: kmax = kmid else: kmin = kmid if kmax-kmin <= 1: break if r**kmin==k: m = integer_nthroot(k,gcd(*factorint(k).values()))[0] if m == r: yield k A370688_list = list(islice(A370688_gen(),10)) # Chai Wah Wu, Mar 02 2024
-
Python
# faster program based on theorem from itertools import islice def A370688_gen(): # generator of terms kmax, mlist, dlist = 10, [7,7,4], [6,6,3] yield from (0,1,2,3,5,6,7) while True: klist = [] for i, p in enumerate((2,5,7)): while (k:=p**mlist[i]) <= kmax: klist.append(k) mlist[i] += dlist[i] yield from sorted(klist) kmax *= 10 A370688_list = list(islice(A370688_gen(),10)) # Chai Wah Wu, Mar 02 2024
Extensions
a(18)-a(27) from Chai Wah Wu, Mar 02 2024
Comments