|
|
A252736
|
|
a(1) = a(2) = 0; for n > 2: a(2n) = 1 + a(n), a(2n+1) = a(A064989(2n+1)).
|
|
7
|
|
|
0, 0, 0, 1, 0, 1, 0, 2, 1, 1, 0, 2, 0, 1, 1, 3, 0, 2, 0, 2, 1, 1, 0, 3, 1, 1, 2, 2, 0, 2, 0, 4, 1, 1, 1, 3, 0, 1, 1, 3, 0, 2, 0, 2, 2, 1, 0, 4, 1, 2, 1, 2, 0, 3, 1, 3, 1, 1, 0, 3, 0, 1, 2, 5, 1, 2, 0, 2, 1, 2, 0, 4, 0, 1, 2, 2, 1, 2, 0, 4, 3, 1, 0, 3, 1, 1, 1, 3, 0, 3, 1, 2, 1, 1, 1, 5, 0, 2, 2, 3, 0, 2, 0, 3, 2, 1, 0, 4, 0, 2, 1, 4, 0, 2, 1, 2, 2, 1, 1, 4, 1, 1, 1, 2, 2, 3, 0, 6
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,8
|
|
COMMENTS
|
Consider the binary tree illustrated in A005940: If we start from any n, computing successive iterations of A252463 until 1 is reached (i.e., we are traversing level by level towards the root of the tree, starting from that vertex of the tree where n is located), a(n) gives the number of even numbers > 2 encountered on the path (i.e., excluding the 2 from the count but including the starting n if it was even).
The number of pairs in any factorization tree of n. For example, a possible factorization tree of 12 is 12 -> (4*3) -> (2*2)*3. There are 2 pairs in this factor tree: (4*3) and (2*2). Thus, a(12) - 1 = 3 - 1 = 2. - Melvin Peralta, Aug 29 2016
|
|
LINKS
|
|
|
FORMULA
|
a(1) = a(2) = 0; for n > 2: a(2n) = 1 + a(n), a(2n+1) = a(A064989(2n+1)).
Other identities. For all n >= 2:
|
|
MATHEMATICA
|
a[1] = a[2] = 0; a[n_] := a[n] = If[EvenQ@ n, 1 + a[n/2], a[Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n]]; Array[a, 120] (* Michael De Vlieger, Aug 30 2016 *)
|
|
PROG
|
(Scheme, with memoization-macro definec)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|