[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A267116 Bitwise-OR of the exponents of primes in the prime factorization of n. 35

%I #40 Aug 31 2022 10:51:14

%S 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,

%T 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,

%U 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

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

%H Antti Karttunen, <a href="/A267116/b267116.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>

%F a(1) = 0; for n > 1: a(n) = A067029(n) OR a(A028234(n)). [Here OR stands for bitwise-or, A003986.]

%F Other identities and observations. For all n >= 1:

%F a(n) = A007814(n) OR A260728(n) OR A267113(n).

%F a(n) = A001222(n) - A268374(n).

%F A268387(n) <= a(n) <= A001222(n).

%F From _Peter Munn_, Jan 08 2020: (Start)

%F a(A059896(n,k)) = a(n) OR a(k).

%F a(A003961(n)) = a(n).

%F a(n^2) = 2*a(n).

%F a(n) = A087207(A225546(n)).

%F a(A225546(n)) = A087207(n).

%F (End)

%e For n = 4 = 2^2, bitwise-OR of 2 alone is 2, thus a(4) = 2.

%e For n = 6 = 2^1 * 3^1, when we take a bitwise-or of 1 and 1, we get 1, thus a(6) = 1.

%e For n = 24 = 2^3 * 3^1, bitwise-or of 3 and 1 ("11" and "01" in binary) gives "11", thus a(24) = 3.

%e 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.

%e 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.

%p read("transforms"):

%p A267116 := proc(n)

%p local a,e ;

%p a := 0 ;

%p for e in ifactors(n)[2] do

%p a := ORnos(a,op(2,e)) ;

%p end do:

%p a ;

%p end proc: # _R. J. Mathar_, Feb 16 2021

%t {0}~Join~Rest@ Array[BitOr @@ Map[Last, FactorInteger@ #] &, 120] (* _Michael De Vlieger_, Feb 04 2016 *)

%o (Scheme, two variants, first one with memoization-macro definec)

%o (definec (A267116 n) (cond ((= 1 n) 0) (else (A003986bi (A067029 n) (A267116 (A028234 n)))))) ;; A003986bi implements bitwise-or (see A003986).

%o (define (A267116 n) (A003986bi (A007814 n) (A003986bi (A260728 n) (A267113 n))))

%o (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

%o (PARI) a(n)=if(n>1, fold(bitor, factor(n)[,2]), 0) \\ _Charles R Greathouse IV_, Aug 04 2016

%o (Python)

%o from functools import reduce

%o from operator import or_

%o from sympy import factorint

%o def A267116(n): return reduce(or_,factorint(n).values(),0) # _Chai Wah Wu_, Aug 31 2022

%Y Cf. A001222, A003986, A007814, A028234, A067029.

%Y Cf. A000290 (indices of even numbers).

%Y Cf. A000037 (indices of odd numbers).

%Y Nonunit terms of A005117, A062503, A113849 give the positions of ones, twos, fours respectively in this sequence.

%Y Sequences with similar definitions: A260728, A267113, A267115 (bitwise-AND) and A268387 (bitwise-XOR of exponents).

%Y Sequences with related analysis: A267114, A268374, A268375, A268376.

%Y Sequences A088529, A136565 and A181591 coincide with a(n) for n: 2 <= n < 24.

%Y A003961, A059896 are used to express relationship between terms of this sequence.

%Y Related to A087207 via A225546.

%K nonn

%O 1,4

%A _Antti Karttunen_, Feb 03 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 13:17 EDT 2024. Contains 375517 sequences. (Running on oeis4.)