cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A379267 Numbers whose binary representation contains exactly two zeros.

Original entry on oeis.org

4, 9, 10, 12, 19, 21, 22, 25, 26, 28, 39, 43, 45, 46, 51, 53, 54, 57, 58, 60, 79, 87, 91, 93, 94, 103, 107, 109, 110, 115, 117, 118, 121, 122, 124, 159, 175, 183, 187, 189, 190, 207, 215, 219, 221, 222, 231, 235, 237, 238, 243, 245, 246, 249, 250, 252, 319, 351
Offset: 1

Views

Author

Chai Wah Wu, Dec 19 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[351],Count[IntegerDigits[#,2],0]==2&] (* James C. McMahon, Dec 20 2024 *)
  • Python
    from math import isqrt, comb
    from sympy import integer_nthroot
    def A379267(n):
        a = (m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2,3))+2
        b = isqrt((j:=comb(a,3)-n+1)<<3)+1>>1
        c = j-comb((r:=isqrt(w:=j<<1))+(w>r*(r+1)),2)-1
        return (1<
    				

Formula

a(n) = (A357773(n)-1)/2.
A023416(a(n)) = 2.
Sum_{n>=1} 1/a(n) = 1.4121825365494357179372249141360906507417257788239800327155414852526863441610798293625536351899799813... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Dec 21 2024