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.

A216099 Period of powers of 3 mod 10^n.

Original entry on oeis.org

4, 20, 100, 500, 5000, 50000, 500000, 5000000, 50000000, 500000000, 5000000000, 50000000000, 500000000000, 5000000000000, 50000000000000, 500000000000000, 5000000000000000, 50000000000000000, 500000000000000000
Offset: 1

Views

Author

V. Raman, Sep 01 2012

Keywords

Crossrefs

Programs

  • Mathematica
    Table[If[n<5,(4*5^n)/5,10^n/20],{n,20}] (* or *) Join[{4,20,100},NestList[ 10#&,500,20]] (* Harvey P. Dale, May 31 2017 *)
  • PARI
    a(n)=if(n<5,4*5^n/5,10^n/20) \\ Charles R Greathouse IV, Mar 26 2016

Formula

a(n) = 4*5^(n-1) for n <= 4.
a(n) = 5*10^(n-2) for n >= 5.