login
Least base-3 digit of n.
2

%I #26 Dec 19 2017 17:57:15

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

%T 0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,

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

%N Least base-3 digit of n.

%H Robert Israel, <a href="/A290825/b290825.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = 2 if and only if n > 0 is in A024023.

%F a(n) = 0 if n is divisible by 3.

%F a(n) = min(A010872(n), a(A002264(n))).

%e 11 = 102_3 so a(11)=0.

%p seq(min(convert(n,base,3)),n=0..100);

%t Table[Min[IntegerDigits[n,3]],{n,0,120}] (* _Harvey P. Dale_, Dec 19 2017 *)

%o (PARI) a(n) = if (n==0, 0, vecmin(digits(n, 3))); \\ _Michel Marcus_, Aug 12 2017

%Y Cf. A002264, A010872, A024023, A037897, A190592.

%K nonn,base

%O 0,3

%A _Robert Israel_, Aug 11 2017