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.

A056129 Final nonzero digit of n-th primorial.

Original entry on oeis.org

1, 2, 6, 3, 1, 1, 3, 1, 9, 7, 3, 3, 1, 1, 3, 1, 3, 7, 7, 9, 9, 7, 3, 9, 1, 7, 7, 1, 7, 3, 9, 3, 3, 1, 9, 1, 1, 7, 1, 7, 1, 9, 9, 9, 7, 9, 1, 1, 3, 1, 9, 7, 3, 3, 3, 1, 3, 7, 7, 9, 9, 7, 1, 7, 7, 1, 7, 7, 9, 3, 7, 1, 9, 3, 9, 1, 3, 7, 9, 9, 1, 9, 9, 9, 7, 3, 9, 1, 7, 7, 1, 7, 3, 1, 1, 9, 7, 3, 3, 9, 9
Offset: 0

Views

Author

Robert G. Wilson v, Jul 28 2000

Keywords

Comments

For n > 2, a(n) is in {1, 3, 7, 9}.

Crossrefs

Programs

  • Mathematica
    Do[p = Product[Prime[m], {m, 1, n}]; While[Mod[p, 10] == 0, p = p/10]; Print[Mod[p, 10]], {n, 0, 100}]
  • PARI
    a(n)=if(n<3, return([1,2,6][n+1])); my(m=Mod(3,10)); forprime(p=7,prime(n), m*=p); lift(m) \\ Charles R Greathouse IV, Dec 03 2024

Formula

a(n) = prime(n)#/10 mod 10 for n > 2. - Charles R Greathouse IV, Dec 03 2024