A292832 a(n) is the least positive k, not a power of 2, such that the Hamming weight of k equals the Hamming weight of k^n, or 0 if no such k exists.
3, 3, 56953, 34225258495
Offset: 1
Examples
For n = 2: - 1 is a power of 2, - 2 is a power of 2, - A000120(3) = 2 and A000120(3^2) = 2, - hence a(2) = 3.
Programs
-
PARI
a(n) = forstep(k=3, oo, 2, if (hammingweight(k) == hammingweight(k^n), return (k)))
Comments