OFFSET
1,2
COMMENTS
The term a(1) = 1 added on the grounds that as 1 has an empty prime factorization, it stays same when reversed. - Antti Karttunen, May 20 2014
In the prime decomposition of n we use all the primes up to the highest prime divisor, exponents of zero being allowed except for the largest prime.
If n = (p(1)^e1)*(p(2)^e2)*.......*(p(k)^ek) (ek>0, other ei>=0 and p(n) = n-th prime) then we reverse the sequence e1, e2 , ..., ek to build a(n): a(n) = (p(1)^ek)*(p(2)^e(k-1))* . . . . *(p(k)^e1)
As p(1)=2 and ek is never zero for n>1, a(n) is always even for n>1.
If n is prime then a(n) = 2 and if n is a power of prime, a(n) is the same power of 2.
If the sequence e1, e2, ..., ek is palindromic, a(n)=n. (A242418 gives such n).
For any given even number Q, we can by reversing the sequence of its powers define not only one but an infinity (by adding as many zeros as we want on the left end) of n such that a(n) = Q. Hence the sequence is a permutation of even integers where each even integer is infinitely repeated.
For example as Q = 1224 = (2^3)*(3^2)*(5^0)*(7^0)*(11^0)*(13^0)*(17^1),
Q = a((2^1)*(3^0)*(5^0)*(7^0)*(11^0)*(13^2)*(17^3)) = a(1660594) but also of an infinity of other ones, the first one being a((2^0)*(3^1)*(5^0)*(7^0)*(11^0)*(13^0)*(17^2)*(19^1)) = a(5946753).
Please see A241916 for a variant which results an ordinary permutation of all natural numbers. - Antti Karttunen, May 20 2014
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
As 9 = (2^0)*(3^2), hence a(9) = (2^2)*(3^0) = 4.
As 50 = (2^1)*(3^0)*(5^2), hence a(50) = (2^2)*(3^0)*(5^1) = 2*2*5 = 20.
As 57 = (2^0)*(3^1)*(5^0)*(7^0)*(11^0)*(13^0)*(17^0)*(19^1), hence a(57) = (2^1)*(3^0)*(5^0)*(7^0)*(11^0)*(13^0)*(17^1)*(19^0) = 2*17 = 34.
MATHEMATICA
f[n_] := If[n == 1, {0}, Function[f, ReplacePart[Table[0, {PrimePi[f[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, f]]@ FactorInteger@ n]; g[w_List] := Times @@ Flatten@ MapIndexed[Prime[#2]^#1 &, w]; Table[g@ Reverse@ f@ n, {n, 120}] (* Michael De Vlieger, Aug 27 2016 *)
PROG
(Scheme) (define (A137502 n) (if (< n 2) n (/ (* 2 (A241916 n)) (A006530 n)))) ;; Antti Karttunen, May 20 2014
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Philippe Lallouet (philip.lallouet(AT)orange.fr), Apr 22 2008
EXTENSIONS
Edited by N. J. A. Sloane, Jan 16 2009.
Term a(1)=1 prepended, and erroneous terms (first at n=50) corrected, Antti Karttunen, May 20 2014
STATUS
approved