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-2 of 2 results.

A214682 Remove 2's that do not contribute to a factor of 4 from the prime factorization of n.

Original entry on oeis.org

1, 1, 3, 4, 5, 3, 7, 4, 9, 5, 11, 12, 13, 7, 15, 16, 17, 9, 19, 20, 21, 11, 23, 12, 25, 13, 27, 28, 29, 15, 31, 16, 33, 17, 35, 36, 37, 19, 39, 20, 41, 21, 43, 44, 45, 23, 47, 48, 49, 25, 51, 52, 53, 27, 55, 28, 57, 29
Offset: 1

Views

Author

Tyler Ball, Jul 25 2012

Keywords

Comments

In this sequence, the number 4 exhibits some characteristics of a prime number since all extraneous 2's have been removed from the prime factorizations of all other numbers.

Examples

			For n=8, v_4(8)=1, v_2(8)=3, so a(8)=(8*4^1)/(2^3)=4.
For n=12, v_4(12)=1, v_2(12)=2, so a(12)=(12*4^1)/(2^2)=12.
		

Crossrefs

Range of values: A003159.
Missing values: A036554.
A056832, A059895, A073675 are used in a formula defining this sequence.
A059897 is used to express relationship between terms of this sequence.
Cf. A007814 (v_2(n)), A235127 (v_4(n)).

Programs

  • Mathematica
    a[n_] := n/(2^Mod[IntegerExponent[n, 2], 2]); Array[a, 100] (* Amiram Eldar, Dec 09 2020 *)
  • PARI
    a(n)=n>>(valuation(n,2)%2) \\ Charles R Greathouse IV, Jul 26 2012
    
  • Python
    def A214682(n): return n>>1 if (~n&n-1).bit_length()&1 else n # Chai Wah Wu, Jan 09 2023
  • SageMath
    C = []
    for i in [1..n]:
        C.append(i*4^(Integer(i).valuation(4))/2^(Integer(i).valuation(2)))
    

Formula

a(n) = (n*4^(v_4(n)))/(2^(v_2(n))) where v_k(n) is the k-adic valuation of n. That is, v_k(n) is the largest power of k, a, such that k^a divides n.
For n odd, a(n)=n since n has no factors of 2 (or 4).
From Peter Munn, Nov 29 2020: (Start)
a(A003159(n)) = n.
a(A036554(n)) = n/2.
a(n) = n/A056832(n) = n/A059895(n, 2) = min(n, A073675(n)).
a(A059897(n, k)) = A059897(a(n), a(k)). (End)
Multiplicative with a(2^e) = 2^(2*floor(e/2)), and a(p^e) = p^e for odd primes p. - Amiram Eldar, Dec 09 2020
Sum_{k=1..n} a(k) ~ (5/12) * n^2. - Amiram Eldar, Nov 10 2022
Dirichlet g.f.: zeta(s-1)*(2^s+1)/(2^s+2). - Amiram Eldar, Dec 30 2022

A214681 a(n) is obtained from n by removing factors of 2 and 3 that do not contribute to a factor of 6.

Original entry on oeis.org

1, 1, 1, 1, 5, 6, 7, 1, 1, 5, 11, 6, 13, 7, 5, 1, 17, 6, 19, 5, 7, 11, 23, 6, 25, 13, 1, 7, 29, 30, 31, 1, 11, 17, 35, 36, 37, 19, 13, 5, 41, 42, 43, 11, 5, 23, 47, 6, 49, 25, 17, 13, 53, 6, 55, 7, 19, 29, 59, 30, 61, 31, 7, 1, 65, 66, 67, 17, 23, 35, 71, 36
Offset: 1

Views

Author

Tom Edgar, Jul 25 2012

Keywords

Comments

In this sequence, the number 6 exhibits some characteristics of a prime number since we have removed extraneous 2's and 3's from the prime factorizations of numbers.

Examples

			For n=4, v_2(4)=2, v_3(4)=0, and v_6(4)=0, so a(4) = 4*1/(4*1) = 1.
For n=36, v_2(36)=2, v_3(36)=2, and v_6(36)=2, so a(36) = 36*36/(4*9) = 36.
For n=17, a(17) = 17 since 17 has no factors of 6, 2 or 3.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local i, m, r; m:=n;
          for i from 0 while irem(m, 6, 'r')=0 do m:=r od;
          while irem(m, 2, 'r')=0 do m:=r od;
          while irem(m, 3, 'r')=0 do m:=r od;
          m*6^i
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jul 04 2013
  • Mathematica
    With[{v = IntegerExponent}, a[n_] := n*6^v[n, 6]/2^v[n, 2]/3^v[n, 3]; Array[a, 100]] (* Amiram Eldar, Dec 09 2020 *)
  • Sage
    n=100 #change n for more terms
    C=[]
    b=6
    P = factor(b)
    for i in [1..n]:
        prod = 1
        for j in range(len(P)):
            prod = prod * ((P[j][0])^(Integer(i).valuation(P[j][0])))
        C.append((b^(Integer(i).valuation(b)) * i) /prod)

Formula

a(n) = n*6^(v_6(n))/(2^(v_2(n))*3^(v_3(n))), where v_k(n) is the k-adic valuation of n, that is v_k(n) gives the largest power of k, a, such that k^a divides n.
Sum_{k=1..n} a(k) ~ (7/24) * n^2. - Amiram Eldar, Dec 25 2023
Showing 1-2 of 2 results.