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.
%I A267115 #35 Sep 09 2022 04:19:29 %S A267115 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, %T A267115 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, %U A267115 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 %N A267115 Bitwise-AND of the exponents of primes in the prime factorization of n, a(1) = 0. %C A267115 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 %H A267115 Antti Karttunen, <a href="/A267115/b267115.txt">Table of n, a(n) for n = 1..10000</a> %H A267115 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a> %F A267115 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.] %e A267115 For n = 24 = 2^3 * 3^1, bitwise-and of 3 and 1 ("11" and "01" in binary) gives 1, thus a(24) = 1. %e A267115 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. %e A267115 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. %t A267115 {0}~Join~Table[BitAnd @@ Map[Last, FactorInteger@ n], {n, 2, 120}] (* _Michael De Vlieger_, Feb 07 2016 *) %o A267115 (Scheme, two variants) %o A267115 (define (A267115 n) (let loop ((n (A028234 n)) (z (A067029 n))) (cond ((= 1 n) z) (else (loop (A028234 n) (A004198bi z (A067029 n))))))) ;; A004198bi implements bitwise-and (see A004198). %o A267115 ;; A recursive version using memoizing definec-macro: %o A267115 (definec (A267115 n) (if (= 1 (A028234 n)) (A067029 n) (A004198bi (A067029 n) (A267115 (A028234 n))))) %o A267115 (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 %o A267115 (PARI) a(n)=if(n>1, fold(bitand, factor(n)[,2]), 0) \\ _Charles R Greathouse IV_, Aug 04 2016 %o A267115 (Python) %o A267115 from functools import reduce %o A267115 from operator import and_ %o A267115 from sympy import factorint %o A267115 def A267115(n): return reduce(and_,factorint(n).values()) if n > 1 else 0 # _Chai Wah Wu_, Aug 31 2022 %Y A267115 Cf. A000961, A004198, A028234, A067029, A267114, A267116, A268387. %Y A267115 Cf. A002035 (indices of odd numbers), A072587 (indices of even numbers that occur after a(1)). %Y A267115 Cf. A267117 (indices of zeros). %K A267115 nonn %O A267115 1,4 %A A267115 _Antti Karttunen_, Feb 03 2016