OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
EXAMPLE
a(4) = 11 and 235711 is a multiple of prime(4) = 7.
MAPLE
N:= 100: # for a(1)..a(N)
P:= [seq(ithprime(i), i=1..N)]:
R:= Vector(N): count:= 0:
p:= 1: s:= 0:
while count < N do
p:= nextprime(p);
s:= 10^(1+ilog10(p))*s+p;
r:= select(t -> R[t]=0 and s mod P[t] = 0, [$1..N]);
R[r]:= p;
count:= count+nops(r);
od:
convert(R, list); # Robert Israel, Oct 28 2021
MATHEMATICA
f[n_] := Block[{p = Prime[n], k = 1, q = 2}, While[ Mod[q, p] != 0, k++; q = FromDigits[ Join[ IntegerDigits[q], IntegerDigits[ Prime[k]]]]]; Prime[k]]; Table[ f[n], {n, 1, 55}]
PROG
(Python)
from sympy import prime, nextprime
def a(n):
pstr, pn, p = "2", prime(n), 2
while int(pstr)%pn != 0:
p = nextprime(p)
pstr += str(p)
return p
print([a(n) for n in range(1, 56)]) # Michael S. Branicky, Oct 28 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Dec 03 2003
EXTENSIONS
Corrected and extended by Robert G. Wilson v, Dec 05 2003
STATUS
approved