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.

A361944 a(n) is the least k > 0 such that the binary expansion of k*n is an abelian square (A272653).

Original entry on oeis.org

3, 5, 1, 9, 2, 6, 9, 17, 1, 1, 3, 3, 10, 11, 1, 33, 2, 2, 10, 26, 3, 6, 2, 22, 6, 5, 2, 21, 25, 5, 33, 65, 1, 1, 18, 1, 6, 5, 4, 13, 15, 14, 1, 3, 1, 1, 5, 11, 3, 3, 1, 3, 1, 1, 3, 41, 9, 37, 11, 10, 3, 39, 1, 129, 2, 2, 3, 2, 9, 9, 8, 11, 3, 3, 2, 27, 2, 2, 3
Offset: 1

Views

Author

Rémy Sigrist, Mar 31 2023

Keywords

Examples

			a(8) = A361943(8)/8 = 136/8 = 17.
		

Crossrefs

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/n))) }
    
  • Python
    from itertools import count
    def a(n): return next(m//n 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, 80)]) # Michael S. Branicky, Mar 31 2023 after Rémy Sigrist

Formula

a(n) = A361943(n) / n.
a(n) = 1 iff n belongs to A272653.