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

A267116 Bitwise-OR of the exponents of primes in the prime factorization of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 3, 1, 1, 1, 4, 1, 3, 1, 3, 1, 1, 1, 3, 2, 1, 3, 3, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 3, 3, 1, 1, 5, 2, 3, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 3, 6, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 5, 4, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 5, 1, 3, 3, 2, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 5, 1, 1, 1, 3, 3, 1, 1, 3
Offset: 1

Views

Author

Antti Karttunen, Feb 03 2016

Keywords

Examples

			For n = 4 = 2^2, bitwise-OR of 2 alone is 2, thus a(4) = 2.
For n = 6 = 2^1 * 3^1, when we take a bitwise-or of 1 and 1, we get 1, thus a(6) = 1.
For n = 24 = 2^3 * 3^1, bitwise-or of 3 and 1 ("11" and "01" in binary) gives "11", thus a(24) = 3.
For n = 210 = 2^1 * 3^1 * 5^1 * 7^1, bitwise-or of 1, 1, 1 and 1 gives 1, thus a(210) = 1.
For n = 720 = 2^4 * 3^2 * 5^1, bitwise-or of 4, 2 and 1 ("100", "10" and "1" in binary) gives 7 ("111" in binary), thus a(720) = 7.
		

Crossrefs

Cf. A000290 (indices of even numbers).
Cf. A000037 (indices of odd numbers).
Nonunit terms of A005117, A062503, A113849 give the positions of ones, twos, fours respectively in this sequence.
Sequences with similar definitions: A260728, A267113, A267115 (bitwise-AND) and A268387 (bitwise-XOR of exponents).
Sequences with related analysis: A267114, A268374, A268375, A268376.
Sequences A088529, A136565 and A181591 coincide with a(n) for n: 2 <= n < 24.
A003961, A059896 are used to express relationship between terms of this sequence.
Related to A087207 via A225546.

Programs

  • Maple
    read("transforms"):
    A267116 := proc(n)
        local a,e ;
        a := 0 ;
        for e in ifactors(n)[2] do
            a := ORnos(a,op(2,e)) ;
        end do:
        a ;
    end proc: # R. J. Mathar, Feb 16 2021
  • Mathematica
    {0}~Join~Rest@ Array[BitOr @@ Map[Last, FactorInteger@ #] &, 120] (* Michael De Vlieger, Feb 04 2016 *)
  • PARI
    a(n)=my(f = factor(n)); my(b = 0); for (k=1, #f~, b = bitor(b, f[k,2]);); b; \\ Michel Marcus, Feb 05 2016
    
  • PARI
    a(n)=if(n>1, fold(bitor, factor(n)[,2]), 0) \\ Charles R Greathouse IV, Aug 04 2016
    
  • Python
    from functools import reduce
    from operator import or_
    from sympy import factorint
    def A267116(n): return reduce(or_,factorint(n).values(),0) # Chai Wah Wu, Aug 31 2022

Formula

a(1) = 0; for n > 1: a(n) = A067029(n) OR a(A028234(n)). [Here OR stands for bitwise-or, A003986.]
Other identities and observations. For all n >= 1:
a(n) = A007814(n) OR A260728(n) OR A267113(n).
a(n) = A001222(n) - A268374(n).
A268387(n) <= a(n) <= A001222(n).
From Peter Munn, Jan 08 2020: (Start)
a(A059896(n,k)) = a(n) OR a(k).
a(A003961(n)) = a(n).
a(n^2) = 2*a(n).
a(n) = A087207(A225546(n)).
a(A225546(n)) = A087207(n).
(End)

A267115 Bitwise-AND of the exponents of primes in the prime factorization of n, a(1) = 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 0, 1, 1, 1, 4, 1, 0, 1, 0, 1, 1, 1, 1, 2, 1, 3, 0, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 2, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 6, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 0, 0, 1, 1, 1, 0, 4, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1
Offset: 1

Views

Author

Antti Karttunen, Feb 03 2016

Keywords

Comments

The sums of the first 10^k terms, for k = 1, 2, ..., are 13, 105, 826, 7440, 71558, 707625, 7053959, 70473172, 704531711, 7044701307, 70445097231, ... . Apparently, the asymptotic mean of this sequence is limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 0.7044... . - Amiram Eldar, Sep 09 2022

Examples

			For n = 24 = 2^3 * 3^1, bitwise-and of 3 and 1 ("11" and "01" in binary) gives 1, thus a(24) = 1.
For n = 210 = 2^1 * 3^1 * 5^1 * 7^1, bitwise-and of 1, 1, 1 and 1 gives 1, thus a(210) = 1.
For n = 720 = 2^4 * 3^2 * 5^1, bitwise-and of 4, 2 and 1 ("100", "10" and "1" in binary) gives zero, thus a(720) = 0.
		

Crossrefs

Cf. A002035 (indices of odd numbers), A072587 (indices of even numbers that occur after a(1)).
Cf. A267117 (indices of zeros).

Programs

  • Mathematica
    {0}~Join~Table[BitAnd @@ Map[Last, FactorInteger@ n], {n, 2, 120}] (* Michael De Vlieger, Feb 07 2016 *)
  • PARI
    a(n)=my(f = factor(n)[,2]); if (#f == 0, return (0)); my(b = f[1]); for (k=2, #f, b = bitand(b, f[k]);); b; \\ Michel Marcus, Feb 07 2016
    
  • PARI
    a(n)=if(n>1, fold(bitand, factor(n)[,2]), 0) \\ Charles R Greathouse IV, Aug 04 2016
    
  • Python
    from functools import reduce
    from operator import and_
    from sympy import factorint
    def A267115(n): return reduce(and_,factorint(n).values()) if n > 1 else 0 # Chai Wah Wu, Aug 31 2022

Formula

If A028234(n) = 1 [when n is a power of prime, in A000961], a(n) = A067029(n), otherwise a(n) = A067029(n) AND a(A028234(n)). [Here AND stands for bitwise-and, A004198.]

A267117 Numbers m such that in their prime factorization m = p_1^e_1 * ... * p_k^e_k, there is no digit-position in the base-2 representation of the exponents e_1 .. e_k such that in that position all those exponents would have 1-bit.

Original entry on oeis.org

1, 12, 18, 20, 28, 44, 45, 48, 50, 52, 60, 63, 68, 75, 76, 80, 84, 90, 92, 98, 99, 112, 116, 117, 124, 126, 132, 140, 144, 147, 148, 150, 153, 156, 162, 164, 171, 172, 175, 176, 180, 188, 192, 198, 204, 207, 208, 212, 220, 228, 234, 236, 240, 242, 244, 245, 252, 260, 261, 268, 272, 275, 276, 279, 284, 288, 292, 294, 300
Offset: 1

Views

Author

Antti Karttunen, Feb 03 2016

Keywords

Comments

The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 1, 21, 261, 2824, 29144, 294233, 2951313, 29542282, 295514868, 2955441810, 29555347819, ... . Apparently, the asymptotic density of this sequence exists and equals 0.2955... . - Amiram Eldar, Sep 09 2022

Examples

			60 = 2^2 * 3^1 * 5^1 is included, as bitwise-anding together the binary representations of the exponents, "10", "01" and "01" results "00", zero.
		

Crossrefs

Indices of zeros in A267115.
Cf. A054753 (subsequence), A191555 (subsequence after the initial 2).
Cf. also A267114, A268376.

Programs

  • Mathematica
    {1}~Join~Select[Range@ 300, BitAnd @@ Map[Last, FactorInteger@ #] == 0 &] (* Michael De Vlieger, Feb 07 2016 *)

Extensions

Erroneous claim corrected by Antti Karttunen, Feb 07 2016

A275665 Numbers n such that n and sopf(n) are relatively prime, where sopf(n) (A008472) is the sum of the distinct primes dividing n.

Original entry on oeis.org

1, 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 33, 34, 35, 36, 38, 39, 40, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 62, 63, 65, 68, 69, 72, 74, 75, 76, 77, 80, 82, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 98, 99, 100, 104, 106, 108, 111, 112, 115, 116, 117, 118, 119, 122, 123, 124, 129, 133, 134, 135, 136, 141, 142, 143, 144, 145, 146, 147, 148, 152, 153, 155, 158, 159, 160, 161, 162, 164, 165
Offset: 1

Views

Author

Keywords

Comments

Hall shows that the density of this sequence is 6/Pi^2, so a(n) ~ (Pi^2/6)n.
Differs from A267114, from A030231, and from A007774 (shifted by one index) first at n=93. - R. J. Mathar, Aug 22 2016

Crossrefs

Programs

  • Mathematica
    Select[Range@ 165, CoprimeQ[#, Total@ FactorInteger[#][[All, 1]]] &] (* Michael De Vlieger, Aug 06 2016 *)
  • PARI
    sopf(n)=vecsum(factor(n)[,1])
    is(n)=gcd(sopf(n),n)==1
Showing 1-4 of 4 results.