OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
37 has 2 divisors. 37 in binary is 100101. 2 in binary is 10. 10 occurs in two places in 100101: (10)0(10)1. So 37 occurs in this sequence.
MAPLE
filter:= proc(n) local L, t, Lt, m, mt;
L:= convert(n, base, 2);
m:= nops(L);
Lt:= convert(numtheory:-tau(n), base, 2);
mt:= nops(Lt);
ormap(i -> L[i..i+mt-1]=Lt, [$1..m-mt+1]);
end proc:
select(filter, [$1..1000]); # Robert Israel, Jun 17 2021
MATHEMATICA
Select[Range[115], SequenceCount[IntegerDigits[#, 2], IntegerDigits[DivisorSigma[0, #], 2]]>0&] (* James C. McMahon, Aug 18 2025 *)
PROG
(Python)
from sympy import divisor_count
def ok(n): return bin(divisor_count(n))[2:] in bin(n)[2:]
print([k for k in range(1, 116) if ok(k)]) # Michael S. Branicky, Aug 18 2025
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Aug 03 2008
EXTENSIONS
Extended by Ray Chandler, Nov 09 2008
STATUS
approved
