A061509 Write n in decimal, omit 0's, replace the k-th digit d[k] with the k-th prime, raised to d[k]-th power and multiply.
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 2, 6, 18, 54, 162, 486, 1458, 4374, 13122, 39366, 4, 12, 36, 108, 324, 972, 2916, 8748, 26244, 78732, 8, 24, 72, 216, 648, 1944, 5832, 17496, 52488, 157464, 16, 48, 144, 432, 1296, 3888, 11664, 34992, 104976, 314928
Offset: 0
Examples
a(4) = 2^4 = 16, a(123) = (2^1)*(3^2)*(5^3) = 2250. For n = 0, the list of nonzero digits is empty, and the empty product equals 1.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000 (a(0) = 1 inserted by _M. F. Hasler_, Oct 12 2018)
Programs
-
Haskell
a061509 n = product $ zipWith (^) a000040_list (map digitToInt $ filter (/= '0') $ show n) -- Reinhard Zumkeller, May 03 2011
-
Mathematica
A061509[n_] := If[n == 0, 1, Times @@ (Prime[Range[Length[#]]]^#) & [DeleteCases[IntegerDigits[n], 0]]]; Array[A061509, 100, 0] (* Paolo Xausa, Nov 26 2024 *)
-
PARI
A061509(n)=prod(k=1,#n=select(t->t,digits(n)),prime(k)^n[k]) \\ M. F. Hasler, Aug 16 2014
Formula
a(n) = a(n*10^k). a((10^k-1)/9) = primorial(k) = A002110(k).
a(n) = A189398(n) for n <= 100; a(101)=2^1*3^1 = 6 <> A189398(101) = 2^1*3^0*5^1 = 10; a(A052382(n)) = A189398(A052382(n)); a(n) = A000079(A000030(n)) if n has only one nonzero digit; A001221(a(n)) = A055640(n); A001222(a(n)) = A007953(n). - Reinhard Zumkeller, May 03 2011
If n=d[1]d[2]...d[m] in decimal (0M. F. Hasler, Aug 16 2014
Extensions
Corrected and extended by Matthew Conroy, May 13 2001
Offset corrected by Reinhard Zumkeller, May 03 2011
Definition corrected by M. F. Hasler, Aug 16 2014
Extended to a(0) = 1 by M. F. Hasler, Oct 12 2018
Comments