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.

A031974 1 repeated prime(n) times.

Original entry on oeis.org

11, 111, 11111, 1111111, 11111111111, 1111111111111, 11111111111111111, 1111111111111111111, 11111111111111111111111, 11111111111111111111111111111, 1111111111111111111111111111111, 1111111111111111111111111111111111111
Offset: 1

Views

Author

J. Castillo (arp(AT)cia-g.com) [Broken email address?]

Keywords

Comments

Salomaa's first example of an infinite language. - N. J. A. Sloane, Dec 05 2012
If p is a prime and gcd(p,b-1)=1, then (b^p-1)/(b-1) == 1 (mod p); by Fermat's little theorem. For example 1111111 == 1 (mod 7). - Thomas Ordowski, Apr 09 2016
Also Mersenne numbers (A001348) written in binary. - Kritsada Moomuang, May 13 2025

References

  • A. Salomaa, Jewels of Formal Language Theory. Computer Science Press, Rockville, MD, 1981, p. 2. - From N. J. A. Sloane, Dec 05 2012

Crossrefs

A004022 is the subsequence of primes. - Jeppe Stig Nielsen, Sep 14 2014
Cf. A001348.

Programs

  • Magma
    [(10^p-1)/9: p in PrimesUpTo(40)]; // Vincenzo Librandi, May 29 2014
  • Maple
    f:=n->(10^ithprime(n)-1)/9; [seq(f(n),n=1..20)]; # N. J. A. Sloane, Dec 05 2012
  • Mathematica
    Table[FromDigits[PadRight[{},Prime[n],1]],{n,15}] (* Harvey P. Dale, Apr 10 2012 *)

Formula

a(n) = A000042(A000040(n)). - Jason Kimberley, Dec 19 2012
a(n) = (10^prime(n) - 1)/9. - Vincenzo Librandi, May 29 2014

Extensions

More terms from Erich Friedman
Corrected and extended by Harvey P. Dale, Apr 10 2012