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”).

A019569
Number of bar segments in a certain way of representing the integers graphically.
1
0, 1, 2, 2, 3, 2, 3, 3, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 4, 4, 4, 4, 4, 4, 4, 5, 4, 5, 4, 3, 5, 4, 5, 4, 4, 4, 4, 5, 5, 5, 4, 4, 5, 5, 4, 5, 4, 4, 4, 4, 6, 6, 4, 4, 5, 6, 5, 5, 5, 4, 4, 5, 5, 3, 6, 5, 5, 5, 6, 4, 5, 5, 5, 6, 4, 6, 4, 5, 5, 5, 4
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
Sean A. Irvine, Java program (github)
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
Sequence in context: A343901 A376181 A322418 * A003434 A330808 A097849
KEYWORD
nonn
EXTENSIONS
Formula corrected by Sean A. Irvine, Mar 26 2019
STATUS
approved