login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A096686 Least k such that decimal representation of k*n contains only digits 0 and 7. 3
7, 35, 259, 175, 14, 1295, 1, 875, 86419753, 7, 7, 6475, 539, 5, 518, 4375, 4571, 432098765, 4053, 35, 37, 35, 33509, 32375, 28, 2695, 285473251, 25, 265783, 259, 25067, 21875, 23569, 22855, 2, 2160493825, 21, 20265, 1813, 175, 1897, 185, 179249 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) = A078246(n)/n.
MAPLE
f:= proc(n) local q, q2, q5, n1, R, Agenda, d, newA, t, t1, t2;
q2:= padic:-ordp(n, 2);
q5:= padic:-ordp(n, 5);
q:= max(q2, q5);
n1:= n/2^q2/5^q5;
R[7]:= 7: Agenda:= {7}:
if 7 mod n1 = 0 then return 10^q*7/n fi;
for d from 2 do
newA:= NULL;
for t in Agenda do
t1:= 10*t mod n1;
if not assigned(R[t1]) then
R[t1]:= 10*R[t];
newA:= newA, t1;
fi;
t2:= (10*t+7) mod n1;
if t2 = 0 then
return 10^q*(10*R[t]+7)/n;
break
elif not assigned(R[t2]) then
R[t2]:= 10*R[t]+7;
newA:= newA, t2;
fi;
od;
Agenda:= [newA];
od:
end proc:
map(f, [$1..50]); # Robert Israel, Mar 06 2017
CROSSREFS
Sequence in context: A177261 A105926 A184460 * A165505 A165639 A073109
KEYWORD
base,nonn,look
AUTHOR
Ray Chandler, Jul 12 2004
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 02:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)