A361943 a(n) is the least multiple of n whose binary expansion is an abelian square (A272653).
3, 10, 3, 36, 10, 36, 63, 136, 9, 10, 33, 36, 130, 154, 15, 528, 34, 36, 190, 520, 63, 132, 46, 528, 150, 130, 54, 588, 725, 150, 1023, 2080, 33, 34, 630, 36, 222, 190, 156, 520, 615, 588, 43, 132, 45, 46, 235, 528, 147, 150, 51, 156, 53, 54, 165, 2296, 513
Offset: 1
Examples
The first terms, alongside their binary expansion, are: n a(n) bin(a(n)) -- ---- ---------- 1 3 11 2 10 1010 3 3 11 4 36 100100 5 10 1010 6 36 100100 7 63 111111 8 136 10001000 9 9 1001 10 10 1010 11 33 100001 12 36 100100 13 130 10000010 14 154 10011010 15 15 1111 16 528 1000010000
Programs
-
PARI
a(n) = { forstep (m = n, oo, n, my (w = #binary(m)); if (w%2==0 && hammingweight(m)==2*hammingweight(m % (2^(w/2))), return (m))) }
-
Python
from itertools import count def a(n): return next(m for m in count(n, n) if not (w:=m.bit_length())&1 and m.bit_count() == ((m>>(w>>1)).bit_count())<<1) print([a(n) for n in range(1, 60)]) # Michael S. Branicky, Mar 31 2023 after Rémy Sigrist
Comments