%I #99 Feb 17 2023 07:39:53
%S 3,5,9,7,10,11,27,25,14,13,20,17,15,21,81,19,50,23,28,22,26,29,40,49,
%T 33,125,44,31,42,37,243,34,35,38,100,41,39,46,56,43,66,47,45,52,51,53,
%U 80,121,75,55,63,59,250,57,88,58,62,61,84,67,65,68,729,69,70,71,76,74,78,73,200,79,77,98
%N a(n) is the smallest positive integer k such that k > n and A071364(k) = A071364(n).
%F a(A000961(k)) = a(A003961(A000961(k))) for k > 1. - _David A. Corneth_, Oct 26 2022
%F a(n) >= A081761(n). - _Rémy Sigrist_, Feb 16 2023
%e a(12) = 20 as 12 has (2, 1) sequence of exponents in canonical prime factorization via 12 = 2^2 * 3^1 and the smallest positive integer > 12 with the same sequence of exponents in canonical prime factorization being (2, 1) is 20 as 20 = 2^2 * 5^1. - _David A. Corneth_, Oct 26 2022
%o (Python)
%o from sympy import factorint
%o to_s_exp = lambda n: tuple(i[1] for i in sorted(factorint(n).items()))
%o terms = []
%o for i in range(2, 100):
%o k = i+1;t = to_s_exp(i)
%o while t != to_s_exp(k):k+=1
%o terms.append(k)
%o print(terms)
%o (PARI) f4(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = prime(i)); factorback(f); \\ A071364
%o a(n) = my(k=n+1, f=f4(n)); while (f4(k) != f, k++); k; \\ _Michel Marcus_, Oct 26 2022
%o (PARI) first(n) = { my(res = vector(n + 1), todo = n, m = Map(), u = precprime(n)); for(e = 2, logint(n, 2), u = max(u, nextprime(sqrtnint(n, e) + 2)^e) ); forfactored(i = 2, u, cs = i[2][,2]; if(mapisdefined(m, cs), ci = mapget(m, cs); if(ci <= n + 1, res[ci] = i[1]; mapput(m, cs, i[1]); todo--; if(todo <= 0, res = res[^1]; return(res) ) ) , if(i[1] <= n + 1, mapput(m, cs, i[1]) ) ) ) } \\ _David A. Corneth_, Oct 26 2022
%Y Cf. A000961, A003961, A071364, A065642, A081382, A081761.
%K nonn
%O 2,1
%A _Gleb Ivanov_, Oct 26 2022
|