login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers k such that k appears in the decimal representation of 1/k.
1

%I #32 Nov 09 2024 19:41:01

%S 1,3,6,7,10,14,17,28,58,59,83,86,87,89,97,100,118,167,197,228,281,313,

%T 316,339,367,379,383,456,458,469,529,541,543,569,577,587,593,607,618,

%U 626,629,647,669,673,677,678,683,687,701,709,719,722,727,729,767,771,772

%N Numbers k such that k appears in the decimal representation of 1/k.

%C Terminating decimals are zero-extended, so that 10 appears in 0.100... = 1/10.

%C 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

%C 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

%H D. W. Wilson, <a href="/A100468/b100468.txt">Table of n, a(n) for n = 1..10000</a>

%H Daniel J. Hardisky, <a href="/A100468/a100468.pdf">Algorithms for A100468 and subsets</a>

%e a(6)=17 because 1/17 = ".0588235294117647" which contains "17"

%o (PARI) f1(n,prec) = for(x=1,n,default(realprecision,prec);a=1./x; if(countmatch(a,x), print1(x, ", ")))

%o mid(str, s, n) = { v =""; tmp = Vec(str); ln=length(tmp); for(x=s, s+n-1, v=concat(v, tmp[x]); ); return(v) }

%o 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

%Y Cf. A100469.

%K nonn,base

%O 1,2

%A _Gil Broussard_, Nov 20 2004