cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A155816 First nonzero digit in the decimal expansion of (cos Pi/4)^n.

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