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 #14 Aug 24 2023 07:28:05
%S 7,5,3,2,1,1,8,6,4,3,2,1,1,7,5,3,2,1,1,9,6,4,3,2,1,1,8,6,4,3,2,1,1,7,
%T 5,3,2,1,1,9,6,4,3,2,1,1,8,5,4,2,2,1,1,7,5,3,2,1,1,9,6,4,3,2,1,1,8,5,
%U 4,2,2,1,1,7,5,3,2,1,1,9,6,4,3,2,1,1
%N First nonzero digit in the decimal expansion of (cos Pi/4)^n.
%H Robert Israel, <a href="/A155816/b155816.txt">Table of n, a(n) for n = 1..10000</a>
%F a(2*k) = A111395(k). - _Robert Israel_, Aug 22 2023
%e (cos Pi/4)^4=0.25, so a(4)=2.
%e (cos Pi/4)^8=0.0625, so a(8)=6.
%p f:= proc(n) local t,m;
%p m:= 1 + ilog10(floor(2^(n/2)));
%p floor(10^m * 2^(-n/2))
%p end proc:
%p map(f, [$1..100]); # _Robert Israel_, Aug 22 2023
%t With[{c=Cos[Pi/4]},Table[First[RealDigits[N[c^n,20]][[1]]],{n,120}]] (* _Harvey P. Dale_, Nov 07 2012 *)
%Y Cf. A111395.
%K nonn,base
%O 1,1
%A Avik Roy (avik_3.1416(AT)yahoo.co.in), Jan 28 2009
%E More terms from _Harvey P. Dale_, Nov 07 2012
%E Offset corrected by _Robert Israel_, Aug 22 2023