OFFSET
1,3
COMMENTS
Let p(i) = i-th prime. Let n = Product_{i=1..s} p(k_i)^e_i with k_1 < k_2 < ... < k_s. The drawing of n=1 is a blank space. The drawing of n > 1 is arranged around a horizontal bar divided by s-1 scores into s segments. The scores and the bar divide the space above and below the bar into 2's compartments. In the i-th compartment above the bar place the drawing of e_i and in the i-th compartment below the bar place the drawing of k_i - k_{i-1}.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..65536
Sean A. Irvine, Java program (github)
Tyler Pierce, A way of drawing natural numbers
FORMULA
a(1) = 0; a(2) = 1; a(n) = s + Sum_{i=1..s} ( a(e_i) + a(k_i - k_{i-1}) ) with k_0 = 0.
MAPLE
with(numtheory):
a:= proc(n) option remember; `if`(n<3, n-1, (l-> nops(l)+
add(a(l[i, 2])+a(pi(l[i, 1])-`if`(i=1, 0, pi(l[i-1, 1]))),
i=1..nops(l)))(sort(ifactors(n)[2], (x, y)-> x[1]<y[1])))
end:
seq(a(n), n=1..100); # Alois P. Heinz, Mar 26 2019
MATHEMATICA
a[n_] := a[n] = If[n<3, n-1, Function[l, Length[l] + Sum[a[l[[i, 2]]] + a[PrimePi[l[[i, 1]]] - If[i == 1, 0, PrimePi[l[[i-1, 1]]]]], {i, 1, Length[l]}]][SortBy[FactorInteger[n], First]]];
Array[a, 100] (* Jean-François Alcover, Nov 17 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Formula corrected by Sean A. Irvine, Mar 26 2019
STATUS
approved