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.

Showing 1-6 of 6 results.

A165707 Range and record values of A165706.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 12, 13, 14, 18, 21, 22, 27, 33, 34, 35, 41, 51, 55, 56, 63, 78, 88, 89, 90, 98, 119, 139, 140, 145, 154, 182, 217, 218, 233, 243, 244, 280, 336, 337, 372, 383, 389, 434, 518, 519, 589, 601, 622, 677, 678, 798, 799, 925, 938, 994, 1060
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 26 2009

Keywords

Comments

a(1)=A165706(0); for n>1: a(n)=A165706(A003592(n)) and a(m) < A165706(m) for m < A003592(n).

A003592 Numbers of the form 2^i*5^j with i, j >= 0.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 16, 20, 25, 32, 40, 50, 64, 80, 100, 125, 128, 160, 200, 250, 256, 320, 400, 500, 512, 625, 640, 800, 1000, 1024, 1250, 1280, 1600, 2000, 2048, 2500, 2560, 3125, 3200, 4000, 4096, 5000, 5120, 6250, 6400, 8000, 8192, 10000, 10240, 12500, 12800
Offset: 1

Views

Author

Keywords

Comments

These are the natural numbers whose reciprocals are terminating decimals. - David Wasserman, Feb 26 2002
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
Where record values greater than 1 occur in A165706: A165707(n) = A165706(a(n)). - Reinhard Zumkeller, Sep 26 2009
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
A204455(5*a(n)) = 5, and only for these numbers. - Wolfdieter Lang, Feb 04 2012
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
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
1,2 and 4,5 are the only consecutive terms in the sequence. - Robin Jones, May 03 2025

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 73.

Crossrefs

Complement of A085837. Cf. A094958, A022333 (list of j), A022332 (list of i).
Cf. A164768 (difference between consecutive terms)

Programs

  • GAP
    Filtered([1..10000],n->PowerMod(10,n,n)=0); # Muniru A Asiru, Mar 19 2019
  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a003592 n = a003592_list !! (n-1)
    a003592_list = f $ singleton 1 where
       f s = y : f (insert (2 * y) $ insert (5 * y) s')
                   where (y, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 16 2015
    
  • Magma
    [n: n in [1..10000] | PrimeDivisors(n) subset [2,5]]; // Bruno Berselli, Sep 24 2012
    
  • Maple
    isA003592 := proc(n)
          if n = 1 then
            true;
        else
            return (numtheory[factorset](n) minus {2,5} = {} );
        end if;
    end proc:
    A003592 := proc(n)
         option remember;
         if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA003592(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jul 16 2012
  • Mathematica
    twoFiveableQ[n_] := PowerMod[10, n, n] == 0; Select[Range@ 10000, twoFiveableQ] (* Robert G. Wilson v, Jan 12 2012 *)
    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 *)
    maxExpo = 14; Sort@ Flatten@ Table[2^i * 5^j, {i, 0, maxExpo}, {j, 0, Log[5, 2^(maxExpo - i)]}] (* Or *)
    Union@ Flatten@ NestList[{2#, 4#, 5#} &, 1, 7] (* Robert G. Wilson v, Apr 16 2011 *)
  • 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
    
  • Python
    # A003592.py
    from heapq import heappush, heappop
    def A003592():
        pq = [1]
        seen = set(pq)
        while True:
            value = heappop(pq)
            yield value
            seen.remove(value)
            for x in 2*value, 5*value:
                if x not in seen:
                    heappush(pq, x)
                    seen.add(x)
    sequence = A003592()
    A003592_list = [next(sequence) for _ in range(100)]
    
  • Python
    from sympy import integer_log
    def A003592(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum((x//5**i).bit_length() for i in range(integer_log(x,5)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Feb 24 2025
    
  • Sage
    def isA003592(n) :
        return not any(d != 2 and d != 5 for d in prime_divisors(n))
    @CachedFunction
    def A003592(n) :
        if n == 1 : return 1
        k = A003592(n-1) + 1
        while not isA003592(k) : k += 1
        return k
    [A003592(n) for n in (1..48)]  # Peter Luschny, Jul 20 2012
    

Formula

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
a(n) ~ exp(sqrt(2*log(2)*log(5)*n)) / sqrt(10). - Vaclav Kotesovec, Sep 22 2020
a(n) = 2^A022332(n) * 5^A022333(n). - R. J. Mathar, Jul 06 2025

Extensions

Incomplete Python program removed by David Radcliffe, Jun 27 2016

A083662 a(n) = a(floor(n/2)) + a(floor(n/4)), n > 0; a(0)=1.

Original entry on oeis.org

1, 2, 3, 3, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34
Offset: 0

Views

Author

Benoit Cloitre, Oct 05 2003

Keywords

Comments

A000045(n+2) = a(A131577(n))and A000045(m+2) < a(m) for m < A131577(n). - Reinhard Zumkeller, Sep 26 2009

Crossrefs

Programs

  • PARI
    a(n)=if(n<1,n==0,a(n\2)+a(n\4))

Formula

For n > 0, a(n) = F([log(n)/log(2)]+3) where F(k) denotes the k-th Fibonacci number. For n >= 3, F(n) appears 2^(n-3) times. More generally, if p is an integer > 1 and a(n) = a(floor(n/p)) + a(floor(n/p^2)), n > 0, a(0)=1, then for n > 0, a(n) = F(floor(log(n)/log(p)) + 3).

A088468 a(0) = 1, a(n) = a(floor(n/2)) + a(floor(n/3)) for n > 0.

Original entry on oeis.org

1, 2, 3, 4, 5, 5, 7, 7, 8, 9, 9, 9, 12, 12, 12, 12, 13, 13, 16, 16, 16, 16, 16, 16, 20, 20, 20, 21, 21, 21, 21, 21, 22, 22, 22, 22, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 33, 33, 33, 33, 33, 33, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 38, 38, 38, 38, 38, 38, 38, 38, 48
Offset: 0

Views

Author

Michael Somos, Oct 02 2003

Keywords

Comments

Record values greater than 1 occur at 3-smooth numbers: A160519(n)=a(A003586(n)) and A160519(m)A003586(n). - Reinhard Zumkeller, May 16 2009

Crossrefs

Equals A061984(n) + 1.

Programs

  • Mathematica
    a[0]=1;a[n_]:=a[n]=a[Floor[n/2]]+a[Floor[n/3]];Array[a,75,0] (* Harvey P. Dale, Aug 23 2020 *)
  • PARI
    a(n)=if(n<1,n==0,a(n\2)+a(n\3))

Formula

Limit_{n->oo} a(n)/n = 0, as proved in Michael Penn's Youtube video (see Links). Michael Penn states in the video that this is a simplification of a problem of Paul Erdős, where the original problem is to show that limit_{n->oo} b(n)/n = 12/log(432) for b(0) = 1, b(n) = b(floor(n/2)) + b(floor(n/3)) + b(floor(n/6)) for n > 0 ({b(n)} is the sequence A007731). - Jianing Song, Sep 27 2023

A007731 a(n) = a(floor(n/2)) + a(floor(n/3)) + a(floor(n/6)), with a(0) = 1.

Original entry on oeis.org

1, 3, 5, 7, 9, 9, 15, 15, 17, 19, 19, 19, 29, 29, 29, 29, 31, 31, 41, 41, 41, 41, 41, 41, 55, 55, 55, 57, 57, 57, 57, 57, 59, 59, 59, 59, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 103, 103, 103, 103, 103, 103, 117, 117
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a007731 n = a007731_list !! n
    a007731_list = 1 : (zipWith3 (\u v w -> u + v + w)
       (map (a007731 . (`div` 2)) [1..])
       (map (a007731 . (`div` 3)) [1..])
       (map (a007731 . (`div` 6)) [1..]))
    -- Reinhard Zumkeller, Jan 11 2014
    
  • Maple
    A007731 := proc(n) option remember; if n=0 then RETURN(1) else RETURN( A007731(trunc(n/2))+A007731(trunc(n/3))+A007731(trunc(n/6))); fi; end;
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1,
          add(a(floor(n/i)), i=[2, 3, 6]))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Sep 27 2023
  • Mathematica
    a[n_] := a[n] = a[Floor[n/2]] + a[Floor[n/3]] + a[Floor[n/6]] ; a[0] = 1; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Mar 06 2014 *)
  • PARI
    a(n)=if(n<5, 2*n+1, a(n\2) + a(n\3) + a(n\6)) \\ Charles R Greathouse IV, Feb 08 2017

Formula

From given link, a(n) is asymptotic to c*n where c = 12/log(432) = 1.97744865... - Benoit Cloitre, Dec 18 2002

Extensions

Name clarified by Michel Marcus, Apr 10 2025

A165704 a(n) = a([n/2]) + a([n/3]) + a([n/5]).

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 15, 15, 17, 19, 23, 23, 29, 29, 29, 33, 35, 35, 41, 41, 47, 47, 47, 47, 55, 57, 57, 59, 59, 59, 71, 71, 73, 73, 73, 73, 85, 85, 85, 85, 93, 93, 93, 93, 93, 99, 99, 99, 109, 109, 115, 115, 115, 115, 123, 123, 123, 123, 123, 123, 147, 147, 147, 147, 149
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 26 2009

Keywords

Comments

Record values greater than 1 occur at 5-smooth numbers, n>0: A165705(n)=a(A051037(n)) and A165705(m)A051037(n).

Crossrefs

Showing 1-6 of 6 results.