OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
MATHEMATICA
q[k_] := q[k] = Module[{w = DigitCount[k, 2, 1]}, Divisible[k, w] && Divisible[k/w, DigitCount[k/w, 2, 1]]]; Select[Range[20000], q[#] && q[#+1] &]
PROG
(PARI) is1(k) = {my(w = hammingweight(k)); !(k % w) && !((k/w) % hammingweight(k/w)); }
lista(kmax) = {my(q1 = is1(1), q2); for(k = 2, kmax, q2 = is1(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2); }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Oct 04 2024
STATUS
approved