login
Leading digit of 3^n.
8

%I #18 May 16 2020 14:22:31

%S 1,3,9,2,8,2,7,2,6,1,5,1,5,1,4,1,4,1,3,1,3,1,3,9,2,8,2,7,2,6,2,6,1,5,

%T 1,5,1,4,1,4,1,3,1,3,9,2,8,2,7,2,7,2,6,1,5,1,5,1,4,1,4,1,3,1,3,1,3,9,

%U 2,8,2,7,2,6,2,6,1,5,1,4,1,4,1,3,1,3,1,3,9,2,8,2,7,2,7,2,6,1,5,1,5,1,4,1,4

%N Leading digit of 3^n.

%H Harry J. Smith, <a href="/A060956/b060956.txt">Table of n, a(n) for n = 0..1000</a>

%H Dmitry Kamenetsky, <a href="https://puzzling.stackexchange.com/questions/97179/first-digit-of-32020/">First digit of 3^2020</a>, Puzzling StackExchange.

%F a(n) = [3^n / 10^([log_10(3^n) ]) ] = [3^n / 10^([n*log_10(3) ]) ].

%F a(n) = A000030(A000244(n)). - _Michel Marcus_, Jul 03 2018

%t First[IntegerDigits[#]]&/@(3^Range[0,110]) (* _Harvey P. Dale_, May 16 2016 *)

%o (PARI) { default(realprecision, 100); for (n=0, 1000, t=log(3)/log(10); write("b060956.txt", n, " ", 3^n \ 10^floor(n*t)); ) } \\ _Harry J. Smith_, Jul 15 2009

%Y Cf. A000030, A000244.

%K nonn,base,easy

%O 0,2

%A Ahmed Fares (ahmedfares(AT)my-deja.com), May 08 2001

%E More terms from Larry Reeves (larryr(AT)acm.org), May 11 2001