This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A227324 #31 Oct 03 2024 13:42:03 %S A227324 1,9,4,3,49,36,25,81,2,441,169,12,121,225,196,27,361,18,289,147,100, %T A227324 1521,841,324,7,1089,16,75,529,1764,1369,729,676,3249,1225,6,961,2601, %U A227324 484,3969,1849,900,1681,507,98,7569,2809,108,5,63,1444,363,2209,144 %N A227324 Result of changing both the prime indices and the exponents in the prime factorization of n: increment odd values, decrement even values. %C A227324 A self-inverse permutation on the positive integers: a(a(n)) = n. %H A227324 Alois P. Heinz, <a href="/A227324/b227324.txt">Table of n, a(n) for n = 1..10000</a> %F A227324 Sum_{k=1..n} a(k) ~ c * n^3, where c = (1/3) * Product_{p prime} ((p-1)*(p^6 + q(p) +(p^3-1)*q(p)^2))/(p^7 - p*q(p)^2) = 0.3120270364..., where q(p) = nextprime(p) = A151800(p) if p has an odd index, and q(p) = prevprime(p) = A151799(p) otherwise. - _Amiram Eldar_, Sep 17 2023 %e A227324 n = 2^3 => a(n) = 3^4 = 81. %e A227324 n = 3^2 => a(n) = 2^1 = 2. %p A227324 a:= n-> mul(ithprime(i[1])^i[2], i=map(x->map(y->y-1+2*irem(y, 2), %p A227324 [numtheory[pi](x[1]), x[2]]), ifactors(n)[2])): %p A227324 seq(a(n), n=1..100); # _Alois P. Heinz_, Jul 17 2013 %t A227324 a[n_] := If[n == 1, 1, Product[{p, e} = pe; Prime[BitXor[PrimePi[p] - 1, 1] + 1]^(BitXor[e - 1, 1] + 1), {pe, FactorInteger[n]}]]; %t A227324 Array[a, 100] (* _Jean-François Alcover_, May 31 2019, after _Andrew Howroyd_ *) %o A227324 (PARI) a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i,1], e=f[i,2]); prime( bitxor( primepi(p)-1, 1)+1)^(bitxor(e-1, 1)+1))} \\ _Andrew Howroyd_, Jul 23 2018 %o A227324 (Python) %o A227324 primes = [2]*2 %o A227324 primes[1] = 3 %o A227324 def addPrime(k): %o A227324 for p in primes: %o A227324 if k%p==0: return %o A227324 if p*p > k: break %o A227324 primes.append(k) %o A227324 for n in range(5, 1000000, 6): %o A227324 addPrime(n) %o A227324 addPrime(n+2) %o A227324 for n in range(1,99): %o A227324 p = 1 %o A227324 j = n %o A227324 i = 0 %o A227324 while j>1: %o A227324 e = 0 %o A227324 while j % primes[i] == 0: %o A227324 j /= primes[i] %o A227324 e+=1 %o A227324 if e: %o A227324 e = ((e-1)^1) + 1 %o A227324 p*= primes[i^1]**e %o A227324 i += 1 %o A227324 print(str(p), end=', ') %Y A227324 Cf. A003958-A003965, A011262, A011264, A045965-A045973, A151799, A151800. %K A227324 nonn,easy,mult %O A227324 1,2 %A A227324 _Alex Ratushnyak_, Jul 07 2013 %E A227324 Keyword:mult added by _Andrew Howroyd_, Jul 23 2018