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.

A026225 Numbers of the form 3^i * (3k+1).

Original entry on oeis.org

1, 3, 4, 7, 9, 10, 12, 13, 16, 19, 21, 22, 25, 27, 28, 30, 31, 34, 36, 37, 39, 40, 43, 46, 48, 49, 52, 55, 57, 58, 61, 63, 64, 66, 67, 70, 73, 75, 76, 79, 81, 82, 84, 85, 88, 90, 91, 93, 94, 97, 100, 102, 103, 106, 108, 109, 111, 112, 115
Offset: 1

Views

Author

Keywords

Comments

Old name: a(n) = (1/3)*(s(n+1) - 1), where s = A026224.
Conjectures based on old name: these are numbers of the form (3*i+1)*3^j; see A182828, and they comprise the complement of A026179, except for the initial 1 in A026179.
From Peter Munn, Mar 17 2022: (Start)
Numbers with an even number of prime factors of the form 3k-1 counting repetitions.
Numbers whose squarefree part is congruent to 1 modulo 3 or 3 modulo 9.
The integers in an index 2 subgroup of the positive rationals under multiplication. As such the sequence is closed under multiplication and - where the result is an integer - under division; also for any positive integer k not in the sequence, the sequence's complement is generated by dividing by k the terms that are multiples of k.
Alternatively, the sequence can be viewed as an index 2 subgroup of the positive integers under the commutative binary operation A059897(.,.).
Viewed either way, the sequence corresponds to a subgroup of the quotient group derived in the corresponding way from A055047. (End)
The asymptotic density of this sequence is 1/2. - Amiram Eldar, Apr 03 2022
Is this A026140 shifted right? - R. J. Mathar, Jun 24 2025

Crossrefs

Elements of array A182828 in ascending order.
Union of A055041 and A055047.
Other subsequences: A007645 (primes), A352274.
Symmetric difference of A003159 and A225838; of A007417 and A189716.

Programs

  • Mathematica
    a[b_] := Table[Mod[n/b^IntegerExponent[n, b], b], {n, 1, 160}]
    p[b_, d_] := Flatten[Position[a[b], d]]
    p[3, 1]  (* A026225 *)
    p[3, 2] (* A026179 without initial 1 *)
    (* Clark Kimberling, Oct 19 2016 *)
  • PARI
    isok(m) = core(m) % 3 == 1 || core(m) % 9 == 3; \\ Peter Munn, Mar 17 2022
    
  • Python
    from sympy import integer_log
    def A026225(n):
        def f(x): return n+x-sum(((x//3**i)-1)//3+1 for i in range(integer_log(x,3)[0]+1))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Feb 15 2025

Formula

From Peter Munn, Mar 17 2022: (Start)
{a(n) : n >= 1} = {m : A001222(A343430(m)) == 0 (mod 2)}.
{a(n) : n >= 1} = {A055047(m) : m >= 1} U {3*A055047(m) : m >= 1}.
{a(n) : n >= 1} = {A352274(m) : m >= 1} U {A352274(m)/10 : m >= 1, 10 divides A352274(m)}. (End)

Extensions

New name from Peter Munn, Mar 17 2022