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 A072591 #16 May 31 2025 19:48:28 %S A072591 1,2,3,2,5,2,7,2,3,0,11,2,13,2,1,2,17,2,19,0,3,2,23,2,5,0,3,2,29,0,31, %T A072591 2,3,0,5,2,37,2,1,0,41,2,43,2,1,2,47,2,7,0,1,0,53,2,1,2,3,0,59,0,61,2, %U A072591 3,2,5,2,67,0,3,0,71,2,73,0,1,2,3,0,79,0,3,0,83,2,1,2,1,2,89,0,5,2,3,2 %N A072591 In prime factorization of n replace multiplication with bitwise logical 'and'. %C A072591 a(n) = a(A007947(n)); n is prime iff a(n)=n; %C A072591 a(n)=0 iff n is even and one prime factor is of form 4*k+1. %H A072591 Paul Tek, <a href="/A072591/b072591.txt">Table of n, a(n) for n = 1..10000</a> %e A072591 a(35) = a(5*7) = a(5) 'and' a(7) = '101' and '111' = '101' = 5. %t A072591 a[n_] := BitAnd @@ FactorInteger[n][[All, 1]]; %t A072591 Array[a, 100] (* _Jean-François Alcover_, Nov 16 2021 *) %o A072591 (Haskell) %o A072591 import Data.Bits ((.&.)) %o A072591 a072591 = foldl1 (.&.) . a027746_row -- _Reinhard Zumkeller_, Jul 05 2013 %o A072591 (Python) %o A072591 from sympy import factorint %o A072591 from operator import __and__ %o A072591 from functools import reduce %o A072591 def a(n): return reduce(__and__, (f for f in factorint(n))) if n > 1 else 1 %o A072591 print([a(n) for n in range(1, 95)]) # _Michael S. Branicky_, May 31 2025 %Y A072591 Cf. A072593, A072594, A072592. %Y A072591 Cf. A027746. %K A072591 nonn %O A072591 1,2 %A A072591 _Reinhard Zumkeller_, Jun 23 2002