cp's OEIS Frontend

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.

A125494 Composite evil numbers.

This page as a plain text file.
%I A125494 #15 Dec 09 2019 09:20:17
%S A125494 6,9,10,12,15,18,20,24,27,30,33,34,36,39,40,45,46,48,51,54,57,58,60,
%T A125494 63,65,66,68,72,75,77,78,80,85,86,90,92,95,96,99,102,105,106,108,111,
%U A125494 114,116,119,120,123,125,126,129,130,132,135,136,141,142,144,147,150,153
%N A125494 Composite evil numbers.
%H A125494 Amiram Eldar, <a href="/A125494/b125494.txt">Table of n, a(n) for n = 1..10000</a>
%e A125494 12 is in the sequence since it is composite and its base-2 representation (1100) has an even number of 1's.
%p A125494 a:=proc(n) local n2: n2:=convert(n,base,2): if add(n2[j],j=1..nops(n2)) mod 2 = 0 and isprime(n)=false then n else fi end: seq(a(n),n=1..180); # _Emeric Deutsch_, Jan 01 2007
%t A125494 Select[Range[153], EvenQ @ DigitCount[#, 2][[1]] && CompositeQ[#] &] (* _Amiram Eldar_, Dec 09 2019 *)
%o A125494 (PARI) isok(n) = (n>0) && !isprime(n) && !(hammingweight(n) % 2); \\ _Michel Marcus_, Mar 29 2019
%Y A125494 Intersection of A002808 (composite numbers) and A001969 (evil numbers).
%Y A125494 Cf. A027699 (evil primes).
%K A125494 base,nonn
%O A125494 1,1
%A A125494 _Tanya Khovanova_, Dec 27 2006
%E A125494 Corrected and extended by _Emeric Deutsch_, Jan 01 2007