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.

A225837 Numbers of form 2^i*3^j*(6k+1), i, j, k >= 0.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 12, 13, 14, 16, 18, 19, 21, 24, 25, 26, 27, 28, 31, 32, 36, 37, 38, 39, 42, 43, 48, 49, 50, 52, 54, 55, 56, 57, 61, 62, 63, 64, 67, 72, 73, 74, 75, 76, 78, 79, 81, 84, 85, 86, 91, 93, 96, 97, 98, 100, 103, 104, 108, 109, 110, 111, 112
Offset: 1

Views

Author

Ralf Stephan, May 16 2013

Keywords

Comments

The asymptotic density of this sequence is 1/2. - Amiram Eldar, Apr 03 2022
From Peter Munn, Nov 16 2023: (Start)
Contains all nonzero squares.
Dividing by 5 the terms that are multiples of 5 gives its complement, A225838.
(A352272, 2*A352272, 3*A352272, 6*A352272) is a partition of the terms.
The terms form a subgroup of the positive integers under the operation A059897(.,.) and are the positive integers in an index 2 multiplicative subgroup of rationals that is generated by 2, 3 and integers congruent to 1 modulo 6. See A225857 and A352272 for further information about such subgroups.
(End)

Crossrefs

Complement of A225838.
Subsequences: A003136\{0}, A083854\{0}, A260488\{0}, A352272.
Symmetric difference of A026225 and A036554; of A036668 and A189716.

Programs

  • Magma
    [n: n in [1..200] | IsOne(d mod 6) where d is n div (2^Valuation(n,2)*3^Valuation(n,3))]; // Bruno Berselli, May 16 2013
    
  • Mathematica
    mx = 122; t = {}; Do[n = 2^i*3^j (6 k + 1); If[n <= mx, AppendTo[t, n]], {i, 0, Log[2, mx]}, {j, 0, Log[3, mx]}, {k, 0, mx/6}]; Union[t] (* T. D. Noe, May 16 2013 *)
  • PARI
    for(n=1,200,t=n/(2^valuation(n,2)*3^valuation(n,3));if((t%6==1),print1(n,",")))
    
  • Python
    from sympy import integer_log
    def A225837(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//3**i>>j)+5)//6 for i in range(integer_log(x,3)[0]+1) for j in range((x//3**i).bit_length()))
        return bisection(f,n,n) # Chai Wah Wu, Feb 02 2025