OFFSET
0,2
MATHEMATICA
Union[Join[5 Range[100], Select[Range[500], MemberQ[IntegerDigits[#], 5]&]]] (* Harvey P. Dale, Dec 08 2010 *)
PROG
(PARI) ll(n)=length(Str(n)) f(n, m)=(n%10^(ll(n)-m) - n%10^(ll(n)-m-1))/10^(ll(n)-m-1) a(n, m)=s=0; for(i=0, ll(n), if(f(n, i)==m, s=s+1, s=s)); return(s) for (j=0, 300, if(Mod(j, 5)==0 || a(j, 5)==1, print1(j, ", ")))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Mar 24 2004
EXTENSIONS
More terms from Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 25 2004
STATUS
approved