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.

A352274 Numbers whose squarefree part is congruent to 1 modulo 6 or 3 modulo 18.

Original entry on oeis.org

1, 3, 4, 7, 9, 12, 13, 16, 19, 21, 25, 27, 28, 31, 36, 37, 39, 43, 48, 49, 52, 55, 57, 61, 63, 64, 67, 73, 75, 76, 79, 81, 84, 85, 91, 93, 97, 100, 103, 108, 109, 111, 112, 115, 117, 121, 124, 127, 129, 133, 139, 144, 145, 147, 148, 151, 156, 157, 163, 165, 169, 171, 172
Offset: 1

Views

Author

Peter Munn, Mar 10 2022

Keywords

Comments

Numbers of the form 4^i * 3^j * (6k+1), i, j, k >= 0. Numbers whose prime factorization has an even number of factors of 2 and an even number of factors of the form 6k+5 (therefore also an even number of factors of the form 3k+2).
Closed under multiplication.
Includes the nonzero Loeschian numbers (A003136). The two sequences have few early differences (the first extra number here is a(22) = 55, followed by 85, 115, 145, ...), but their densities diverge progressively, driven by the presence here - and absence from A003136 - of the nonsquare terms of A108166. Asymptotic densities are 1/3 and 0 respectively.
Term by term, the sequence is one half of its complement within A225837.

Examples

			4 = 2^2 has square part 2^2, therefore squarefree part 4/2^2 = 1, which is congruent to 1 mod 6, so 4 is in the sequence.
63 = 3^2 * 7 has square part 3^2, therefore squarefree part 63/3^2 = 7, which is congruent to 1 mod 6, so 63 is in the sequence.
21 = 3*7 has square part 1^2 and squarefree part 21, which is congruent to 3 mod 18, so 21 is in the sequence.
72 = 2^3 * 3^2 has square part 2^2 * 3^2 = 6^2, therefore squarefree part 72/6^2 = 2, which is congruent to 2 mod 6 and to 2 mod 18, so 72 is not in the sequence.
		

Crossrefs

Intersection of any two of A003159, A026225 and A225837.
Closure of A084089 under multiplication by 3.
Cf. A007913.
Subsequences: A003136\{0}, A108166, A352272.

Programs

  • PARI
    isok(m) = core(m) % 6 == 1 || core(m) % 18 == 3;
    
  • Python
    from itertools import count
    def A352274(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):
            c = n+x
            for i in count(0,2):
                i2 = 1<x:
                    break
                for j in count(0):
                    k = i2*3**j
                    if k>x:
                        break
                    c -= (x//k-1)//6+1
            return c
        return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025

Formula

{a(n): n >= 1} = {m >= 1 : A007913(m) == 1 (mod 6)} U {m >= 1 : A007913(m) == 3 (mod 18)} = {A352272(m): m >= 1} U {3*A352272(m): m >= 1}.
{A225837(n): n >= 1} = {a(m): m >= 1} U {2*a(m): m >= 1}.