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.

A164890 Primes composed of digit {1,9} and with digit sum 9*k+1.

Original entry on oeis.org

19, 199, 919, 991, 1999, 9199, 99991, 199999, 991999, 999199, 9999991, 19999999, 99991999, 9199999999, 11111111911, 11119111111, 99999199999, 99999991999, 111111911191, 111191119111, 111911191111, 191119111111, 991999999999, 999999991999, 1111111119919, 1111111191199, 1111111191919, 1111111199119
Offset: 1

Views

Author

Zak Seidov, Aug 29 2009

Keywords

Comments

Corresponding k's are 1, 2, 2, 2, 3, 3, 4, 5, 5, 5, 6, 7, 7, 9, 2, 2, 10, 10, 3, 3, 3, 3, 11, 11, 4, 4, 4, 4. - Robert Israel, May 02 2018
Number of primes having a digital length of k=1,2,3...: 0, 1, 3, 2, 1, 3, 1, 2, 0, 1, 4, 6, 33, 81, 329, 455, 2028, 3134, 9193, 9060, 31615, 39246, 88069, 94794, 252965, 309437, ..., . = Robert G. Wilson v, May 05 2018

Crossrefs

Programs

  • Maple
    Res:= {}:
    for d from 2 to 14 do
      for j from 1 to d by 9 do
        Res:= Res union select(isprime, {seq((10^d-1)/9 + 8*add(10^i,i=s), s = combinat:-choose([$0..d-1],d-j))})
    od od:
    sort(convert(Res,list)); # Robert Israel, May 02 2018
  • Mathematica
    f[n_] := Block[{s, t = Tuples[{1, 9}, n]}, s = Select[t, Mod[Plus @@ #, 9] == 1 &]; Select[ FromDigits@# & /@ s, PrimeQ]]; Array[f, 12] // Flatten (* Robert G. Wilson v, May 04 2018 *)
  • PARI
    isok(n) = isprime(n) && (Set(digits(n)) == [1, 9]) && ((sumdigits(n) % 9) == 1); \\ Michel Marcus, Oct 16 2013

Extensions

Definition corrected by Michel Marcus, Oct 16 2013
Corrected by Robert Israel, May 02 2018