login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A267116 Bitwise-OR of the exponents of primes in the prime factorization of n. 15
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..10000

Index entries for sequences computed from exponents in factorization of n

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).

EXAMPLE

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.

MATHEMATICA

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

PROG

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

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

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

(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

CROSSREFS

Cf. A001222, A003986, A007814, A028234, A067029, A267113, A260728.

Cf. A000290 (indices of even numbers).

Cf. A000037 (indices of odd numbers).

Cf. A005117 (after 1, gives the positions of ones in this sequence).

Cf. also A267115 (bitwise-AND) and A268387 (bitwise-XOR of exponents).

Cf. also A267114, A268374, A268375, A268376.

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

Sequence in context: A293515 A292777 A088529 * A136565 A181591 A222580

Adjacent sequences:  A267113 A267114 A267115 * A267117 A267118 A267119

KEYWORD

nonn

AUTHOR

Antti Karttunen, Feb 03 2016

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified December 11 19:09 EST 2017. Contains 295919 sequences.