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.

A166923 Digital root of prime(n)^2.

Original entry on oeis.org

4, 9, 7, 4, 4, 7, 1, 1, 7, 4, 7, 1, 7, 4, 4, 1, 7, 4, 7, 1, 1, 4, 4, 1, 4, 4, 7, 1, 1, 7, 1, 7, 4, 7, 7, 4, 7, 1, 7, 4, 1, 1, 4, 7, 1, 1, 7, 4, 4, 7, 1, 7, 4, 1, 7, 4, 1, 1, 4, 4, 7, 7, 1, 7, 4, 4, 4, 7, 7, 4, 4, 1, 4, 7, 1, 7, 4, 1, 7, 7, 7, 4, 1, 1, 4, 4, 1, 4, 4, 7, 1, 4, 1, 7, 7, 1, 7, 1, 1, 1, 4, 1, 7, 4, 7
Offset: 1

Views

Author

Zak Seidov, Oct 23 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Table[If[(m9=Mod[Prime[n]^2,9])==0,9,m9],{n,200}]
  • Python
    from sympy import prime
    def A166923(n):
        return 1 + (prime(n)**2-1) % 9 # Chai Wah Wu, Sep 03 2014

Extensions

Definition corrected by Chai Wah Wu, Sep 03 2014