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.

A145204 Numbers whose representation in base 3 (A007089) ends in an odd number of zeros.

Original entry on oeis.org

0, 3, 6, 12, 15, 21, 24, 27, 30, 33, 39, 42, 48, 51, 54, 57, 60, 66, 69, 75, 78, 84, 87, 93, 96, 102, 105, 108, 111, 114, 120, 123, 129, 132, 135, 138, 141, 147, 150, 156, 159, 165, 168, 174, 177, 183, 186, 189, 192, 195, 201, 204, 210, 213, 216, 219, 222, 228, 231
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 04 2008

Keywords

Comments

Previous name: Complement of A007417.
Also numbers having infinitary divisor 3, or the same, having factor 3 in their Fermi-Dirac representation as product of distinct terms of A050376. - Vladimir Shevelev, Mar 18 2013
For n > 1: where even terms occur in A051064. - Reinhard Zumkeller, May 23 2013
If we exclude a(1) = 0, these are numbers whose squarefree part is divisible by 3, which can be partitioned into numbers whose squarefree part is congruent to 3 mod 9 (A055041) and 6 mod 9 (A055040) respectively. - Peter Munn, Jul 14 2020
The inclusion of 0 as a term might be viewed as a cultural preference: if we habitually wrote numbers enclosed in brackets and then used a null string of digits for zero, the natural number sequence in ternary would be [], [1], [2], [10], [11], [12], [20], ... . - Peter Munn, Aug 02 2020
The asymptotic density of this sequence is 1/4. - Amiram Eldar, Sep 20 2020

Crossrefs

Subsequence of A008585, A028983.
Subsequences: A016051, A055040, A055041, A329575.
Cf. A007089, A007417 (complement), A050376, A182581 (characteristic function).
Positions of 0s in A014578.
Excluding 0: the positions of odd numbers in A007949; equivalently, of even numbers in A051064; symmetric difference of A003159 and A036668.
Related to A042964 via A052330.
Related to A036554 via A064614.

Programs

  • Haskell
    a145204 n = a145204_list !! (n-1)
    a145204_list = 0 : map (+ 1) (findIndices even a051064_list)
    -- Reinhard Zumkeller, May 23 2013
    
  • Maple
    isA145204 := proc(n) local d, c;
    if n = 0 then return true fi;
    d := A007089(n); c := 0;
    while irem(d, 10) = 0 do c := c+1; d := iquo(d, 10) od;
    type(c, odd) end:
    select(isA145204, [$(0..231)]); # Peter Luschny, Aug 05 2020
  • Mathematica
    Select[ Range[0, 235], (# // IntegerDigits[#, 3]& // Split // Last // Count[#, 0]& // OddQ)&] (* Jean-François Alcover, Mar 18 2013 *)
    Join[{0}, Select[Range[235], OddQ @ IntegerExponent[#, 3] &]] (* Amiram Eldar, Sep 20 2020 *)
  • Python
    import numpy as np
    def isA145204(n):
        if n == 0: return True
        c = 0
        d = int(np.base_repr(n, base = 3))
        while d % 10 == 0:
            c += 1
            d //= 10
        return c % 2 == 1
    print([n for n in range(231) if isA145204(n)]) # Peter Luschny, Aug 05 2020
    
  • Python
    from sympy import integer_log
    def A145204(n):
        if n == 1: return 0
        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-1+sum(((m:=x//9**i)-2)//3+(m-1)//3+2 for i in range(integer_log(x,9)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Feb 15 2025

Formula

a(n) = 3 * A007417(n-1) for n > 1.
A014578(a(n)) = 0.
For n > 1, A007949(a(n)) mod 2 = 1. [Edited by Peter Munn, Aug 02 2020]
{a(n) : n >= 2} = {A052330(A042964(k)) : k >= 1} = {A064614(A036554(k)) : k >= 1}. - Peter Munn, Aug 31 2019 and Dec 06 2020

Extensions

New name using a comment of Vladimir Shevelev by Peter Luschny, Aug 05 2020

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

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

Original entry on oeis.org

1, 4, 6, 7, 9, 10, 13, 15, 16, 19, 22, 24, 25, 28, 31, 33, 34, 36, 37, 40, 42, 43, 46, 49, 51, 52, 54, 55, 58, 60, 61, 63, 64, 67, 69, 70, 73, 76, 78, 79, 81, 82, 85, 87, 88, 90, 91, 94, 96, 97, 100, 103, 105, 106, 109, 112, 114, 115, 117, 118, 121, 123, 124, 127, 130, 132, 133, 135, 136, 139, 141, 142, 144, 145, 148, 150, 151, 154, 157, 159
Offset: 1

Views

Author

Clark Kimberling, Apr 26 2011

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    t = Nest[Flatten[# /. {0->{0,1,1}, 1->{0,1,0}}] &, {0}, 5] (*A156595*)
    f[n_] := t[[n]]
    Flatten[Position[t, 0]] (*A189715*)
    Flatten[Position[t, 1]] (*A189716*)
    s[n_] := Sum[f[i], {i, 1, n}]; s[0] = 0;
    Table[s[n], {n, 1, 120}] (*A189717*)
    f[p_, e_] := (p^Mod[e, 2]); sqfpart[n_] := Times @@ f @@@ FactorInteger[n]; Select[Range[160], MemberQ[{1, 4, 6, 7}, Mod[sqfpart[#], 9]] &] (* Amiram Eldar, Mar 08 2021 *)
  • Python
    from sympy import integer_log
    def A189715(n):
        def f(x): return n+x-sum(((m:=x//9**i)-1)//9+(m-4)//9+(m-6)//9+(m-7)//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

A055048 Numbers of the form 9^i*(3*j+2).

Original entry on oeis.org

2, 5, 8, 11, 14, 17, 18, 20, 23, 26, 29, 32, 35, 38, 41, 44, 45, 47, 50, 53, 56, 59, 62, 65, 68, 71, 72, 74, 77, 80, 83, 86, 89, 92, 95, 98, 99, 101, 104, 107, 110, 113, 116, 119, 122, 125, 126, 128, 131, 134, 137, 140, 143, 146, 149, 152, 153, 155
Offset: 1

Views

Author

N. J. A. Sloane, Jun 01 2000

Keywords

Comments

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

Crossrefs

Intersection of A007417 and A189716.
Complement of A055047 with respect to A007417.
Complement of A055041 with respect to A189716.

Programs

  • Haskell
    a055048 n = a055048_list !! (n-1)
    a055048_list = filter (s 0) [1..] where
       s t u | m > 0  = even t && m == 2
             | m == 0 = s (t + 1) u' where (u',m) = divMod u 3
    -- Reinhard Zumkeller, Apr 07 2012
    
  • Mathematica
    max = 200; Select[ Union[ Flatten[ Table[ 9^i*(3*j + 2), {i, 0, Ceiling[Log[max]/Log[9]]}, {j, 0, Ceiling[( max/9^i - 2)/3]}]]], # <= max &] (* Jean-François Alcover, Oct 13 2011 *)
  • PARI
    is(n)=n/=9^valuation(n, 9); n%3==2 \\ Charles R Greathouse IV and V. Raman, Dec 19 2013
    
  • Python
    from sympy import integer_log
    def A055048(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) # Chai Wah Wu, Feb 14 2025

Formula

a(n) = A055040(n)/3. - Peter Munn, May 17 2020

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}.
Showing 1-6 of 6 results.