

A235027


Reverse the bits of prime divisors of n (with 2 > 2), and multiply together: a(0)=0, a(1)=1, a(2)=2, a(p) = revbits(p) for odd primes p, a(u*v) = a(u) * a(v) for composites.


12



0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 12, 11, 14, 15, 16, 17, 18, 25, 20, 21, 26, 29, 24, 25, 22, 27, 28, 23, 30, 31, 32, 39, 34, 35, 36, 41, 50, 33, 40, 37, 42, 53, 52, 45, 58, 61, 48, 49, 50, 51, 44, 43, 54, 65, 56, 75, 46, 55, 60, 47, 62, 63, 64, 55, 78, 97
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

This is not a permutation of integers: a(25) = 25 = 5*5 = a(19) is the first case which breaks the injectivity. However, the first 24 terms are equal with A057889, which is a GF(2)[X]analog of this sequence and which in contrary to this, is bijective. This stems from the fact that the set of irreducible GF(2)[X] polynomials (A014580) is closed under bitreversal (A056539), while primes (A000040) are not.
Sequence A290078 gives the positions n where the ratio a(n)/n obtains new record values.
Note, instead of A056539 we could as well use A057889 to reverse the bits of n, and also A030101 when restricted to odd primes.


LINKS

Antti Karttunen, Table of n, a(n) for n = 0..10000
Index entries for sequences related to binary expansion of n
Index to divisibility sequences


FORMULA

Completely multiplicative with a(0)=0, a(1)=1, a(p) = A056539(p) for primes p (which maps 2 to 2, and reverses the binary representation of odd primes), and a(u*v) = a(u) * a(v) for composites.
Equally, after a(0)=0, a(p * q * ... * r) = A056539(p) * A056539(q) * ... * A056539(r), for primes p, q, etc., not necessarily distinct.
a(0)=0, a(1)=1, a(n) = A056539(A020639(n)) * a(n/A020639(n)).


EXAMPLE

a(33) = a(3*11) = a(3) * a(11) = 3 * 13 = 39 (because 3, in binary '11', stays same when reversed, while 11 (eleven), in binary '1011', changes to '1101' = 13).


PROG

(Scheme, with Antti Karttunen's IntSeqlibrary)
(define (A235027 n) (if (< n 2) n (reduce * 1 (map A056539 (ifactor n)))))
(definec (A235027 n) (cond ((< n 2) n) (else (* (A056539 (A020639 n)) (A235027 (/ n (A020639 n)))))))
(PARI) revbits(n) = fromdigits(Vecrev(binary(n)), 2);
a(n) = {my(f = factor(n)); for (k=1, #f~, if (f[k, 1] != 2, f[k, 1] = revbits(f[k, 1]); ); ); factorback(f); } \\ Michel Marcus, Aug 05 2017


CROSSREFS

A235028 gives the fixed points. A235030 numbers such that n <> a(a(n)), or equally A001222(a(n)) > A001222(n). A235145 the number of iterations needed to reach a fixed point or cycle of 2, A235146 its records.
Cf. also A010051, A030101, A056539, A057889, A074832, A098957, A091214, A204219, A290078.
Sequence in context: A108548 A322464 A057889 * A325402 A110029 A302027
Adjacent sequences: A235024 A235025 A235026 * A235028 A235029 A235030


KEYWORD

nonn,base,mult


AUTHOR

Antti Karttunen, Jan 02 2014


STATUS

approved



