login
A092630
Nonprime numbers with exactly one nonprime digit.
0
1, 4, 6, 8, 9, 12, 15, 20, 21, 24, 26, 28, 30, 34, 36, 38, 39, 42, 45, 50, 51, 54, 56, 58, 62, 63, 65, 70, 74, 76, 78, 82, 85, 87, 92, 93, 95, 122, 123, 125, 132, 133, 135, 152, 153, 155, 172, 175, 177, 202, 203, 205, 207, 212, 213, 215, 217, 220, 221, 224, 226, 228
OFFSET
1,2
EXAMPLE
20 is nonprime and has one nonprime digit, 0;
122 is nonprime and has one nonprime digit, 1.
MAPLE
stev_sez:=proc(n) local i, tren, st, ans, anstren; ans:=[ ]: anstren:=[ ]: tren:=n: for i while (tren>0) do st:=round( 10*frac(tren/10) ): ans:=[ op(ans), st ]: tren:=trunc(tren/10): end do; for i from nops(ans) to 1 by -1 do anstren:=[ op(anstren), op(i, ans) ]; od; RETURN(anstren); end: ts_stnepf:=proc(n) local i, stpf, ans; ans:=stev_sez(n): stpf:=0: for i from 1 to nops(ans) do if (isprime(op(i, ans))='false') then stpf:=stpf+1; # number of nonprime digits fi od; RETURN(stpf) end: ts_nepr_neprn:=proc(n) local i, stpf, ans, ans1, tren; ans:=[ ]: stpf:=0: tren:=1: for i from 1 to n do if ( isprime(i)='false' and ts_stnepf(i) = 1) then ans:=[ op(ans), i ]: tren:=tren+1; fi od; RETURN(ans) end: ts_nepr_neprn(1000);
CROSSREFS
Sequence in context: A067012 A157942 A122786 * A079142 A062002 A090419
KEYWORD
nonn,base
AUTHOR
Jani Melik, Apr 11 2004
STATUS
approved