OFFSET
1,2
COMMENTS
Terminating decimals are zero-extended, so that 10 appears in 0.100... = 1/10.
Let n >= 2 and let m = 10^floor(log_10(n)+1) be the smallest power of 10 > n. Then n is in this sequence iff ceiling(n^2/m) < ceiling((n^2+n)/m) and there exists k >= 0 with 10^k == ceiling(n^2/m) (mod n). - David W. Wilson, Dec 14 2006
As n increases, the average number of digits in the decimal expansion of 1/n grows fairly steadily. It takes a jump at powers of ten. So the density of the present sequence grows steadily until a new power of ten is reached, when there is an abrupt drop. - Franklin T. Adams-Watters, Dec 17 2006
LINKS
D. W. Wilson, Table of n, a(n) for n = 1..10000
Daniel J. Hardisky, Algorithms for A100468 and subsets
EXAMPLE
a(6)=17 because 1/17 = ".0588235294117647" which contains "17"
PROG
(PARI) f1(n, prec) = for(x=1, n, default(realprecision, prec); a=1./x; if(countmatch(a, x), print1(x", "))) countmatch(str, match) = \Count the unique occurrences of string match in string str { local(lnm, lns, x, c); str=Str(str); \This allows leaving quotes off input match=Str(match); c=0; i=0; lns=length(str); lnm=length(match); if(lnm>1, i=1); x=1; while(x<=lns-lnm+1, if(mid(str, x, lnm)== match, c++; x+=lnm, x++); ); return(c) } - Cino Hilliard, Jan 04 2005
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Gil Broussard, Nov 20 2004
STATUS
approved