OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
EXAMPLE
. 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 .
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Jul 18 2014
STATUS
approved