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.

A360980 a(n) is the least multiple of n that is an odious number (A000069).

Original entry on oeis.org

1, 2, 21, 4, 25, 42, 7, 8, 81, 50, 11, 84, 13, 14, 285, 16, 289, 162, 19, 100, 21, 22, 69, 168, 25, 26, 81, 28, 87, 570, 31, 32, 1089, 578, 35, 324, 37, 38, 117, 200, 41, 42, 301, 44, 405, 138, 47, 336, 49, 50, 357, 52, 265, 162, 55, 56, 171, 174, 59, 1140, 61
Offset: 1

Views

Author

Rémy Sigrist, Feb 27 2023

Keywords

Comments

This sequence is well defined (see A178757).

Crossrefs

Cf. A000069, A178757, A360981 (variant for evil numbers).

Programs

  • Maple
    f:= proc(n) local k;
      for k from n by n do
        if convert(convert(k,base,2),`+`)::odd then return k fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Mar 29 2023
  • Mathematica
    a[n_] := Module[{k = n}, While[EvenQ[DigitCount[k, 2, 1]], k +=n]; k]; Array[a, 100] (* Amiram Eldar, Aug 07 2023 *)
  • PARI
    a(n) = { forstep (m=n, oo, n, if (hammingweight(m)%2==1, return (m))) }
    
  • Python
    def A360980(n):
        k = n
        while k.bit_count()&1^1:
            k += n
        return k # Chai Wah Wu, Feb 28 2023

Formula

a(n) = A178757(n) * n.
a(n) = n iff n belongs to A000069.