OFFSET
1,3
COMMENTS
Note the indexing.
a(n) (n>=2) can be obtained by the composition of a bijection between {2,3,4,...} and the set of integer partitions and a bijection between the set of integer partitions and {1,2,3,4,...}. Explanation on the example n=18. Write 18 = 3*3*2 = 2'*2'*1', where m' = m-th prime. Consider the partition p = (2,2,1) and let b denote the southeast border of the Ferrers board of p. Form a binary number by replacing each east step of b by 1 and each north step of b, with the exception of the last one, by 0: 1010. Its value is a(18) = 10. - Emeric Deutsch, Sep 08 2016.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 1000 terms from Antti Karttunen)
FORMULA
MAPLE
a:= proc(n) local i, l, r; r, l:= 0, [0, sort(map(i->
numtheory[pi](i[1])$i[2], ifactors(n)[2]))[]];
for i to nops(l)-1 do
r:= 2*((x-> 2*x+1)@@(l[i+1]-l[i]))(r)
od; r/2
end:
seq(a(n), n=1..120); # Alois P. Heinz, Jul 21 2017
MATHEMATICA
Table[Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[ Table[ 2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ #]] &[If[n == 1, 1, Module[{l = #, m = 0}, Times @@ Power @@@ Table[l -= m; l = DeleteCases[l, 0]; {Prime@ Length@ l, m = Min@ l}, Length@ Union@ l]] &@ Catenate[ConstantArray[PrimePi[#1], #2] & @@@ FactorInteger@ n]]], {n, 57}] (* Michael De Vlieger, Sep 08 2016, after JungHwan Min at A122111 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 03 2015
STATUS
approved