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.

A055047 Numbers of the form 9^i*(3*j+1).

Original entry on oeis.org

1, 4, 7, 9, 10, 13, 16, 19, 22, 25, 28, 31, 34, 36, 37, 40, 43, 46, 49, 52, 55, 58, 61, 63, 64, 67, 70, 73, 76, 79, 81, 82, 85, 88, 90, 91, 94, 97, 100, 103, 106, 109, 112, 115, 117, 118, 121, 124, 127, 130, 133, 136, 139, 142, 144, 145, 148, 151, 154, 157, 160, 163
Offset: 1

Views

Author

N. J. A. Sloane, Jun 01 2000

Keywords

Comments

The numbers not of the form 2x^2+3y^2+3z^2.
Also values of n such that numbers of the form x^2+n*y^2 for some integers x, y cannot have prime factor of 3 raised to an odd power. - V. Raman, Dec 18 2013
Numbers whose squarefree part is congruent to 1 modulo 3. - Peter Munn, May 17 2020

Crossrefs

Intersection of A007417 and A189715.
Complement of A055048 with respect to A007417.
Complement of A055040 with respect to A189715.

Programs

  • Mathematica
    A055047Q[k_] := Mod[k/9^IntegerExponent[k, 9], 3] == 1;
    Select[Range[300], A055047Q] (* Paolo Xausa, Mar 20 2025 *)
  • PARI
    is(n)=n/=9^valuation(n,9); n%3==1 \\ Charles R Greathouse IV and V. Raman, Dec 19 2013
    
  • Python
    from sympy import integer_log
    def A055047(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//9**i-1)//3+1 for i in range(integer_log(x,9)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025

Formula

a(n) = 8n/3 + O(log n). - Charles R Greathouse IV, Dec 19 2013
a(n) = A055041(n)/3. - Peter Munn, May 17 2020

A189716 Numbers k such that A156595(k-1) = 1; complement of A189715.

Original entry on oeis.org

2, 3, 5, 8, 11, 12, 14, 17, 18, 20, 21, 23, 26, 27, 29, 30, 32, 35, 38, 39, 41, 44, 45, 47, 48, 50, 53, 56, 57, 59, 62, 65, 66, 68, 71, 72, 74, 75, 77, 80, 83, 84, 86, 89, 92, 93, 95, 98, 99, 101, 102, 104, 107, 108, 110, 111, 113, 116, 119, 120, 122, 125, 126, 128, 129, 131, 134, 137, 138, 140, 143, 146, 147, 149, 152, 153, 155, 156, 158
Offset: 1

Views

Author

Clark Kimberling, Apr 26 2011

Keywords

Comments

See A156595.
Numbers whose squarefree part is congruent modulo 9 to 2, 3, 5 or 8. - Peter Munn, May 17 2020
The asymptotic density of this sequence is 1/2. - Amiram Eldar, Mar 08 2021

Crossrefs

Programs

  • Mathematica
    (See A189715.)
    f[p_, e_] := (p^Mod[e, 2]); sqfpart[n_] := Times @@ f @@@ FactorInteger[n]; Select[Range[160], MemberQ[{2, 3, 5, 8}, Mod[sqfpart[#], 9]] &] (* Amiram Eldar, Mar 08 2021 *)
  • Python
    from sympy import integer_log
    def A189716(n):
        def f(x): return n+x-sum(((m:=x//9**i)-2)//9+(m-5)//9+(m-8)//9+(m-3)//9+4 for i in range(integer_log(x,9)[0]+1))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Feb 15 2025

Extensions

Name enhanced by Peter Munn, May 17 2020

A055041 Numbers of the form 3^(2i+1)*(3*j+1).

Original entry on oeis.org

3, 12, 21, 27, 30, 39, 48, 57, 66, 75, 84, 93, 102, 108, 111, 120, 129, 138, 147, 156, 165, 174, 183, 189, 192, 201, 210, 219, 228, 237, 243, 246, 255, 264, 270, 273, 282, 291, 300, 309, 318, 327, 336, 345, 351, 354, 363, 372, 381, 390, 399
Offset: 1

Views

Author

N. J. A. Sloane, Jun 01 2000

Keywords

Comments

The numbers not of the form x^2+y^2+6z^2.
Numbers whose squarefree part is congruent to 3 modulo 9. Compare with A329575. - Peter Munn, May 17 2020
The asymptotic density of this sequence is 1/8. - Amiram Eldar, Mar 08 2021

Crossrefs

Intersection of A145204 and A189716.
Complement of A055040 with respect to A145204\{0}.
Complement of A055048 with respect to A189716.

Programs

  • Mathematica
    f[p_, e_] := (p^Mod[e, 2]); sqfpart[n_] := Times @@ f @@@ FactorInteger[n]; Select[Range[400], Mod[sqfpart[#], 9] == 3 &] (* Amiram Eldar, Mar 08 2021 *)
  • Python
    from sympy import integer_log
    def A055041(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//9**i-1)//3+1 for i in range(integer_log(x,9)[0]+1))
        return bisection(f,n,n)*3 # Chai Wah Wu, Feb 14 2025

Formula

a(n) = A055047(n) * 3. - Peter Munn, May 17 2020

A055040 Numbers of the form 3^(2i+1)*(3*j+2).

Original entry on oeis.org

6, 15, 24, 33, 42, 51, 54, 60, 69, 78, 87, 96, 105, 114, 123, 132, 135, 141, 150, 159, 168, 177, 186, 195, 204, 213, 216, 222, 231, 240, 249, 258, 267, 276, 285, 294, 297, 303, 312, 321, 330, 339, 348, 357, 366, 375, 378, 384, 393, 402, 411
Offset: 1

Views

Author

N. J. A. Sloane, Jun 01 2000

Keywords

Comments

Numbers not of the form x^2+y^2+3z^2.
Numbers whose squarefree part is congruent to 6 modulo 9. - Peter Munn, May 17 2020
The asymptotic density of this sequence is 1/8. - Amiram Eldar, Mar 08 2021

Crossrefs

Equals 3*A055048(n).
Intersection of A145204 and A189715.
Complement of A055041 with respect to A145204\{0}.
Complement of A055047 with respect to A189715.
Cf. A007913.

Programs

  • Haskell
    a055040 n = a055040_list !! (n-1)
    a055040_list = map (* 3) a055048_list
    -- Reinhard Zumkeller, Apr 07 2012
    
  • Mathematica
    max = 500; Select[ Union[ Flatten[ Table[3^(2*i + 1)*(3*j + 2), {i, 0, Ceiling[ Log[max/6]/Log[9]]}, {j, 0, Ceiling[(max/9^i - 6)/9]}]]], # <= max &] (* Jean-François Alcover, Oct 13 2011 *)
  • Python
    from sympy import integer_log
    def A055040(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//9**i-2)//3+1 for i in range(integer_log(x,9)[0]+1))
        return bisection(f,n,n)*3 # Chai Wah Wu, Feb 14 2025

Formula

G.f.: [x(x+2)(x^2+x+1)(x^7+x^3+1)]/(x^11-x^10-x+1) (conjectured).

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

Views

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

A319293 Numbers of the form 27^i*(9*j +- 1).

Original entry on oeis.org

1, 8, 10, 17, 19, 26, 27, 28, 35, 37, 44, 46, 53, 55, 62, 64, 71, 73, 80, 82, 89, 91, 98, 100, 107, 109, 116, 118, 125, 127, 134, 136, 143, 145, 152, 154, 161, 163, 170, 172, 179, 181, 188, 190, 197, 199, 206, 208, 215, 216, 217, 224, 226, 233, 235, 242, 244
Offset: 1

Views

Author

Jianing Song, Sep 16 2018

Keywords

Comments

{+-a(n)} gives all nonzero cubes modulo all powers of 3, that is, cubes over 3-adic integers. So this sequence is closed under multiplication.

Crossrefs

A056020 is a proper subsequence.
Perfect powers over 3-adic integers:
Squares: positive: A055047; negative: A055048 (negated);
Cubes: this sequence.

Programs

  • PARI
    isA319293(n)= n\27^valuation(n, 27)%9==1||n\27^valuation(n, 27)%9==8
    
  • Python
    from sympy import integer_log
    def A319293(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(((m:=x//27**i)-1)//9+(m-8)//9+2 for i in range(integer_log(x,27)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025

Formula

a(n) = 13*n/3 + O(log(n)).
Showing 1-6 of 6 results.