login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A328623
Inverse permutation to A328622.
8
0, 1, 4, 5, 2, 3, 18, 19, 22, 23, 20, 21, 6, 7, 10, 11, 8, 9, 24, 25, 28, 29, 26, 27, 12, 13, 16, 17, 14, 15, 120, 121, 124, 125, 122, 123, 138, 139, 142, 143, 140, 141, 126, 127, 130, 131, 128, 129, 144, 145, 148, 149, 146, 147, 132, 133, 136, 137, 134, 135, 30, 31, 34, 35, 32, 33, 48, 49, 52, 53, 50, 51, 36, 37, 40, 41, 38, 39, 54, 55, 58, 59, 56, 57, 42
OFFSET
0,3
FORMULA
a(n) = A276085(A328619(A276086(n))).
PROG
(PARI)
A002110(n) = prod(i=1, n, prime(i));
A276085(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*A002110(primepi(f[k, 1])-1)); };
A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
A328619(n) = { my(f = factor(n), m, q); for(k=1, #f~, q = (f[k, 2]\f[k, 1]); m = (f[k, 2]%f[k, 1]); if(m&&(f[k, 1]!=2), f[k, 2] = q*f[k, 1] + lift(Mod(m, f[k, 1])/2))); factorback(f); };
CROSSREFS
Cf. A328622 (inverse), and also A289234.
Sequence in context: A335615 A328622 A338248 * A225901 A354469 A030322
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Oct 23 2019
STATUS
approved