login
Numbers k such that A052410(k) = A010888(k).
0

%I #57 Mar 04 2024 08:06:35

%S 0,1,2,3,5,6,7,128,2401,8192,78125,524288,823543,33554432,282475249,

%T 1220703125,2147483648,96889010407,137438953472,8796093022208,

%U 19073486328125,33232930569601,562949953421312,11398895185373143,36028797018963968,298023223876953125,2305843009213693952

%N Numbers k such that A052410(k) = A010888(k).

%C From _Chai Wah Wu_, Mar 02 2024: (Start)

%C 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 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 (End)

%t 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 (Python)

%o from itertools import count, islice

%o from math import gcd

%o from sympy import factorint, integer_nthroot

%o def A370688_gen(startvalue=0): # generator of terms >= startvalue

%o if startvalue <=0: yield 0

%o if startvalue <=1: yield 1

%o for k in count(max(startvalue,2)):

%o r = 1 + (k - 1) % 9

%o if r>1:

%o kmin, kmax = 0, 1

%o while r**kmax <= k:

%o kmax <<= 1

%o while True:

%o kmid = kmax+kmin>>1

%o if r**kmid > k:

%o kmax = kmid

%o else:

%o kmin = kmid

%o if kmax-kmin <= 1:

%o break

%o if r**kmin==k:

%o m = integer_nthroot(k,gcd(*factorint(k).values()))[0]

%o if m == r:

%o yield k

%o A370688_list = list(islice(A370688_gen(),10)) # _Chai Wah Wu_, Mar 02 2024

%o (Python)

%o # faster program based on theorem

%o from itertools import islice

%o def A370688_gen(): # generator of terms

%o kmax, mlist, dlist = 10, [7,7,4], [6,6,3]

%o yield from (0,1,2,3,5,6,7)

%o while True:

%o klist = []

%o for i, p in enumerate((2,5,7)):

%o while (k:=p**mlist[i]) <= kmax:

%o klist.append(k)

%o mlist[i] += dlist[i]

%o yield from sorted(klist)

%o kmax *= 10

%o A370688_list = list(islice(A370688_gen(),10)) # _Chai Wah Wu_, Mar 02 2024

%Y Cf. A010888, A052409, A052410.

%K nonn,base

%O 1,3

%A _Stefano Spezia_, Feb 27 2024

%E a(18)-a(27) from _Chai Wah Wu_, Mar 02 2024