Original entry on oeis.org
1, 12, 106, 1018, 10312, 105502, 1197058, 11056216
Offset: 0
a(3) = 256 which is the smallest 3-digit number such that 2*56 + 1 = 113, 25*6 + 1 = 151 and 256 + 1 = 257 are all prime.
-
with(combinat): ds:=proc(s) local j: RETURN(add(s[j]*10^(j-1),j=1..nops(s))):end: for d from 1 to 7 do sch:=[seq([1,op(i),d+1],i=[[],seq([j],j=2..d)])]: for n from 10^(d-1) to 10^d-1 do sn:=convert(n,base,10): fl:=0: for s in sch do m:=mul(j,j=[seq(ds(sn[s[i]..s[i+1]-1]),i=1..nops(s)-1)])+1: if not isprime(m) then fl:=1: break fi od: if fl=0 then printf("%d, ",n):break fi od od: # C. Ronaldo
Corrected and extended by C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 25 2004
Original entry on oeis.org
6, 82, 982, 9748, 96052, 992548
Offset: 1
-
with(combinat): ds:=proc(s) local j: RETURN(add(s[j]*10^(j-1),j=1..nops(s))):end: for d from 1 to 6 do sch:=[seq([1,op(i),d+1],i=[[],seq([j],j=2..d)])]: for n from 10^d-1 by -1 to 10^(d-1) do sn:=convert(n,base,10): fl:=0: for s in sch do m:=mul(j,j=[seq(ds(sn[s[i]..s[i+1]-1]),i=1..nops(s)-1)])+1: if not isprime(m) then fl:=1: break fi od: if fl=0 then printf("%d, ",n):break fi od od: # C. Ronaldo
More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 25 2004
A089696
Numbers k such that the numbers obtained by placing as many '*' signs as possible anywhere between the digits and then adding 1 yields a prime in every case: let abc.. be the digits of k, then abc+1, a*bc+1, ab*c+1, a*b*c+1, ... must all be primes.
Original entry on oeis.org
1, 2, 4, 6, 12, 16, 22, 28, 36, 52, 58, 66, 82, 112, 136, 166, 256, 352, 556, 562, 586, 616, 652, 658
Offset: 0
256 is a member 256+1, 2*56 +1, 25*6+1, 2*5*6 +1 are all prime.
-
with(combinat): ds:=proc(s) local j: RETURN(add(s[j]*10^(j-1),j=1..nops(s))):end: for d from 1 to 6 do sch:=[seq([1,op(i),d+1],i=choose([seq(j,j=2..d)]))]: for n from 10^(d-1) to 10^d-1 do sn:=convert(n,base,10): fl:=0: for s in sch do m:=mul(j,j=[seq(ds(sn[s[i]..s[i+1]-1]),i=1..nops(s)-1)])+1: if not isprime(m) then fl:=1: break fi od: if fl=0 then printf("%d, ",n) fi od od: # C. Ronaldo
Corrected and extended by C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 25 2004
Showing 1-3 of 3 results.
Comments