|
|
A267115
|
|
Bitwise-AND of the exponents of primes in the prime factorization of n, a(1) = 0.
|
|
11
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
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
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
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.
|
|
MATHEMATICA
|
{0}~Join~Table[BitAnd @@ Map[Last, FactorInteger@ n], {n, 2, 120}] (* Michael De Vlieger, Feb 07 2016 *)
|
|
PROG
|
(Scheme, two variants)
;; A recursive version using memoizing definec-macro:
(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
(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
|
|
CROSSREFS
|
Cf. A002035 (indices of odd numbers), A072587 (indices of even numbers that occur after a(1)).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|