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-10 of 20 results. Next

A002473 7-smooth numbers: positive numbers whose prime divisors are all <= 7.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 35, 36, 40, 42, 45, 48, 49, 50, 54, 56, 60, 63, 64, 70, 72, 75, 80, 81, 84, 90, 96, 98, 100, 105, 108, 112, 120, 125, 126, 128, 135, 140, 144, 147, 150, 160, 162, 168, 175, 180, 189, 192
Offset: 1

Views

Author

Keywords

Comments

Also called humble numbers; sometimes also called highly composite numbers, but this usually refers to A002182.
Successive numbers k such that phi(210k) = 48k. - Artur Jasinski, Nov 05 2008
The divisors of 10! (A161466) are a finite subsequence. - Reinhard Zumkeller, Jun 10 2009
Numbers n such that A198487(n) > 0 and A107698(n) > 0. - Jaroslav Krizek, Nov 04 2011
A262401(a(n)) = a(n). - Reinhard Zumkeller, Sep 25 2015
Numbers which are products of single-digit numbers. - N. J. A. Sloane, Jul 02 2017
Phi(a(n)) is 7-smooth. In fact, the Euler Phi function applied to p-smooth numbers, for any prime p, is p-smooth. - Richard Locke Peterson, May 09 2020
Also those integers k, such that, for every prime p > 5, p^(12k) - 1 == 0 (mod 5040k). - Federico Provvedi, Jun 06 2022
The nonprimes with this property are all terms except for 2, 3, 5 and 7, i.e.: (1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 35, 36, 40, 42, 45, ...); the composite terms are all but the first one of this subsequence. ["Trivial" data provided mainly for search purpose.] - M. F. Hasler, Jun 06 2023

References

  • B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 52.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A080672, complement of A068191. Subsequences: A003591, A003594, A003595, A195238, A059405.
Not the same as A063938. For p-smooth numbers with other values of p, see A003586, A051037, A051038, A080197, A080681, A080682, A080683.
Cf. A002182, A067374, A210679, A238985 (zeroless terms), A006530.
Cf. A262401.

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, fromList, union)
    a002473 n = a002473_list !! (n-1)
    a002473_list = f $ singleton 1 where
       f s = x : f (s' `union` fromList (map (* x) [2,3,5,7]))
             where (x, s') = deleteFindMin s
    -- Reinhard Zumkeller, Mar 08 2014, Apr 02 2012, Apr 01 2012
    
  • Magma
    [n: n in [1..200] | PrimeDivisors(n) subset PrimesUpTo(7)]; // Bruno Berselli, Sep 24 2012
    
  • Mathematica
    Select[Range[250], Max[Transpose[FactorInteger[ # ]][[1]]]<=7&]
    aa = {}; Do[If[EulerPhi[210 n] == 48 n, AppendTo[aa, n]], {n, 1, 1200}]; aa (* Artur Jasinski, Nov 05 2008 *)
    mxExp = 8; Select[Union[Times @@@ Flatten[Table[Tuples[{2, 3, 5, 7}, n], {n, mxExp}], 1]], # <= 2^mxExp &] (* Harvey P. Dale, Aug 13 2012 *)
    mx = 200; Sort@ Flatten@ Table[ 2^i*3^j*5^k*7^l, {i, 0, Log[2, mx]}, {j, 0, Log[3, mx/2^i]}, {k, 0, Log[5, mx/(2^i*3^j)]}, {l, 0, Log[7, mx/(2^i*3^j*5^k)]}] (* Robert G. Wilson v, Aug 17 2012 *)
  • PARI
    test(n)=m=n; forprime(p=2,7, while(m%p==0,m=m/p)); return(m==1)
    for(n=1,200,if(test(n),print1(n",")))
    
  • PARI
    is_A002473(n)=n<11||vecmax(factor(n,8)[,1])<8 \\ M. F. Hasler, Jan 16 2015
    
  • PARI
    list(lim)=my(v=List(),t); for(a=0,logint(lim\1,7), for(b=0,logint(lim\7^a,5), for(c=0,logint(lim\7^a\5^b,3), t=3^c*5^b*7^a; while(t<=lim, listput(v,t); t<<=1)))); Set(v) \\ Charles R Greathouse IV, Feb 22 2017
    
  • Python
    import heapq
    from itertools import islice
    from sympy import primerange
    def A002473gen(p=7): # generate all p-smooth terms
        v, oldv, h, psmooth_primes, = 1, 0, [1], list(primerange(1, p+1))
        while True:
            v = heapq.heappop(h)
            if v != oldv:
                yield v
                oldv = v
                for p in psmooth_primes:
                    heapq.heappush(h, v*p)
    print(list(islice(A002473gen(), 65))) # Michael S. Branicky, Nov 19 2022
    
  • Python
    from sympy import integer_log
    def A002473(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c = n+x
            for i in range(integer_log(x,7)[0]+1):
                i7 = 7**i
                m = x//i7
                for j in range(integer_log(m,5)[0]+1):
                    j5 = 5**j
                    r = m//j5
                    for k in range(integer_log(r,3)[0]+1):
                        c -= (r//3**k).bit_length()
            return c
        return bisection(f,n,n) # Chai Wah Wu, Sep 16 2024

Formula

A006530(a(n)) <= 7. - Reinhard Zumkeller, Apr 01 2012
Sum_{n>=1} 1/a(n) = Product_{primes p <= 7} p/(p-1) = (2*3*5*7)/(1*2*4*6) = 35/8. - Amiram Eldar, Sep 22 2020

Extensions

More terms from James Sellers, Dec 23 1999
Additional comments from Michel Lecomte, Jun 09 2007
Edited by M. F. Hasler, Jan 16 2015

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

A036561 Nicomachus triangle read by rows, T(n, k) = 2^(n - k)*3^k, for 0 <= k <= n.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 8, 12, 18, 27, 16, 24, 36, 54, 81, 32, 48, 72, 108, 162, 243, 64, 96, 144, 216, 324, 486, 729, 128, 192, 288, 432, 648, 972, 1458, 2187, 256, 384, 576, 864, 1296, 1944, 2916, 4374, 6561, 512, 768, 1152, 1728, 2592, 3888, 5832, 8748, 13122, 19683
Offset: 0

Views

Author

Keywords

Comments

The triangle pertaining to this sequence has the property that every row, every column and every diagonal contains a nontrivial geometric progression. More interestingly every line joining any two elements contains a nontrivial geometric progression. - Amarnath Murthy, Jan 02 2002
Kappraff states (pp. 148-149): "I shall refer to this as Nicomachus' table since an identical table of numbers appeared in the Arithmetic of Nicomachus of Gerasa (circa 150 A.D.)" The table was rediscovered during the Italian Renaissance by Leon Battista Alberti, who incorporated the numbers in dimensions of his buildings and in a system of musical proportions. Kappraff states "Therefore a room could exhibit a 4:6 or 6:9 ratio but not 4:9. This ensured that ratios of these lengths would embody musical ratios". - Gary W. Adamson, Aug 18 2003
After Nichomachus and Alberti several Renaissance authors described this table. See for instance Pierre de la Ramée in 1569 (facsimile of a page of his Arithmetic Treatise in Latin in the links section). - Olivier Gérard, Jul 04 2013
The triangle sums, see A180662 for their definitions, link Nicomachus's table with eleven different sequences, see the crossrefs. It is remarkable that these eleven sequences can be described with simple elegant formulas. The mirror of this triangle is A175840. - Johannes W. Meijer, Sep 22 2010
The diagonal sums Sum_{k} T(n - k, k) give A167762(n + 2). - Michael Somos, May 28 2012
Where d(n) is the divisor count function, then d(T(i,j)) = A003991, the rows of which sum to the tetrahedral numbers A000292(n+1). For example, the sum of the divisors of row 4 of this triangle (i = 4), gives d(16) + d(24) + d(36) + d(54) + d(81) = 5 + 8 + 9 + 8 + 5 = 35 = A000292(5). In fact, where p and q are distinct primes, the aforementioned relationship to the divisor function and tetrahedral numbers can be extended to any triangle of numbers in which the i-th row is of form {p^(i-j)*q^j, 0<=j<=i}; i >= 0 (e.g., A003593, A003595). - Raphie Frank, Nov 18 2012, corrected Dec 07 2012
Sequence (or tree) generated by these rules: 1 is in S, and if x is in S, then 2*x and 3*x are in S, and duplicates are deleted as they occur; see A232559. - Clark Kimberling, Nov 28 2013
Partial sums of rows produce Stirling numbers of the 2nd kind: A000392(n+2) = Sum_{m=1..(n^2+n)/2} a(m). - Fred Daniel Kline, Sep 22 2014
A permutation of A003586. - L. Edson Jeffery, Sep 22 2014
Form a word of length i by choosing a (possibly empty) word on alphabet {0,1} then concatenating a word of length j on alphabet {2,3,4}. T(i,j) is the number of such words. - Geoffrey Critzer, Jun 23 2016
Form of Zorach additive triangle (see A035312) where each number is sum of west and northwest numbers, with the additional condition that each number is GCD of the two numbers immediately below it. - Michel Lagneau, Dec 27 2018

Examples

			The start of the sequence as a triangular array read by rows:
   1
   2   3
   4   6   9
   8  12  18  27
  16  24  36  54  81
  32  48  72 108 162 243
  ...
The start of the sequence as a table T(n,k) n, k > 0:
    1    2    4    8   16   32 ...
    3    6   12   24   48   96 ...
    9   18   36   72  144  288 ...
   27   54  108  216  432  864 ...
   81  162  324  648 1296 2592 ...
  243  486  972 1944 3888 7776 ...
  ...
- _Boris Putievskiy_, Jan 08 2013
		

References

  • Jay Kappraff, Beyond Measure, World Scientific, 2002, p. 148.
  • Flora R. Levin, The Manual of Harmonics of Nicomachus the Pythagorean, Phanes Press, 1994, p. 114.

Crossrefs

Cf. A001047 (row sums), A000400 (central terms), A013620, A007318.
Triangle sums (see the comments): A001047 (Row1); A015441 (Row2); A005061 (Kn1, Kn4); A016133 (Kn2, Kn3); A016153 (Fi1, Fi2); A016140 (Ca1, Ca4); A180844 (Ca2, Ca3); A180845 (Gi1, Gi4); A180846 (Gi2, Gi3); A180847 (Ze1, Ze4); A016185 (Ze2, Ze3). - Johannes W. Meijer, Sep 22 2010, Sep 10 2011
Antidiagonal cumulative sum: A000392; square arrays cumulative sum: A160869. Antidiagonal products: 6^A000217; antidiagonal cumulative products: 6^A000292; square arrays products: 6^A005449; square array cumulative products: 6^A006002.

Programs

  • Haskell
    a036561 n k = a036561_tabf !! n !! k
    a036561_row n = a036561_tabf !! n
    a036561_tabf = iterate (\xs@(x:_) -> x * 2 : map (* 3) xs) [1]
    -- Reinhard Zumkeller, Jun 08 2013
    
  • Magma
    /* As triangle: */ [[(2^(i-j)*3^j)/3: j in [1..i]]: i in [1..10]]; // Vincenzo Librandi, Oct 17 2014
  • Maple
    A036561 := proc(n,k): 2^(n-k)*3^k end:
    seq(seq(A036561(n,k),k=0..n),n=0..9);
    T := proc(n,k) option remember: if k=0 then 2^n elif k>=1 then procname(n,k-1) + procname(n-1,k-1) fi: end: seq(seq(T(n,k),k=0..n),n=0..9);
    # Johannes W. Meijer, Sep 22 2010, Sep 10 2011
  • Mathematica
    Flatten[Table[ 2^(i-j) 3^j, {i, 0, 12}, {j, 0, i} ]] (* Flatten added by Harvey P. Dale, Jun 07 2011 *)
  • PARI
    for(i=0,9,for(j=0,i,print1(3^j<<(i-j)", "))) \\ Charles R Greathouse IV, Dec 22 2011
    
  • PARI
    {T(n, k) = if( k<0 || k>n, 0, 2^(n - k) * 3^k)} /* Michael Somos, May 28 2012 */
    

Formula

T(n,k) = A013620(n,k)/A007318(n,k). - Reinhard Zumkeller, May 14 2006
T(n,k) = T(n,k-1) + T(n-1,k-1) for n>=1 and 1<=k<=n with T(n,0) = 2^n for n>=0. - Johannes W. Meijer, Sep 22 2010
T(n,k) = 2^(k-1)*3^(n-1), n, k > 0 read by antidiagonals. - Boris Putievskiy, Jan 08 2013
a(n) = 2^(A004736(n)-1)*3^(A002260(n)-1), n > 0, or a(n) = 2^(j-1)*3^(i-1) n > 0, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor[(-1+sqrt(8*n-7))/2]. - Boris Putievskiy, Jan 08 2013
G.f.: 1/((1-2x)(1-3yx)). - Geoffrey Critzer, Jun 23 2016
T(n,k) = (-1)^n * Sum_{q=0..n} (-1)^q * C(k+3*q, q) * C(n+2*q, n-q). - Marko Riedel, Jul 01 2024

A003591 Numbers of form 2^i*7^j, with i, j >= 0.

Original entry on oeis.org

1, 2, 4, 7, 8, 14, 16, 28, 32, 49, 56, 64, 98, 112, 128, 196, 224, 256, 343, 392, 448, 512, 686, 784, 896, 1024, 1372, 1568, 1792, 2048, 2401, 2744, 3136, 3584, 4096, 4802, 5488, 6272, 7168, 8192, 9604, 10976, 12544, 14336, 16384, 16807, 19208, 21952, 25088
Offset: 1

Views

Author

Keywords

Comments

A204455(7*a(n)) = 7, and only for these numbers. - Wolfdieter Lang, Feb 04 2012

Crossrefs

Programs

  • GAP
    Filtered([1..30000],n->PowerMod(14,n,n)=0); # Muniru A Asiru, Mar 19 2019
    
  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a003591 n = a003591_list !! (n-1)
    a003591_list = f $ singleton 1 where
       f s = y : f (insert (2 * y) $ insert (7 * y) s')
                   where (y, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 16 2015
    
  • Magma
    [n: n in [1..26000] | PrimeDivisors(n) subset [2,7]]; // Bruno Berselli, Sep 24 2012
    
  • Mathematica
    fQ[n_] := PowerMod[14,n,n]==0; Select[Range[30000], fQ] (* Vincenzo Librandi, Feb 04 2012 *)
  • PARI
    list(lim)=my(v=List(),N);for(n=0,log(lim)\log(7),N=7^n;while(N<=lim,listput(v,N);N<<=1));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
    
  • PARI
    isA003591(n)=n>>=valuation(n,2);ispower(n,,&n);n==1||n==7 \\ Charles R Greathouse IV, Jun 28 2011
    
  • Python
    from sympy import integer_log
    def A003591(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: 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//7**i).bit_length() for i in range(integer_log(x,7)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Sep 16 2024

Formula

The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} mu(14*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
Sum_{n>=1} 1/a(n) = (2*7)/((2-1)*(7-1)) = 7/3. - Amiram Eldar, Sep 22 2020
a(n) ~ exp(sqrt(2*log(2)*log(7)*n)) / sqrt(14). - Vaclav Kotesovec, Sep 22 2020
a(n) = 2^A025637(n) *7^A025664(n). - R. J. Mathar, Jul 06 2025

A003594 Numbers of the form 3^i*7^j with i, j >= 0.

Original entry on oeis.org

1, 3, 7, 9, 21, 27, 49, 63, 81, 147, 189, 243, 343, 441, 567, 729, 1029, 1323, 1701, 2187, 2401, 3087, 3969, 5103, 6561, 7203, 9261, 11907, 15309, 16807, 19683, 21609, 27783, 35721, 45927, 50421, 59049, 64827, 83349, 107163, 117649
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • GAP
    Filtered([1..120000],n->PowerMod(21,n,n)=0); # Muniru A Asiru, Mar 19 2019
    
  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a003594 n = a003594_list !! (n-1)
    a003594_list = f $ singleton 1 where
       f s = y : f (insert (3 * y) $ insert (7 * y) s')
                   where (y, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 16 2015
    
  • Magma
    [n: n in [1..120000] | PrimeDivisors(n) subset [3,7]]; // Bruno Berselli, Sep 24 2012
    
  • Mathematica
    f[upto_]:=Sort[Select[Flatten[3^First[#] 7^Last[#] & /@ Tuples[{Range[0, Floor[Log[3, upto]]], Range[0, Floor[Log[7, upto]]]}]], # <= upto &]]; f[120000]  (* Harvey P. Dale, Mar 04 2011 *)
    fQ[n_] := PowerMod[21, n, n] == 0; Select[Range[120000], fQ] (* Bruno Berselli, Sep 24 2012 *)
  • PARI
    list(lim)=my(v=List(),N);for(n=0,log(lim)\log(7),N=7^n;while(N<=lim,listput(v,N);N*=3));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
    
  • Python
    from sympy import integer_log
    def A003594(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: 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(integer_log(x//7**i,3)[0]+1 for i in range(integer_log(x,7)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Sep 16 2024

Formula

The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} mu(21*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
Sum_{n>=1} 1/a(n) = (3*7)/((3-1)*(7-1)) = 7/4. - Amiram Eldar, Sep 22 2020
a(n) ~ exp(sqrt(2*log(3)*log(7)*n)) / sqrt(21). - Vaclav Kotesovec, Sep 22 2020
a(n) = 3^A025642(n) * 7^A025665(n). - R. J. Mathar, Jul 06 2025

A108090 Numbers of the form (11^i)*(13^j).

Original entry on oeis.org

1, 11, 13, 121, 143, 169, 1331, 1573, 1859, 2197, 14641, 17303, 20449, 24167, 28561, 161051, 190333, 224939, 265837, 314171, 371293, 1771561, 2093663, 2474329, 2924207, 3455881, 4084223, 4826809, 19487171, 23030293, 27217619
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Jun 03 2005

Keywords

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a108090 n = a108090_list !! (n-1)
    a108090_list = f $ singleton (1,0,0) where
       f s = y : f (insert (11 * y, i + 1, j) $ insert (13 * y, i, j + 1) s')
             where ((y, i, j), s') = deleteFindMin s
    -- Reinhard Zumkeller, May 15 2015
    
  • Magma
    [n: n in [1..10^7] | PrimeDivisors(n) subset [11, 13]]; // Vincenzo Librandi, Jun 27 2016
    
  • Mathematica
    mx = 3*10^7; Sort@ Flatten@ Table[ 11^i*13^j, {i, 0, Log[11, mx]}, {j, 0, Log[13, mx/11^i]}] (* Robert G. Wilson v, Aug 17 2012 *)
    fQ[n_]:=PowerMod[143, n, n] == 0; Select[Range[2 10^7], fQ] (* Vincenzo Librandi, Jun 27 2016 *)
  • PARI
    list(lim)=my(v=List(),t); for(j=0,logint(lim\=1,13), t=13^j; while(t<=lim, listput(v,t); t*=11)); Set(v) \\ Charles R Greathouse IV, Aug 29 2016
    
  • Python
    from sympy import integer_log
    def A108090(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(integer_log(x//13**i,11)[0]+1 for i in range(integer_log(x,13)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Mar 25 2025

Formula

Sum_{n>=1} 1/a(n) = (11*13)/((11-1)*(13-1)) = 143/120. - Amiram Eldar, Sep 23 2020
a(n) ~ exp(sqrt(2*log(11)*log(13)*n)) / sqrt(143). - Vaclav Kotesovec, Sep 23 2020

A033851 Numbers whose prime factors are 5 and 7.

Original entry on oeis.org

35, 175, 245, 875, 1225, 1715, 4375, 6125, 8575, 12005, 21875, 30625, 42875, 60025, 84035, 109375, 153125, 214375, 300125, 420175, 546875, 588245, 765625, 1071875, 1500625, 2100875, 2734375, 2941225, 3828125, 4117715, 5359375, 7503125
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that phi(k)/k == 24/35. - Artur Jasinski, Nov 09 2008
Subsequence of A143202. - Reinhard Zumkeller, Sep 13 2011

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a033851 n = a033851_list !! (n-1)
    a033851_list = f (singleton (5*7)) where
       f s = m : f (insert (5*m) $ insert (7*m) s') where
         (m,s') = deleteFindMin s
    -- Reinhard Zumkeller, Sep 13 2011
  • Mathematica
    a = {}; Do[If[EulerPhi[x]/x == 24/35, AppendTo[a, x]], {x, 1, 10000}]; a (* Artur Jasinski, Nov 09 2008 *)
    Take[With[{nn=10},Sort[Flatten[Table[5^i 7^j,{i,nn},{j,nn}]]]],40] (* Harvey P. Dale, Feb 09 2013 *)

Formula

a(n) = 35*A003595(n). - Artur Jasinski, Nov 09 2008
A143201(a(n)) = 3. - Reinhard Zumkeller, Sep 13 2011
Sum_{n>=1} 1/a(n) = 1/24. - Amiram Eldar, Dec 22 2020

Extensions

Offset fixed by Reinhard Zumkeller, Sep 13 2011

A107326 Numbers of the form (2^i)*(13^j).

Original entry on oeis.org

1, 2, 4, 8, 13, 16, 26, 32, 52, 64, 104, 128, 169, 208, 256, 338, 416, 512, 676, 832, 1024, 1352, 1664, 2048, 2197, 2704, 3328, 4096, 4394, 5408, 6656, 8192, 8788, 10816, 13312, 16384, 17576, 21632, 26624, 28561, 32768, 35152, 43264, 53248, 57122
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), May 21 2005

Keywords

Comments

A204455(13*a(n)) = 13, and only for these numbers. - Wolfdieter Lang, Feb 04 2012

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PowerMod[26,n,n]==0; Select[Range[60000],fQ] (* Vincenzo Librandi, Feb 04 2012 *)
    mx = 60000; Sort@ Flatten@ Table[2^i*13^j, {i, 0, Log[2, mx]}, {j, 0, Log[13, mx/2^i]}] (* Robert G. Wilson v, Aug 17 2012 *)
  • PARI
    list(lim)=my(v=List(),N); for(n=0,log(lim)\log(13),N=13^n; while(N<=lim,listput(v,N);N<<=1)); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011

Formula

Sum_{n>=1} 1/a(n) = (2*13)/((2-1)*(13-1)) = 13/6. - Amiram Eldar, Sep 23 2020
a(n) ~ exp(sqrt(2*log(2)*log(13)*n)) / sqrt(26). - Vaclav Kotesovec, Sep 23 2020

A107364 Numbers of the form (3^i)*(13^j).

Original entry on oeis.org

1, 3, 9, 13, 27, 39, 81, 117, 169, 243, 351, 507, 729, 1053, 1521, 2187, 2197, 3159, 4563, 6561, 6591, 9477, 13689, 19683, 19773, 28431, 28561, 41067, 59049, 59319, 85293, 85683, 123201, 177147, 177957, 255879, 257049, 369603, 371293, 531441
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), May 23 2005

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..10^7] | PrimeDivisors(n) subset [3, 13]]; // Vincenzo Librandi, Jun 27 2016
  • Mathematica
    mx = 540000; Sort@ Flatten@ Table[3^i*13^j, {i, 0, Log[3, mx]}, {j, 0, Log[13, mx/3^i]}] (* Robert G. Wilson v, Aug 17 2012 *)
    fQ[n_]:=PowerMod[39, n, n] == 0; Select[Range[2 10^7], fQ] (* Vincenzo Librandi, Jun 27 2016 *)
  • PARI
    list(lim)=my(v=List(),N);for(n=0,log(lim)\log(13),N=13^n;while(N<=lim,listput(v,N);N*=3));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
    

Formula

Sum_{n>=1} 1/a(n) = (3*13)/((3-1)*(13-1)) = 13/8. - Amiram Eldar, Sep 23 2020
a(n) ~ exp(sqrt(2*log(3)*log(13)*n)) / sqrt(39). - Vaclav Kotesovec, Sep 23 2020

A107466 Numbers of the form (5^i)*(13^j).

Original entry on oeis.org

1, 5, 13, 25, 65, 125, 169, 325, 625, 845, 1625, 2197, 3125, 4225, 8125, 10985, 15625, 21125, 28561, 40625, 54925, 78125, 105625, 142805, 203125, 274625, 371293, 390625, 528125, 714025, 1015625, 1373125, 1856465, 1953125, 2640625
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), May 27 2005

Keywords

Crossrefs

Programs

  • Mathematica
    mx = 2700000; Sort@ Flatten@ Table[5^i*13^j, {i, 0, Log[5, mx]}, {j, 0, Log[13, mx/5^i]}] (* Robert G. Wilson v, Aug 17 2012 *)
  • PARI
    list(lim)=my(v=List(),N);for(n=0,log(lim)\log(13),N=13^n;while(N<=lim,listput(v,N);N*=5));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
    
  • Python
    from sympy import integer_log
    def A107466(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(integer_log(x//13**i,5)[0]+1 for i in range(integer_log(x,13)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Mar 25 2025

Formula

Sum_{n>=1} 1/a(n) = (5*13)/((5-1)*(13-1)) = 65/48. - Amiram Eldar, Sep 23 2020
a(n) ~ exp(sqrt(2*log(5)*log(13)*n)) / sqrt(65). - Vaclav Kotesovec, Sep 23 2020
Showing 1-10 of 20 results. Next