OFFSET
1,2
COMMENTS
This sequence is a permutation of the positive integers. It is its own inverse permutation.
LINKS
FORMULA
EXAMPLE
The primes raised to prime exponents form the sequence, when the terms are arranged in numerical order, 4,8,9,25,27,32,49,121,125,128,...(sequence A053810). The 10th term is 128, which is 2^7. So the 10th term of sequence A145521 is 7^2 = 49. 49 is the 7th term of A053810. So a(10) = 7 and a(7) = 10.
PROG
(PARI) lista(nn) = {my(c, m); for(k=1, nn, if(isprime(isprimepower(k, &p)), c=0; m=bigomega(k)^p; forprime(q=2, sqrtint(m), c+=primepi(logint(m, q))); print1(c, ", "))); } \\ Jinyuan Wang, Feb 25 2020
(Python)
from itertools import count
from sympy import integer_nthroot, isprime, primepi
def A145522(n):
total = 0
for p in count(2):
if 2**p > A145521(n): break
if isprime(p): total += primepi(integer_nthroot(A145521(n), p)[0])
return total # Jason Yuen, Jan 31 2024
(Python)
from math import prod
from sympy import primepi, integer_nthroot, primerange, factorint
def A145522(n):
def f(x): return int(n+x-sum(primepi(integer_nthroot(x, p)[0]) for p in primerange(x.bit_length())))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
a = prod(e**p for p, e in factorint(m).items())
return sum(primepi(integer_nthroot(a, p)[0]) for p in primerange(a.bit_length())) # Chai Wah Wu, Aug 10 2024
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Leroy Quet, Oct 12 2008
EXTENSIONS
a(11)-a(28) from Ray Chandler, Nov 01 2008
a(29)-a(32) from Jinyuan Wang, Feb 25 2020
a(33)-a(39) from Jason Yuen, Jan 31 2024
a(40) from Chai Wah Wu, Aug 10 2024
STATUS
approved