OFFSET
1,1
EXAMPLE
2 is a term: 2 is prime, prime(2)=3, and the concatenation of 2 and 3 is 23, whose largest digit is 3 (a prime).
3 is a term: 3 is prime, prime(3)=5, and the concatenation of 3 and 5 is 35, whose largest digit is 5 (a prime).
7 is a term: 7 is prime, prime(7)=17, and their concatenation is 717, whose largest digit is 7 (a prime).
MAPLE
concat := proc (a, b) local bb: bb := nops(convert(b, base, 10)): 10^bb*a+b end proc: p := proc (n) local dig, ld: dig := convert(concat(n, ithprime(n)), base, 10): ld := max(seq(dig[j], j = 1 .. nops(dig))): if isprime(n) = true and isprime(ld) = true then n else end if end proc: seq(p(n), n = 1 .. 2000); # Emeric Deutsch, Jan 27 2009
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Juri-Stepan Gerasimov, Jan 19 2009
EXTENSIONS
Corrected (added 5, removed 19, 59) and extended by Emeric Deutsch, Jan 27 2009
Example section edited by Jon E. Schoenfield, Jan 15 2019
STATUS
approved