OFFSET
2,1
FORMULA
a(n) >= A081761(n). - Rémy Sigrist, Feb 16 2023
EXAMPLE
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
PROG
(Python)
from sympy import factorint
to_s_exp = lambda n: tuple(i[1] for i in sorted(factorint(n).items()))
terms = []
for i in range(2, 100):
k = i+1; t = to_s_exp(i)
while t != to_s_exp(k):k+=1
terms.append(k)
print(terms)
(PARI) f4(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = prime(i)); factorback(f); \\ A071364
a(n) = my(k=n+1, f=f4(n)); while (f4(k) != f, k++); k; \\ Michel Marcus, Oct 26 2022
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Gleb Ivanov, Oct 26 2022
STATUS
approved