login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Height of the shortest binary factorization tree of n.
1

%I #26 Aug 12 2017 12:07:43

%S 0,0,0,1,0,1,0,2,1,1,0,2,0,1,1,2,0,2,0,2,1,1,0,2,1,1,2,2,0,2,0,3,1,1,

%T 1,2,0,1,1,2,0,2,0,2,2,1,0,3,1,2,1,2,0,2,1,2,1,1,0,2,0,1,2,3,1,2,0,2,

%U 1,2,0,3,0,1,2,2,1,2,0,3,2,1,0,2,1,1,1,2,0,2,1,2,1,1,1,3,0,2,2,2

%N Height of the shortest binary factorization tree of n.

%C Among all possible binary factorization trees of n we choose a tree with minimal height. The choice may not be unique. a(n) gives the height of the chosen tree.

%C To compute the terms A001222 and A001221 could be used.

%C The positions at which numbers (1,2,3) first appear are respectively (4,8,32). The latter sequence can be described by the formula b(n) = 2^(2^(n-1) + 1).

%H Antti Karttunen, <a href="/A276806/b276806.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>

%F a(n^2) = a(n) + 1.

%e a(12) = 2 since 12 cannot be factored in a binary factorization tree of height less than 2, but it can be factored in a tree of height 2, e.g.,

%e 12

%e / \

%e 4 3

%e / \

%e 2 2

%e Similarly, a(16) = 2:

%e 16

%e / \

%e / \

%e 4 4

%e / \ / \

%e 2 2 2 2

%e and a(40) = 2:

%e 40

%e / \

%e / \

%e 4 10

%e / \ / \

%e 2 2 2 5

%e and a(84) = 2:

%e 84

%e / \

%e / \

%e 4 21

%e / \ / \

%e 2 2 3 7

%o (PARI) a(n)=if(n>1,my(b=bigomega(n),c=(2^logint(b,2)!=b));logint(b,2)+c,0) \\ _David A. Corneth_, Oct 01 2016

%o (PARI) A276806(n) = { my(m=0,h); if((1==n)||isprime(n),0,fordiv(n,d,if((d>1)&&(d<n),h = 1+max(A276806(d),A276806(n/d)); if(!m || (h < m),m=h)))); m; }; \\ _Antti Karttunen_, Aug 12 2017

%Y Cf. A001221, A001222, A005171.

%K nonn

%O 1,8

%A _Yuriy Sibirmovsky_, Sep 17 2016