OFFSET
1,2
COMMENTS
Shift primes in the prime factorization of n one step towards larger primes (A003961), then reverse the binary representation of the resulting odd number (with A030101), which yields another (or same) odd number, then shift primes in the prime factorization of that second odd number one step back towards smaller primes (A064989).
LINKS
FORMULA
MATHEMATICA
f[n_] := Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose @FactorInteger@ n; g[n_] := FromDigits[Reverse@ IntegerDigits[n, 2], 2] 2^IntegerExponent[n, 2]; h[p_?PrimeQ] := h[p] = Prime[PrimePi@ p + 1]; h[1] = 1; h[n_] := h[n] = Times @@ (h[First@ #]^Last@ # &) /@ FactorInteger@ n; Table[f@ g@ h@ n, {n, 83}] (* A266402, after Jean-François Alcover at A003961 and Ivan Neretin at A057889 *)
PROG
(PARI)
A030101(n) = if(n<1, 0, subst(Polrev(binary(n)), x, 2));
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
for(n=1, 8191, write("b266402.txt", n, " ", A266402(n)));
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jan 02 2016
STATUS
approved