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.

A245193 Smallest prime having in decimal representation A136333(n) as suffix.

Original entry on oeis.org

11, 3, 7, 19, 11, 13, 17, 19, 31, 233, 37, 139, 71, 73, 277, 79, 191, 193, 97, 199, 2111, 113, 1117, 3119, 131, 4133, 137, 139, 1171, 173, 4177, 179, 191, 193, 197, 199, 311, 313, 317, 1319, 331, 2333, 337, 2339, 2371, 373, 2377, 379, 3391, 2393, 397, 1399
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 18 2014

Keywords

Comments

a(n) = A136333(n) iff A136333(n) itself is a prime number, cf. A091633.

Examples

			.    n  |   a(n)  | A136333(n)
. ------+---------+-----------
.   10  |    233  |      33
.   11  |     37  |      37
.   12  |    139  |      39
.   13  |     71  |      71
.   14  |     73  |      73
.   15  |    277  |      77
.   16  |     79  |      79
.   17  |    191  |      91
.   18  |    193  |      93
.   19  |     97  |      97
.   20  |    199  |      99
.   21  |   2111  |     111
.   22  |    113  |     113
.   23  |   1117  |     117
.   24  |   3119  |     119
.   25  |    131  |     131
.   26  |   4133  |     133
.   27  |    137  |     137
.   28  |    139  |     139
.   29  |   1171  |     171
.   30  |    173  |     173 .
		

Crossrefs

Programs

  • Haskell
    import Data.List (isSuffixOf); import Data.Function (on)
    a245193 n = head [p | p <- a000040_list,
                          (isSuffixOf `on` show) (a136333 n) p]
    
  • PARI
    isok(m) = my(d=digits(m)); apply(x->gcd(x, 10), d) == vector(#d, k, 1); \\ A136333
    f(m) = my(p=nextprime(m), s=10^#Str(m)); while ((p-m) % s, p = nextprime(p+1)); p;
    lista(nn) = apply(x->f(x), select(isok, [1..nn]));
    lista(1000) \\ Michel Marcus, Feb 25 2022