login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A093688 Numbers m such that all divisors of m, excluding the divisor 1, have an even number of 1's in their binary expansions. 10
1, 3, 5, 9, 15, 17, 23, 27, 29, 43, 45, 51, 53, 71, 83, 85, 89, 101, 113, 129, 135, 139, 149, 153, 159, 163, 197, 215, 249, 255, 257, 263, 267, 269, 277, 281, 293, 303, 311, 317, 337, 347, 349, 353, 359, 373, 383, 387, 389, 401, 417, 447, 449, 459, 461, 467, 479 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Putting the 1 aside, these could be called odiousfree numbers, and are a subsequence of A001969. A093696 would be the evilfree numbers then. - Irina Gerasimova, Feb 08 2014.
Equivalently, numbers all of whose divisors > 1 are evil (A001969). - Bernard Schott, Jul 24 2022
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
51 is in the sequence because, excluding 1, its divisors are 3, 17 and 51.
In binary: 11, 10001, 110011 all have an even number of 1's.
MATHEMATICA
okQ[n_] := AllTrue[Rest[Divisors[n]], EvenQ[Total[IntegerDigits[#, 2]]]&]; Select[Range[500], okQ] (* Jean-François Alcover, Dec 06 2015 *)
PROG
(PARI) is(n)=sumdiv(n, d, hammingweight(d)%2)==1 \\ Charles R Greathouse IV, Mar 28 2013
(Python)
from sympy import divisors
def c(n): return n == 1 or bin(n).count("1")&1 == 0
def ok(n): return n > 0 and all(c(d) for d in divisors(n, generator=True))
print([k for k in range(480) if ok(k)]) # Michael S. Branicky, Jul 24 2022
CROSSREFS
Sequence in context: A116649 A129771 A209837 * A143512 A174688 A339345
KEYWORD
nonn,base,easy
AUTHOR
Jason Earls, May 16 2004
EXTENSIONS
a(1) added by Charles R Greathouse IV, Mar 28 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 3 04:26 EDT 2024. Contains 373965 sequences. (Running on oeis4.)