A272608 Number of positive integers k such that both n/(k + 2^x) and n/(n/k - 2^y) are integers for some nonnegative x, y.
0, 1, 1, 2, 1, 2, 0, 3, 1, 2, 0, 4, 0, 0, 1, 4, 1, 2, 0, 3, 1, 0, 0, 6, 0, 0, 0, 0, 0, 3, 0, 5, 2, 2, 1, 4, 0, 0, 0, 4, 0, 2, 0, 0, 1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 5, 0, 0, 1, 6, 2, 4, 0, 2, 0, 1, 0, 6, 0, 0, 0, 0, 1, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2
Offset: 1
Keywords
Examples
a(9) = 1 because both 9/(1 + 2^1) = 3 and 9/(9/1 - 2^4) = 1 are integers. a(68) = 3 because (1) 68/(1 + 2^0) = 34 and 68/(68 - 2^6) = 17, (2) 68/(2 + 2^1) = 17 and 68/(34 - 2^5) = 34, and (3) 68/(4 + 2^6) = 1 and 68/(17 - 2^4) = 68 are all integers.
Programs
-
PARI
t1(n,k)=for(x=0,logint(n,2), if(n%(k+2^x)==0, return(1))); 0 t2(n,d)=for(y=0,logint(d-1,2), if(n%(d-2^y)==0, return(1))); 0 a(n)=sumdiv(n,k, k
Charles R Greathouse IV, Nov 09 2016
Formula
a(2^n) = n, a(A092506(n)) = 1.
Extensions
a(68), a(70), a(90) corrected by Charles R Greathouse IV, Nov 09 2016
Comments