OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
MAPLE
g:= proc(n) convert(convert(n, base, 2), `+`) end proc:
f:= proc(n) local t, r;
min(seq(g(t)*g(n/t), t = numtheory:-divisors(n) minus {1, n}))
end proc:
map(f, remove(isprime, [seq(i, i=3..1000, 2)]));
PROG
(Python)
from sympy import primepi, divisors
def A365476(n):
if n == 1: return 4
m, k = n, primepi(n) + n + (n>>1)
while m != k:
m, k = k, primepi(k) + n + (k>>1)
return min(int(d).bit_count()*int(m//d).bit_count() for d in divisors(m, generator=True) if 1<d<m) # Chai Wah Wu, Aug 02 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Sep 04 2023
STATUS
approved