login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A379269
Numbers whose binary representation has exactly three zeros.
2
8, 17, 18, 20, 24, 35, 37, 38, 41, 42, 44, 49, 50, 52, 56, 71, 75, 77, 78, 83, 85, 86, 89, 90, 92, 99, 101, 102, 105, 106, 108, 113, 114, 116, 120, 143, 151, 155, 157, 158, 167, 171, 173, 174, 179, 181, 182, 185, 186, 188, 199, 203, 205, 206, 211, 213, 214, 217
OFFSET
1,1
LINKS
Robert Baillie and Thomas Schmelzer, Summing Kempner's Curious (Slowly-Convergent) Series, Mathematica Notebook kempnerSums.nb, Wolfram Library Archive, 2008.
FORMULA
a(n) = (A360573(n)-1)/2.
A023416(a(n)) = 3.
Let a = floor((24n)^(1/4))+3 if n>binomial(floor((24n)^(1/4))+2,4) and a = floor((24n)^(1/4))+2 otherwise. Let j = binomial(a,4)-n. Then a(n) = 2^a-1-2^(A360010(j+1)+1)-2^(A056557(j)+1)-2^(A333516(j+1)-1).
Sum_{n>=1} 1/a(n) = 1.3949930090659130972172214185888677947877214389482588641632435250211546702139813215203065255971026537... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Dec 21 2024
MATHEMATICA
Select[Range[2^8], Count[IntegerDigits[#, 2], 0]==3&] (* James C. McMahon, Dec 20 2024 *)
PROG
(Python)
from math import comb, isqrt
from sympy import integer_nthroot
def A056557(n): return (k:=isqrt(r:=n+1-comb((m:=integer_nthroot(6*(n+1), 3)[0])-(n<comb(m+2, 3))+2, 3)<<1))-((r<<2)<=(k<<2)*(k+1)+1)
def A333516(n): return (r:=n-1-comb((m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2, 3))+1, 3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)), 2)+1
def A360010(n): return (m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2, 3))
def A379269(n):
a = (a2:=integer_nthroot(24*n, 4)[0])+(n>comb(a2+2, 4))+2
j = comb(a, 4)-n
b, c, d = A360010(j+1)+1, A056557(j)+1, A333516(j+1)-1
return (1<<a)-(1<<b)-(1<<c)-(1<<d)-1
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Dec 19 2024
STATUS
approved