login
a(n) is such that A145521(n) = A053810(a(n)).
2

%I #38 Aug 11 2024 23:22:31

%S 1,3,2,6,5,4,10,23,12,7,39,9,97,24,164,484,2759,5044,109,32334,114605,

%T 216960,8,14,252,785135,5503557,28,39222428,75703838,548300521,1496,

%U 2063337476,4008153424,29523940595,3858,112174606866,834662735468,11,12216544412251

%N a(n) is such that A145521(n) = A053810(a(n)).

%C This sequence is a permutation of the positive integers. It is its own inverse permutation.

%H Chai Wah Wu, <a href="/A145522/b145522.txt">Table of n, a(n) for n = 1..55</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>.

%F a(n) = Sum_{primes p, 2^p <= A145521(n)} A000720(floor(A145521(n)^(1/p))).

%F Also, if A145521(n) = 2^k then a(n) = A060967(k) + Sum_{primes p, 3 <= p <= k} A000720(floor(2^(k/p))). - _Jason Yuen_, Jan 31 2024

%e 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.

%o (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

%o (Python)

%o from itertools import count

%o from sympy import integer_nthroot, isprime, primepi

%o def A145522(n):

%o total = 0

%o for p in count(2):

%o if 2**p > A145521(n): break

%o if isprime(p): total += primepi(integer_nthroot(A145521(n), p)[0])

%o return total # _Jason Yuen_, Jan 31 2024

%o (Python)

%o from math import prod

%o from sympy import primepi, integer_nthroot, primerange, factorint

%o def A145522(n):

%o def f(x): return int(n+x-sum(primepi(integer_nthroot(x, p)[0]) for p in primerange(x.bit_length())))

%o m, k = n, f(n)

%o while m != k:

%o m, k = k, f(k)

%o a = prod(e**p for p,e in factorint(m).items())

%o return sum(primepi(integer_nthroot(a, p)[0]) for p in primerange(a.bit_length())) # _Chai Wah Wu_, Aug 10 2024

%Y Cf. A053810, A145521, A000720, A060967.

%K nonn,more

%O 1,2

%A _Leroy Quet_, Oct 12 2008

%E a(11)-a(28) from _Ray Chandler_, Nov 01 2008

%E a(29)-a(32) from _Jinyuan Wang_, Feb 25 2020

%E a(33)-a(39) from _Jason Yuen_, Jan 31 2024

%E a(40) from _Chai Wah Wu_, Aug 10 2024