This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A096686 #15 Sep 25 2024 18:35:51 %S A096686 7,35,259,175,14,1295,1,875,86419753,7,7,6475,539,5,518,4375,4571, %T A096686 432098765,4053,35,37,35,33509,32375,28,2695,285473251,25,265783,259, %U A096686 25067,21875,23569,22855,2,2160493825,21,20265,1813,175,1897,185,179249 %N A096686 Least k such that decimal representation of k*n contains only digits 0 and 7. %H A096686 Robert Israel, <a href="/A096686/b096686.txt">Table of n, a(n) for n = 1..10000</a> %F A096686 a(n) = A078246(n)/n. %p A096686 f:= proc(n) local q, q2, q5, n1, R, Agenda,d, newA, t, t1, t2; %p A096686 q2:= padic:-ordp(n,2); %p A096686 q5:= padic:-ordp(n,5); %p A096686 q:= max(q2,q5); %p A096686 n1:= n/2^q2/5^q5; %p A096686 R[7]:= 7: Agenda:= {7}: %p A096686 if 7 mod n1 = 0 then return 10^q*7/n fi; %p A096686 for d from 2 do %p A096686 newA:= NULL; %p A096686 for t in Agenda do %p A096686 t1:= 10*t mod n1; %p A096686 if not assigned(R[t1]) then %p A096686 R[t1]:= 10*R[t]; %p A096686 newA:= newA, t1; %p A096686 fi; %p A096686 t2:= (10*t+7) mod n1; %p A096686 if t2 = 0 then %p A096686 return 10^q*(10*R[t]+7)/n; %p A096686 break %p A096686 elif not assigned(R[t2]) then %p A096686 R[t2]:= 10*R[t]+7; %p A096686 newA:= newA,t2; %p A096686 fi; %p A096686 od; %p A096686 Agenda:= [newA]; %p A096686 od: %p A096686 end proc: %p A096686 map(f, [$1..50]); # _Robert Israel_, Mar 06 2017 %t A096686 f07[n_]:=Module[{k=1},While[!SubsetQ[{0,7},IntegerDigits[n*k]],k++];k]; Array[f07,8] (* The program generates the first 8 terms of the sequence. To generate more, increase the Array constant but because some of the terms are quite large the program may take a long time to run. *) (* _Harvey P. Dale_, Sep 25 2024 *) %Y A096686 Cf. A004290, A078241-A078248, A079339, A096681-A096688. %K A096686 base,nonn,look %O A096686 1,1 %A A096686 _Ray Chandler_, Jul 12 2004