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”).
%I #15 Dec 22 2024 14:28:43
%S 1,2,3,4,5,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,
%T 5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
%U 1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
%N Leading digit of n in base 6.
%H Kevin Ryde, <a href="/A339256/b339256.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = floor(n / 6^floor(log_6(n))).
%F G.f.: (x + Sum_{k>=0} Sum_{d=2..5} (x^(d*6^k)-x^(6^(k+1))) )/(1-x).
%t Table[IntegerDigits[n,6][[1]],{n,90}] (* _Harvey P. Dale_, Jul 19 2023 *)
%o (PARI) a(n) = n\6^logint(n,6);
%Y Cf. A007092 (base 6), A109804 (partial sums).
%Y In other bases: A122586, A122587, A339255, A000030, A099563, A276153.
%K base,nonn
%O 1,2
%A _Kevin Ryde_, Nov 28 2020