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-5 of 5 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)

A268375 Numbers k for which A001222(k) = A267116(k).

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 18, 19, 20, 23, 25, 27, 28, 29, 31, 32, 37, 41, 43, 44, 45, 47, 48, 49, 50, 52, 53, 59, 61, 63, 64, 67, 68, 71, 73, 75, 76, 79, 80, 81, 83, 89, 92, 97, 98, 99, 101, 103, 107, 109, 112, 113, 116, 117, 121, 124, 125, 127, 128, 131, 137, 139, 144, 147, 148, 149, 151, 153
Offset: 1

Views

Author

Antti Karttunen, Feb 03 2016

Keywords

Comments

Numbers k whose prime factorization k = p_1^e_1 * ... * p_m^e_m contains no pair of exponents e_i and e_j (i and j distinct) whose base-2 representations have at least one shared digit-position in which both exponents have a 1-bit.
Equivalently, numbers k such that the factors in the (unique) factorization of k into powers of squarefree numbers with distinct exponents that are powers of two, are prime powers. For example, this factorization of 90 is 10^1 * 3^2, so 90 is not included, as 10 is not prime; whereas this factorization of 320 is 5^1 * 2^2 * 2^4, so 320 is included as 5 and 2 are both prime. - Peter Munn, Jan 16 2020
A225546 maps the set of terms 1:1 onto A138302. - Peter Munn, Jan 26 2020
Equivalently, numbers k for which A064547(k) = A331591(k). - Amiram Eldar, Dec 23 2023

Examples

			12 = 2^2 * 3^1 is included in the sequence as the exponents 2 ("10" in binary) and 1 ("01" in binary) have no 1-bits in the same position, and 18 = 2^1 * 3^2 is included for the same reason.
On the other hand, 24 = 2^3 * 3^1 is NOT included in the sequence as the exponents 3 ("11" in binary) and 1 ("01" in binary) have 1-bit in the same position 0.
720 = 2^4 * 3^2 * 5^1 is included as the exponents 1, 2 and 4 ("001", "010" and "100" in binary) have no 1-bits in shared positions.
Likewise, 10! = 3628800 = 2^8 * 3^4 * 5^2 * 7^1 is included as the exponents 1, 2, 4 and 8 ("0001", "0010", "0100" and "1000" in binary) have no 1-bits in shared positions. And similarly for any term of A191555.
		

Crossrefs

Indices of zeros in A268374, also in A289618.
Cf. A091862 (characteristic function), A268376 (complement).
Cf. A000961, A054753, A191555 (subsequences).
Related to A138302 via A225546.
Cf. also A318363 (a permutation).

Programs

  • Mathematica
    {1}~Join~Select[Range@ 160, PrimeOmega@ # == BitOr @@ Map[Last, FactorInteger@ #] &] (* Michael De Vlieger, Feb 04 2016 *)

A091862 a(n) = 1 if the sum of all exponents of the prime-factorization of n has no carries when summed in base 2, or a(n) = 0 if there are any carries.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0
Offset: 1

Views

Author

Leroy Quet, Mar 13 2004

Keywords

Comments

Characteristic function for A268375. - Antti Karttunen, Nov 23 2017

Examples

			a(12) = 1 because 12 = 2^2 *3^1 and, in base 2, 2 = '10', 1 = '1' and '10' and '1' have their ones in different positions. But a(24) = 0 because 24 = 2^3 *3^1 and in base 2 3 = '11', 1 = '1', which both share a rightmost one.
		

Crossrefs

Cf. A268375 (positions of ones), A268376 (of zeros).

Programs

  • Mathematica
    f[e_] := Position[Reverse[IntegerDigits[e, 2]], 1] // Flatten; a[n_] := Boole[UnsameQ @@ Flatten[f /@ FactorInteger[n][[;; , 2]]]]; Array[a, 100] (* Amiram Eldar, Dec 23 2023 *)
  • PARI
    a(n) = {my(e = factor(n)[,2], b = 0); for(i=1, #e, b = bitor(b, e[i])); n == 1 || b == vecsum(e);} \\ Amiram Eldar, Dec 23 2023

Formula

If A268374(n) = 0, then a(n) = 1, 0 otherwise. - Antti Karttunen, Nov 23 2017

Extensions

More terms from Pab Ter (pabrlos(AT)yahoo.com), May 25 2004

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

A268374 a(n) = A001222(n) - A267116(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 1, 1, 1, 2, 0, 1, 1, 1, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 2, 0, 0, 1, 2, 0, 2, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 2, 0, 2, 0, 1, 2, 1, 0, 2, 0, 2, 1, 0, 0, 2, 1, 0, 0, 1, 1, 2
Offset: 1

Views

Author

Antti Karttunen, Feb 03 2016

Keywords

Crossrefs

Cf. A268375 (indices of zeros), A268376 (of nonzeros).

Programs

Formula

a(n) = A001222(n) - A267116(n).
Showing 1-5 of 5 results.