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.

A036668 Hati numbers: of form 2^i*3^j*k, i+j even, (k,6)=1.

Original entry on oeis.org

1, 4, 5, 6, 7, 9, 11, 13, 16, 17, 19, 20, 23, 24, 25, 28, 29, 30, 31, 35, 36, 37, 41, 42, 43, 44, 45, 47, 49, 52, 53, 54, 55, 59, 61, 63, 64, 65, 66, 67, 68, 71, 73, 76, 77, 78, 79, 80, 81, 83, 85, 89, 91, 92, 95, 96, 97, 99, 100, 101, 102, 103, 107
Offset: 1

Views

Author

N. J. A. Sloane, Antreas P. Hatzipolakis (xpolakis(AT)hol.gr)

Keywords

Comments

If n appears then 2n and 3n do not. - Benoit Cloitre, Jun 13 2002
Closed under multiplication. Each term is a product of a unique subset of {6} U A050376 \ {2,3}. - Peter Munn, Sep 14 2019

Crossrefs

Cf. A003159, A007310, A014601, A036667, A050376, A052330, A325424 (complement), A325498 (first differences), A373136 (characteristic function).
Positions of 0's in A182582.
Subsequences: A084087, A339690, A352272, A352273.

Programs

  • Maple
    N:= 1000: # to get all terms up to N
    A:= {seq(2^i,i=0..ilog2(N))}:
    Ae,Ao:= selectremove(issqr,A):
    Be:= map(t -> seq(t*9^j, j=0 .. floor(log[9](N/t))),Ae):
    Bo:= map(t -> seq(t*3*9^j,j=0..floor(log[9](N/(3*t)))),Ao):
    B:= Be union Bo:
    C1:= map(t -> seq(t*(6*i+1),i=0..floor((N/t -1)/6)),B):
    C2:= map(t -> seq(t*(6*i+5),i=0..floor((N/t - 5)/6)),B):
    A036668:= C1 union C2; # Robert Israel, May 09 2014
  • Mathematica
    a = {1}; Do[AppendTo[a, NestWhile[# + 1 &, Last[a] + 1,
    Apply[Or, Map[MemberQ[a, #] &, Select[Flatten[{#/3, #/2}],
    IntegerQ]]] &]], {150}]; a  (* A036668 *)
    (* Peter J. C. Moses, Apr 23 2019 *)
  • PARI
    twos(n) = {local(r,m);r=0;m=n;while(m%2==0,m=m/2;r++);r}
    threes(n) = {local(r,m);r=0;m=n;while(m%3==0,m=m/3;r++);r}
    isA036668(n) = (twos(n)+threes(n))%2==0 \\ Michael B. Porter, Mar 16 2010
    
  • PARI
    is(n)=(valuation(n,2)+valuation(n,3))%2==0 \\ Charles R Greathouse IV, Sep 10 2015
    
  • PARI
    list(lim)=my(v=List(),N);for(n=0,logint(lim\=1,3),N=if(n%2,2*3^n,3^n); while(N<=lim, forstep(k=N,lim,[4*N,2*N], listput(v,k)); N<<=2)); Set(v) \\ Charles R Greathouse IV, Sep 10 2015
    
  • Python
    from itertools import count
    def A036668(n):
        def f(x):
            c = n+x
            for i in range(x.bit_length()+1):
                i2 = 1<x:
                        break
                    m = x//k
                    c -= (m-1)//6+(m-5)//6+2
            return c
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Jan 28 2025

Formula

a(n) = 12/7 * n + O(log^2 n). - Charles R Greathouse IV, Sep 10 2015
{a(n)} = A052330({A014601(n)}), where {a(n)} denotes the set of integers in the sequence. - Peter Munn, Sep 14 2019

Extensions

Offset changed by Chai Wah Wu, Jan 28 2025

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

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

A334832 Numbers whose squarefree part is congruent to 1 (mod 24).

Original entry on oeis.org

1, 4, 9, 16, 25, 36, 49, 64, 73, 81, 97, 100, 121, 144, 145, 169, 193, 196, 217, 225, 241, 256, 265, 289, 292, 313, 324, 337, 361, 385, 388, 400, 409, 433, 441, 457, 481, 484, 505, 529, 553, 576, 577, 580, 601, 625, 649, 657, 673, 676, 697, 721, 729, 745, 769, 772, 784, 793, 817, 841
Offset: 1

Author

Peter Munn, Jun 15 2020

Keywords

Comments

Closed under multiplication.
The sequence forms a subgroup of the positive integers under the commutative operation A059897(.,.). A059897 has a relevance to squarefree parts that arises from the identity A007913(k*m) = A059897(A007913(k), A007913(m)), where A007913(n) is the squarefree part of n.
The subgroup is one of 8 A059897(.,.) subgroups of the form {k : A007913(k) == 1 (mod m)}. The list seems complete, in anticipation of proof that such sets form subgroups only when m is a divisor of 24 (based on the property described by A. G. Astudillo in A018253). This sequence might be viewed as primitive with respect to the other 7, as the latter correspond to subgroups of its quotient group, in the sense that each one (as a set) is also a union of cosets described below. The 7 include A003159 (m=2), A055047 (m=3), A277549 (m=4), A234000 (m=8) and the trivial A000027 (m=1).
The subgroup has 32 cosets. For each i in {1, 5, 7, 11, 13, 17, 19, 23}, j in {1, 2, 3, 6} there is a coset {n : n = k^2 * (24m + i) * j, k >= 1, m >= 0}. The divisors of 2730 = 2*3*5*7*13 form a transversal. (11, clearly not such a divisor, is in the same coset as 35 = 11 + 24; 17, 19, 23 are in the same cosets as 65, 91, 455 respectively.)
The asymptotic density of this sequence is 1/16. - Amiram Eldar, Mar 08 2021

Examples

			The squarefree part of 26 is 26, which is congruent to 2 (mod 24), so 26 is not in the sequence.
The squarefree part of 292 = 2^2 * 73 is 73, which is congruent to 1 (mod 24), so 292 is in the sequence.
		

Crossrefs

A subgroup under A059897, defined using A007913.
Subsequences: A000290\{0}, A103214, A107008.
Equivalent sequences modulo other members of A018253: A000027 (1), A003159 (2), A055047 (3), A277549 (4), A352272(6), A234000 (8).

Programs

  • Mathematica
    Select[Range[850], Mod[Sqrt[#] /. (c_ : 1)*a_^(b_ : 0) :> (c*a^b)^2, 24] == 1 &] (* Michael De Vlieger, Jun 24 2020 *)
  • PARI
    isok(m) = core(m) % 24 == 1; \\ Peter Munn, Jun 21 2020
    
  • Python
    from sympy import integer_log
    def A334832(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//(i<<(j<<1))-1)//24+1 for i in (9**k for k in range(integer_log(x,9)[0]+1)) for j in range((x//i>>1).bit_length()+1))
        return bisection(f,n,n) # Chai Wah Wu, Mar 21 2025

Formula

{a(n)} = {n : n = k^2 * (24m + 1), k >= 1, m >= 0}.

A352273 Numbers whose squarefree part is congruent to 5 modulo 6.

Original entry on oeis.org

5, 11, 17, 20, 23, 29, 35, 41, 44, 45, 47, 53, 59, 65, 68, 71, 77, 80, 83, 89, 92, 95, 99, 101, 107, 113, 116, 119, 125, 131, 137, 140, 143, 149, 153, 155, 161, 164, 167, 173, 176, 179, 180, 185, 188, 191, 197, 203, 207, 209, 212, 215, 221, 227, 233, 236, 239, 245, 251
Offset: 1

Author

Peter Munn, Mar 10 2022

Keywords

Comments

Numbers of the form 4^i * 9^j * (6k+5), i, j, k >= 0.
1/5 of each multiple of 5 in A352272.
The product of any two terms is in A352272.
The product of a term of this sequence and a term of A352272 is a term of this sequence.
The positive integers are usefully partitioned as {A352272, 2*A352272, 3*A352272, 6*A352272, {a(n)}, 2*{a(n)}, 3*{a(n)}, 6*{a(n)}}. There is a table in the example section giving sequences formed from unions of the parts.
The parts correspond to the cosets of A352272 considered as a subgroup of the positive integers under the operation A059897(.,.). Viewed another way, the parts correspond to the intersection of the integers with the cosets of the multiplicative subgroup of the positive rationals generated by the terms of A352272.
The asymptotic density of this sequence is 1/4. - Amiram Eldar, Apr 03 2022

Examples

			The squarefree part of 11 is 11, which is congruent to 5 (mod 6), so 11 is in the sequence.
The squarefree part of 15 is 15, which is congruent to 3 (mod 6), so 15 is not in the sequence.
The squarefree part of 20 = 2^2 * 5 is 5, which is congruent to 5 (mod 6), so 20 is in the sequence.
The table below lists OEIS sequences that are unions of the cosets described in the initial comments, and indicates the cosets included in each sequence. A352272 (as a subgroup) is denoted H, and this sequence (as a coset) is denoted H/5, in view of its terms being one fifth of the multiples of 5 in A352272.
             H    2H    3H    6H    H/5  2H/5  3H/5  6H/5
A003159      X           X           X           X
A036554            X           X           X           X
.
A007417      X     X                 X     X
A145204\{0}              X     X                 X     X
.
A026225      X           X                 X           X
A026179\{1}        X           X     X           X
.
A036668      X                 X     X                 X
A325424            X     X                 X     X
.
A055047      X                             X
A055048            X                 X
A055041                  X                             X
A055040                        X                 X
.
A189715      X                 X           X     X
A189716            X     X           X                 X
.
A225837      X     X     X     X
A225838                              X     X     X     X
.
A339690      X                       X
A329575                  X                       X
.
A352274      X           X
(The sequence groupings in the table start with the subgroup of the quotient group of H, followed by its cosets.)
		

Crossrefs

Intersection of any three of A003159, A007417, A189716 and A225838.
Intersection of A036668 and A055048.
Complement within A339690 of A352272.
Closure of A084088 under multiplication by 9.
Other subsequences: A033429\{0}, A016969.
Other sequences in the example table: A036554, A145204, A026179, A026225, A325424, A055040, A055041, A055047, A189715, A225837, A329575, A352274.

Programs

  • Mathematica
    q[n_] := Module[{e2, e3}, {e2, e3} = IntegerExponent[n, {2, 3}]; EvenQ[e2] && EvenQ[e3] && Mod[n/2^e2/3^e3, 6] == 5]; Select[Range[250], q] (* Amiram Eldar, Apr 03 2022 *)
  • PARI
    isok(m) = core(m) % 6 == 5;
    
  • Python
    from itertools import count
    def A352273(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):
                i2 = 9**i
                if i2>x: break
                for j in count(0,2):
                    k = i2<x: break
                    c -= (x//k-5)//6+1
            return c
        return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025

Formula

{a(n) : n >= 1} = {m >= 1 : A007913(m) == 5 (mod 6)}.
{a(n) : n >= 1} = A334832/5 U A334832/11 U A334832/17 U A334832/23 where A334832/k denotes {A334832(m)/k : m >= 1, k divides A334832(m)}.
Using the same notation, {a(n) : n >= 1} = A352272/5 = {A307151(A352272(m)) : m >= 1}.
{A225838(n) : n >= 1} = {m : m = a(j)*k, j >= 1, k divides 6}.

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

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}.

A233999 Values of n such that numbers of the form x^2+n*y^2 for some integers x, y cannot have prime factor of 7 raised to an odd power.

Original entry on oeis.org

1, 2, 4, 8, 9, 11, 15, 16, 18, 22, 23, 25, 29, 30, 32, 36, 37, 39, 43, 44, 46, 49, 50, 51, 53, 57, 58, 60, 64, 65, 67, 71, 72, 74, 78, 79, 81, 85, 86, 88, 92, 93, 95, 98, 99, 100, 102, 106, 107, 109, 113, 114, 116, 120, 121, 123, 127, 128, 130, 134, 135, 137, 141, 142, 144, 148, 149
Offset: 1

Author

V. Raman, Dec 18 2013

Keywords

Comments

Equivalently, numbers of the form 49^n*(7m+1), 49^n*(7m+2), or 49^n*(7m+4). [Corrected by Charles R Greathouse IV, Jan 12 2017]
From Peter Munn, Feb 08 2024: (Start)
Numbers whose squarefree part is congruent to a (nonzero) quadratic residue modulo 7.
The integers in a subgroup of the positive rationals under multiplication. As such the sequence is closed under multiplication and - where the result is an integer - under division. The subgroup has index 4 and is generated by the primes congruent to a quadratic residue (1, 2 or 4) modulo 7, the square of 7, and 3 times the other primes; that is a generator corresponding to each prime: 2, 3*3, 3*5, 7^2, 11, 3*13, 3*17, 3*19, 23, 29, 3*31, ... .
(End)

Crossrefs

Numbers whose squarefree part is congruent to a coprime quadratic residue modulo k: A003159 (k=2), A055047 (k=3), A277549 (k=4), A352272 (k=6), A234000 (k=8), A334832 (k=24).
First differs from A047350 by including 49.

Programs

  • PARI
    is(n)=n/=49^valuation(n, 49); n%7==1||n%7==2||n%7==4 \\ Charles R Greathouse IV and V. Raman, Dec 19 2013
    
  • PARI
    is_A233999(n)=bittest(22,n/49^valuation(n, 49)%7) \\ - M. F. Hasler, Jan 02 2014
    
  • PARI
    list(lim)=my(v=List(),t,u); forstep(k=1,lim\=1,[1,2,4], listput(v,k)); for(e=1,logint(lim,49), u=49^e; for(i=1,#v, t=u*v[i]; if(t>lim, break); listput(v,t))); Set(v) \\ Charles R Greathouse IV, Jan 12 2017
    
  • Python
    from sympy import integer_log
    def A233999(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 range(integer_log(x,49)[0]+1):
                m = x//49**i
                c -= (m-1)//7+(m-2)//7+(m-4)//7+3
            return c
        return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025

Formula

a(n) = 16n/7 + O(log n). - Charles R Greathouse IV, Jan 12 2017
Showing 1-6 of 6 results.