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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A351836 Smallest evil number k (member of A001969) such that k*n is also evil. 1
3, 3, 3, 3, 3, 3, 9, 3, 3, 3, 3, 3, 3, 9, 3, 3, 3, 3, 3, 3, 3, 3, 9, 3, 3, 3, 5, 9, 15, 3, 33, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 9, 3, 3, 3, 3, 3, 3, 3, 5, 3, 9, 9, 15, 3, 3, 3, 33, 3, 3, 3, 3, 3, 3, 3, 3, 9, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

All terms are odd since if 2*j and 2*j*n are both evil, then so are j and j*n. - Michael S. Branicky, Feb 21 2022

LINKS

Table of n, a(n) for n=1..86.

EXAMPLE

For n = 7 both 9 and 9*7 are evil and no smaller multiple of 7 works.

MATHEMATICA

evilQ[n_] := EvenQ[DigitCount[n, 2, 1]]; a[n_] := Module[{k = 1}, While[!evilQ[k] || !evilQ[k*n], k++]; k]; Array[a, 100] (* Amiram Eldar, Feb 21 2022 *)

PROG

(Python)

def ev(n): return bin(n).count("1")%2 == 0

def a(n):

k = 3

while not (ev(k) and ev(k*n)): k += 1

return k

print([a(n) for n in range(1, 87)]) # Michael S. Branicky, Feb 21 2022

(PARI) isevil(m) = !(hammingweight(m) % 2);

a(n) = my(k=1); while (!isevil(k) || !isevil(k*n), k++); k; \\ Michel Marcus, Feb 22 2022

CROSSREFS

Cf. A001969, A351835 (analog for the odious numbers A000069).

Cf. A180938 (where k is not necessarily evil).

Sequence in context: A210746 A283986 A343515 * A105159 A334625 A209291

Adjacent sequences: A351833 A351834 A351835 * A351837 A351838 A351839

KEYWORD

nonn,base

AUTHOR

Jeffrey Shallit, Feb 21 2022

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 November 29 13:42 EST 2022. Contains 358430 sequences. (Running on oeis4.)