OFFSET
1,2
COMMENTS
Because "Fermi-Dirac factorization" is fundamentally different from ordinary prime factorization (as no exponents larger than 1 are allowed) this pair of permutations mapping between them is not always very intuitive. For example, we have ("as expected") A302776(n) = A302023(A052126(A302024(n))), while on the other hand, we have A302792(n) = A300841(A302023(A032742(A302024(n)))), where an additional shift-operator A300841 is needed for "correction".
LINKS
FORMULA
PROG
(PARI)
up_to = 32768;
v050376 = vector(up_to);
A050376(n) = v050376[n];
ispow2(n) = (n && !bitand(n, n-1));
i = 0; for(n=1, oo, if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to, break));
A052331(n) = { my(s=0, e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 15 2018
STATUS
approved