OFFSET
1,1
COMMENTS
LINKS
Ely Golden, Table of n, a(n) for n = 1..10000
PROG
(SageMath)
def factorbits(x):
if(x<2):
return (0, 0);
s=0; t=0
f=list(factor(x));
#ensures inequality of numfactorbits(x) and bin(x).count("1") if x is prime
if((len(f)==1)&(f[0][1]==1)):
return (0, 0);
for c in range(len(f)):
s+=bin(f[c][0]).count("1")*f[c][1]
t+=(bin(f[c][0]).count("0")-1)*f[c][1]
return (s, t);
counter=2
index=1
while(index<=10000):
if(factorbits(counter)==(bin(counter).count("1"), bin(counter).count("0")-1)):
print(str(index)+" "+str(counter))
index+=1;
counter+=1;
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ely Golden, Jan 11 2017
STATUS
approved