login
Number of digits of hexadecimal representation of n.
2

%I #15 Dec 14 2015 05:18:55

%S 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,

%T 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,

%U 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2

%N Number of digits of hexadecimal representation of n.

%C Length of n-th row in A262437.

%H Reinhard Zumkeller, <a href="/A262438/b262438.txt">Table of n, a(n) for n = 0..10000</a>

%p A262438 := proc(n)

%p if n =0 then

%p 1;

%p else

%p 1+floor(log[16](n)) ;

%p end if;

%p end proc: # _R. J. Mathar_, Dec 14 2015

%o (Haskell)

%o a262438 = length . a262437_row

%o (PARI) a(n) = if (n, #digits(n, 16), 1); \\ _Michel Marcus_, Dec 14 2015

%Y Cf. A262437, A055642, A070939, A081604.

%K nonn,base

%O 0,17

%A _Reinhard Zumkeller_, Sep 22 2015