OFFSET
0,2
COMMENTS
Conjecture: Sequence is infinite.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..139 (all terms up to 1 million)
EXAMPLE
256 is a term as 2*56 + 1 = 113, 25*6 + 1 = 151 and 256 + 1 = 257 are all primes.
MAPLE
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) 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
MATHEMATICA
ppnQ[n_]:=Mod[n, 10]!=0&&AllTrue[Times@@@Table[FromDigits/@TakeDrop[ IntegerDigits[ n], k]/.(0->1), {k, IntegerLength[n]}]+1, PrimeQ]; Select[Range[5000], ppnQ] (* The program uses the AllTrue and TakeDrop functions from Mathematica version 10 *) (* Harvey P. Dale, Mar 23 2019 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 10 2003
EXTENSIONS
Corrected and extended by C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 25 2004
STATUS
approved