

A089705


Smallest ndigit prime in which the unit place digit is 1 and the kth most significant digit is prime (2,3,5,7) if k is prime else is composite (4,6,8,9,0).


2



31, 251, 4231, 20231, 420221, 2020231, 42020351, 402020251, 4002020251, 20002020721, 420002020271, 2020002020251, 42020002020551, 402020002020521, 4002020002020221, 20002020002020531, 420002020002020231
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

2,1


COMMENTS

Conjecture: All the composite positions are occupied by a zero except the most significant digit, which in most cases perhaps is 4. Most of the prime positions for p > 5 are occupied by 2.


LINKS



EXAMPLE

a(6) = 420221.


MAPLE

with(combinat, cartprod): ds:=proc(s) local j, l: l:=nops(s): RETURN(add(s[j]*10^(lj), j=1..l)):end: p:=[2, 3, 5, 7]:c:=[0, 4, 6, 8, 9]: cf:=[4, 6, 8, 9]: ctpr:=proc(n, s) local m, T, a: a:=s: m:=1: T:=cartprod([seq(piecewise(isprime(ni+2), p, i=2, cf, c), i=2..n), [1]]): while not T[finished] do m:=ds(T[nextvalue]()): if isprime(m) and not member(m, a) then a:=[op(a), m]: RETURN(a) fi od: end: a:=[]: for n from 2 to 20 do a:=ctpr(n, a) od: op(a); # C. Ronaldo


CROSSREFS



KEYWORD

base,nonn


AUTHOR



EXTENSIONS

More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 25 2004


STATUS

approved



