A137502 Reverse sequence of powers in prime decomposition of n.
1, 2, 2, 4, 2, 6, 2, 8, 4, 10, 2, 18, 2, 14, 6, 16, 2, 12, 2, 50, 10, 22, 2, 54, 4, 26, 8, 98, 2, 30, 2, 32, 14, 34, 6, 36, 2, 38, 22, 250, 2, 70, 2, 242, 18, 46, 2, 162, 4, 20, 26, 338, 2, 24, 10, 686, 34, 58, 2, 150, 2, 62, 50, 64, 14, 154, 2, 578, 38, 42, 2, 108, 2, 74, 12, 722, 6, 286
Offset: 1
Examples
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.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
-
Scheme
(define (A137502 n) (if (< n 2) n (/ (* 2 (A241916 n)) (A006530 n)))) ;; Antti Karttunen, May 20 2014
Formula
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
Comments