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.
%I A370688 #57 Mar 04 2024 08:06:35 %S A370688 0,1,2,3,5,6,7,128,2401,8192,78125,524288,823543,33554432,282475249, %T A370688 1220703125,2147483648,96889010407,137438953472,8796093022208, %U A370688 19073486328125,33232930569601,562949953421312,11398895185373143,36028797018963968,298023223876953125,2305843009213693952 %N A370688 Numbers k such that A052410(k) = A010888(k). %C A370688 From _Chai Wah Wu_, Mar 02 2024: (Start) %C A370688 Theorem: k is a term if and only if k is 0, 1, 3, 6 or of the form 2^(6*m+1), 5^(6*m+1), or 7^(3*m+1), m >= 0. %C A370688 Proof: 0, 1, 3, 6 can be shown to be terms by direct computation. Since 1 <= A010888(k) <= 9 for k > 0, all terms > 0 are of the form q^m, where 2 <= q <= 9. This implies that all terms > 1 are either 6^m or of the form p^m, where p is a prime <= 7. If k = 6^m for m > 1, then k is divisible by 9 and A010888(k) = 9, whereas A052410(k) = 6 and thus k is not a term. Similarly, if k = 3^m for m > 1, then k is divisible by 9 and A010888(k) = 9 whereas A052410(k) = 3 and thus k is not a term. Lastly, for p = 2, 5 or 7, A010888(p^m) = 1 + ((p^m-1) mod 9), and since p^m and 9 are coprime, this implies that A010888(p^m) = p^m mod 9 whereas A052410(p^m) = p, thus m must satisfy p^m mod 9 = p mod 9. Since 6, 6, 3 are the multiplicative orders of 2, 5, 7 modulo 9 respectively, implying 2^6 == 5^6 == 7^3 == 1 (mod 9), the result follows. %C A370688 (End) %t A370688 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 %o A370688 (Python) %o A370688 from itertools import count, islice %o A370688 from math import gcd %o A370688 from sympy import factorint, integer_nthroot %o A370688 def A370688_gen(startvalue=0): # generator of terms >= startvalue %o A370688 if startvalue <=0: yield 0 %o A370688 if startvalue <=1: yield 1 %o A370688 for k in count(max(startvalue,2)): %o A370688 r = 1 + (k - 1) % 9 %o A370688 if r>1: %o A370688 kmin, kmax = 0, 1 %o A370688 while r**kmax <= k: %o A370688 kmax <<= 1 %o A370688 while True: %o A370688 kmid = kmax+kmin>>1 %o A370688 if r**kmid > k: %o A370688 kmax = kmid %o A370688 else: %o A370688 kmin = kmid %o A370688 if kmax-kmin <= 1: %o A370688 break %o A370688 if r**kmin==k: %o A370688 m = integer_nthroot(k,gcd(*factorint(k).values()))[0] %o A370688 if m == r: %o A370688 yield k %o A370688 A370688_list = list(islice(A370688_gen(),10)) # _Chai Wah Wu_, Mar 02 2024 %o A370688 (Python) %o A370688 # faster program based on theorem %o A370688 from itertools import islice %o A370688 def A370688_gen(): # generator of terms %o A370688 kmax, mlist, dlist = 10, [7,7,4], [6,6,3] %o A370688 yield from (0,1,2,3,5,6,7) %o A370688 while True: %o A370688 klist = [] %o A370688 for i, p in enumerate((2,5,7)): %o A370688 while (k:=p**mlist[i]) <= kmax: %o A370688 klist.append(k) %o A370688 mlist[i] += dlist[i] %o A370688 yield from sorted(klist) %o A370688 kmax *= 10 %o A370688 A370688_list = list(islice(A370688_gen(),10)) # _Chai Wah Wu_, Mar 02 2024 %Y A370688 Cf. A010888, A052409, A052410. %K A370688 nonn,base %O A370688 1,3 %A A370688 _Stefano Spezia_, Feb 27 2024 %E A370688 a(18)-a(27) from _Chai Wah Wu_, Mar 02 2024