Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #102 Aug 01 2024 01:19:46
%S 1,2,4,5,8,10,16,20,25,32,40,50,64,80,100,125,128,160,200,250,256,320,
%T 400,500,512,625,640,800,1000,1024,1250,1280,1600,2000,2048,2500,2560,
%U 3125,3200,4000,4096,5000,5120,6250,6400,8000,8192,10000,10240,12500,12800
%N Numbers of the form 2^i*5^j with i, j >= 0.
%C These are the natural numbers whose reciprocals are terminating decimals. - _David Wasserman_, Feb 26 2002
%C A132726(a(n), k) = 0 for k <= a(n); A051626(a(n)) = 0; A132740(a(n)) = 1; A132741(a(n)) = a(n). - _Reinhard Zumkeller_, Aug 27 2007
%C Where record values greater than 1 occur in A165706: A165707(n) = A165706(a(n)). - _Reinhard Zumkeller_, Sep 26 2009
%C Also numbers that are divisible by neither 10k - 7, 10k - 3, 10k - 1 nor 10k + 1, for all k > 0. - _Robert G. Wilson v_, Oct 26 2010
%C A204455(5*a(n)) = 5, and only for these numbers. - _Wolfdieter Lang_, Feb 04 2012
%C Since p = 2 and q = 5 are coprime, sum_{n >= 1} 1/a(n) = sum_{i >= 0} sum_{j >= 0} 1/p^i * 1/q^j = sum_{i >= 0} 1/p^i q/(q - 1) = p*q/((p-1)*(q-1)) = 2*5/(1*4) = 2.5. - _Franklin T. Adams-Watters_, Jul 07 2014
%C Conjecture: Each positive integer n not among 1, 4 and 12 can be written as a sum of finitely many numbers of the form 2^a*5^b + 1 (a,b >= 0) with no one dividing another. This has been verified for n <= 3700. - _Zhi-Wei Sun_, Apr 18 2023
%D Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 73.
%H Reinhard Zumkeller, <a href="/A003592/b003592.txt">Table of n, a(n) for n = 1..10000</a>
%H Vaclav Kotesovec, <a href="/A003592/a003592.jpg">Graph - the asymptotic ratio (200000 terms)</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RegularNumber.html">Regular Number</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DecimalExpansion.html">Decimal Expansion</a>
%F The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} mu(10*n)*x^n/(1 - x^n), where mu(n) is the Möbius function A008683. Cf. with the formula of Hanna in A051037. - _Peter Bala_, Mar 18 2019
%F a(n) ~ exp(sqrt(2*log(2)*log(5)*n)) / sqrt(10). - _Vaclav Kotesovec_, Sep 22 2020
%p isA003592 := proc(n)
%p if n = 1 then
%p true;
%p else
%p return (numtheory[factorset](n) minus {2,5} = {} );
%p end if;
%p end proc:
%p A003592 := proc(n)
%p option remember;
%p if n = 1 then
%p 1;
%p else
%p for a from procname(n-1)+1 do
%p if isA003592(a) then
%p return a;
%p end if;
%p end do:
%p end if;
%p end proc: # _R. J. Mathar_, Jul 16 2012
%t twoFiveableQ[n_] := PowerMod[10, n, n] == 0; Select[Range@ 10000, twoFiveableQ] (* _Robert G. Wilson v_, Jan 12 2012 *)
%t twoFiveableQ[n_] := Union[ MemberQ[{1, 3, 7, 9}, # ] & /@ Union@ Mod[ Rest@ Divisors@ n, 10]] == {False}; twoFiveableQ[1] = True; Select[Range@ 10000, twoFiveableQ] (* _Robert G. Wilson v_, Oct 26 2010 *)
%t maxExpo = 14; Sort@ Flatten@ Table[2^i * 5^j, {i, 0, maxExpo}, {j, 0, Log[5, 2^(maxExpo - i)]}] (* Or *)
%t Union@ Flatten@ NestList[{2#, 4#, 5#} &, 1, 7] (* _Robert G. Wilson v_, Apr 16 2011 *)
%o (PARI) list(lim)=my(v=List(),N);for(n=0,log(lim+.5)\log(5),N=5^n;while(N<=lim,listput(v,N);N<<=1));vecsort(Vec(v)) \\ _Charles R Greathouse IV_, Jun 28 2011
%o (Sage)
%o def isA003592(n) :
%o return not any(d != 2 and d != 5 for d in prime_divisors(n))
%o @CachedFunction
%o def A003592(n) :
%o if n == 1 : return 1
%o k = A003592(n-1) + 1
%o while not isA003592(k) : k += 1
%o return k
%o [A003592(n) for n in (1..48)] # _Peter Luschny_, Jul 20 2012
%o (Magma) [n: n in [1..10000] | PrimeDivisors(n) subset [2,5]]; // _Bruno Berselli_, Sep 24 2012
%o (Haskell)
%o import Data.Set (singleton, deleteFindMin, insert)
%o a003592 n = a003592_list !! (n-1)
%o a003592_list = f $ singleton 1 where
%o f s = y : f (insert (2 * y) $ insert (5 * y) s')
%o where (y, s') = deleteFindMin s
%o -- _Reinhard Zumkeller_, May 16 2015
%o (Python)
%o # A003592.py
%o from heapq import heappush, heappop
%o def A003592():
%o pq = [1]
%o seen = set(pq)
%o while True:
%o value = heappop(pq)
%o yield value
%o seen.remove(value)
%o for x in 2*value, 5*value:
%o if x not in seen:
%o heappush(pq, x)
%o seen.add(x)
%o sequence = A003592()
%o A003592_list = [next(sequence) for _ in range(100)]
%o (GAP) Filtered([1..10000],n->PowerMod(10,n,n)=0); # _Muniru A Asiru_, Mar 19 2019
%Y Complement of A085837. Cf. A094958, A022333 (list of j), A022332 (list of i).
%Y Cf. A003586, A003591, A003593, A003594, A003595, A257997.
%K nonn,easy
%O 1,2
%A _N. J. A. Sloane_
%E Incomplete Python program removed by _David Radcliffe_, Jun 27 2016