A089394 Largest n-digit member of A089392, or 0 if there is no such n-digit term.
7, 89, 881, 8821, 80849, 864883, 8608081, 48804809, 608844043, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Links
- C. Rivera, Puzzle 401. Magnanimous primes, 2007.
Programs
-
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 by -1 to 10^(d-1) do sn:=convert(n,base,10): fl:=0: for s in sch do m:=add(j,j=[seq(ds(sn[s[i]..s[i+1]-1]),i=1..nops(s)-1)]): if not isprime(m) then fl:=1: break fi od: if fl=0 then printf("%d, ",n):break fi od od: # C. Ronaldo
Extensions
More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 25 2004
3 more terms from David Wasserman, Sep 15 2005
Definition edited and a(10..16) = 0 added by M. F. Hasler, Dec 28 2014
Comments