login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A089705 Smallest n-digit prime in which the unit place digit is 1 and the k-th most significant digit is prime (2,3,5,7) if k is prime else is composite (4,6,8,9,0). 2

%I #5 Aug 13 2017 21:44:33

%S 31,251,4231,20231,420221,2020231,42020351,402020251,4002020251,

%T 20002020721,420002020271,2020002020251,42020002020551,

%U 402020002020521,4002020002020221,20002020002020531,420002020002020231

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

%C 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.

%e a(6) = 420221.

%p with(combinat, cartprod): ds:=proc(s) local j,l: l:=nops(s): RETURN(add(s[j]*10^(l-j),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(n-i+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

%Y Cf. A089704, A089706.

%K base,nonn

%O 2,1

%A _Amarnath Murthy_, Nov 10 2003

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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 09:35 EDT 2024. Contains 371967 sequences. (Running on oeis4.)