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 A230120 #29 Apr 14 2025 15:01:43 %S A230120 0,0,0,1,1,1,3,2,1,2,5,1,6,3,0,4,7,2,9,3,4,5,10,3,8,6,5,7,13,3,15,8,6, %T A230120 8,12,4,18,9,7,8,20,4,20,10,5,11,23,5,24,9,8,12,25,6,19,14,11,14,29,5, %U A230120 30,15,12,16,22,7,33,15,12,12,34,8,36,18,10,18 %N A230120 a(n) is the number of evil integers (A001969) not exceeding n and prime to n. %C A230120 See comment in A230070, taking into account the equality a(n) = phi(n) - A230070(n), where phi(n) is Euler totient function (A000010). %H A230120 Georg Fischer, <a href="/A230120/b230120.txt">Table of n, a(n) for n = 1..5000</a> %F A230120 For odd evil prime p (A027699), a(p) = (p-3)/2; for odd odious prime p (A027697), a(p) = (p-1)/2. %t A230120 upTo[n_] := Block[{c, i, e = Select[Range[n], EvenQ@ DigitCount[#, 2, 1] &]}, Table[c = 0; i = 1; While[i <= Length@ e && e[[i]] < k, c += Boole@ CoprimeQ[e[[i]], k]; i++]; c, {k, n}]]; upTo[100] (* _Giovanni Resta_, Apr 14 2025 *) %o A230120 (PARI) a(n) = sum(k = 1, n, gcd(k, n) == 1 && !(hammingweight(k) % 2)); \\ _Amiram Eldar_, Nov 10 2024 %Y A230120 Cf. A000010, A001969, A230070, A027697, A027699. %K A230120 nonn,base,easy %O A230120 1,7 %A A230120 _Vladimir Shevelev_, Oct 10 2013