cp's OEIS Frontend

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.

A085837 Denominators of unit fractions having non-terminating decimal expansions.

This page as a plain text file.
%I A085837 #22 Feb 24 2025 11:10:07
%S A085837 3,6,7,9,11,12,13,14,15,17,18,19,21,22,23,24,26,27,28,29,30,31,33,34,
%T A085837 35,36,37,38,39,41,42,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58,59,
%U A085837 60,61,62,63,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,81,82,83,84
%N A085837 Denominators of unit fractions having non-terminating decimal expansions.
%C A085837 Complement of A003592.
%H A085837 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RepeatingDecimal.html">Repeating Decimal</a>
%e A085837 1/3=0.3333..., 1/6=0.16666..., 1/7=0.142857142857..., ...
%p A085837 isA085837 := proc(n)
%p A085837         return (numtheory[factorset](n) minus {2,5} <> {} );
%p A085837 end proc:
%p A085837 A085837 := proc(n)
%p A085837     option remember;
%p A085837     if n = 1 then
%p A085837         3;
%p A085837     else
%p A085837         for a from procname(n-1)+1 do
%p A085837             if isA085837(a) then
%p A085837                 return a;
%p A085837             end if;
%p A085837         end do:
%p A085837     end if;
%p A085837 end proc: # _R. J. Mathar_, Jul 16 2012
%t A085837 Select[ Range[84], MatchQ[ RealDigits[1/#], {{___, {__}}, 0|-1}] &] (* From _Jean-François Alcover_, Nov 07 2011 *)
%t A085837 Select[Range[100],Depth[RealDigits[1/#]]>3&] (* _Harvey P. Dale_, May 28 2015 *)
%o A085837 (Python)
%o A085837 from sympy import integer_log
%o A085837 def A085837(n):
%o A085837     def f(x): return n+sum((x//5**i).bit_length() for i in range(integer_log(x,5)[0]+1))
%o A085837     m, k = n, f(n)
%o A085837     while m != k: m, k = k, f(k)
%o A085837     return m # _Chai Wah Wu_, Feb 24 2025
%Y A085837 Cf. A003592.
%K A085837 nonn,easy,nice,base
%O A085837 1,1
%A A085837 _Eric W. Weisstein_, Jul 04 2003
%E A085837 Definition corrected by _Robert Israel_, Jul 09 2014