OFFSET
1,1
EXAMPLE
101 is prime, its nonprime digits are (1, 0, 1), and 0<3 so a(6)=101. 103 is prime, its prime digit is 3, its nonprime digits are (0, 1), and 1 < 2 so a(7)=103.
MAPLE
a := proc (n) local nn, s, j: nn := convert(n, base, 10): s := 0: for j to nops(nn) do if isprime(nn[j]) = false then s := s+1 else s := s-1 end if end do: if isprime(n) = true and 0 < s then n else end if end proc: seq(a(n), n = 1 .. 650); # Emeric Deutsch, Jan 28 2009
CROSSREFS
KEYWORD
nonn,base,easy,less
AUTHOR
Juri-Stepan Gerasimov, Jan 08 2009
STATUS
approved