OFFSET
1,1
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..350
Carlos Rivera, Puzzle 935. pi+SOD(pi)=p(i+n), The Prime Puzzles and Problems Connection.
EXAMPLE
a(1) = 43 because 43 - 4*3 = 31 that is the first prime before 43.
a(2) = 23 because 23 - 2*3 = 17 that is the second prime before 23.
MAPLE
P:=proc(q) local k, n, p; for n from 1 to q do
for k from n+1 to q do p:=ithprime(k);
if p-convert(convert(p, base, 10), `*`)=ithprime(k-n) then
lprint(n, p); break; fi; od; od; end: P(10^9);
MATHEMATICA
Array[Block[{p = 2}, While[p - Times @@ IntegerDigits@ p != NextPrime[p, -#], p = NextPrime@ p]; p] &, 49] (* Michael De Vlieger, Dec 17 2018 *)
CROSSREFS
KEYWORD
base,nonn,easy
AUTHOR
Paolo P. Lava, Dec 17 2018
STATUS
approved