login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Write n in base 4 as n = b_0 + b_1*4 + b_2*4^2 + b_3*4^3 + ...; then a(n) = Product_{i >= 0} prime(i+1)^b_i.
4

%I #18 Sep 01 2024 00:12:47

%S 1,2,4,8,3,6,12,24,9,18,36,72,27,54,108,216,5,10,20,40,15,30,60,120,

%T 45,90,180,360,135,270,540,1080,25,50,100,200,75,150,300,600,225,450,

%U 900,1800,675,1350,2700,5400,125,250,500,1000,375,750,1500,3000,1125

%N Write n in base 4 as n = b_0 + b_1*4 + b_2*4^2 + b_3*4^3 + ...; then a(n) = Product_{i >= 0} prime(i+1)^b_i.

%F a(4^k) = prime(k+1).

%e a(13) = a(1 + 3*4) = 2^1 * 3^3 = 54.

%e a(29) = a(1 + 3*4 + 1*4^2) = 2^1 * 3^3 * 5^1 = 270.

%p a:= n-> (l-> mul(ithprime(i)^l[i], i=1..nops(l)))(convert(n, base, 4)):

%p seq(a(n), n=0..60); # _Alois P. Heinz_, Aug 31 2024

%t f[n_Integer, base_Integer] /; base >= 2 := Product[ Prime[i]^IntegerDigits[n, base][[Length[IntegerDigits[n, base]] + 1 - i]], {i, Length[IntegerDigits[n, base]]}] Table[f[i, 4], {i, 0, 45}]

%o (PARI)

%o f(n, b) = { my(d = digits(n,b), L = #d); prod(i=1, L, prime(i)^d[L+1-i]) }

%o apply(n -> f(n, 4), [0..45]) \\ _Satish Bysany_, Mar 07 2017

%Y Cf. A019565 (base 2), A101278 (base 3), A101943 (base 5), A054842 (base 10).

%K base,nonn,easy

%O 0,2

%A Orges Leka (oleka(AT)students.uni-mainz.de), Dec 21 2004