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.

Original entry on oeis.org

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, 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, 4, 2, 2, 1, 1, 7, 5, 3, 2, 1, 1, 9, 6, 4, 3, 2, 1, 1
Offset: 1

Views

Author

Avik Roy (avik_3.1416(AT)yahoo.co.in), Jan 28 2009

Keywords

Examples

			(cos Pi/4)^4=0.25, so a(4)=2.
(cos Pi/4)^8=0.0625, so a(8)=6.
		

Crossrefs

Cf. A111395.

Programs

  • Maple
    f:= proc(n) local t,m;
      m:= 1 + ilog10(floor(2^(n/2)));
      floor(10^m * 2^(-n/2))
    end proc:
    map(f, [$1..100]); # Robert Israel, Aug 22 2023
  • Mathematica
    With[{c=Cos[Pi/4]},Table[First[RealDigits[N[c^n,20]][[1]]],{n,120}]] (* Harvey P. Dale, Nov 07 2012 *)

Formula

a(2*k) = A111395(k). - Robert Israel, Aug 22 2023

Extensions

More terms from Harvey P. Dale, Nov 07 2012
Offset corrected by Robert Israel, Aug 22 2023