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.

A173589 Integers whose binary representation contains exactly three 1's, no two 1's being adjacent.

Original entry on oeis.org

21, 37, 41, 42, 69, 73, 74, 81, 82, 84, 133, 137, 138, 145, 146, 148, 161, 162, 164, 168, 261, 265, 266, 273, 274, 276, 289, 290, 292, 296, 321, 322, 324, 328, 336, 517, 521, 522, 529, 530, 532, 545, 546, 548, 552, 577, 578, 580, 584, 592, 641, 642, 644, 648
Offset: 1

Views

Author

David Koslicki (koslicki(AT)math.psu.edu), Feb 22 2010

Keywords

Comments

Subsequence of A014311. [R. J. Mathar, Feb 24 2010]
A000120(a(n))=3; A023416(a(n))>1; 1 < A087116(a(n))<=3. [Reinhard Zumkeller, Mar 11 2010]

Examples

			a(1) = 21 = 10101_2.
a(2) = 37 = 100101_2.
a(3) = 41 = 101001_2.
		

Crossrefs

Programs

  • Maple
    seq(seq(seq(2^a+2^b+2^c, c=0..b-2),b=2..a-2),a=4..10); # Robert Israel, Dec 19 2016
  • Mathematica
    e31sQ[n_]:=Module[{idn2=IntegerDigits[n,2]},Total[idn2]==3 && SequenceCount[ idn2,{1,1}]==0]; Select[Range[700],e31sQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 20 2018 *)
  • Python
    from math import isqrt, comb
    from sympy import integer_nthroot
    def A173589(n): return (1<<(r:=n-1-comb((m:=integer_nthroot(6*n,3)[0])+(t:=(n>comb(m+2,3)))+1,3))-comb((k:=isqrt(b:=r+1<<1))+(b>k*(k+1)),2))+(1<<(a:=isqrt(s:=n-comb(m-(t^1)+2,3)<<1))+((s<<2)>(a<<2)*(a+1)+1)+1)+(1<Chai Wah Wu, Apr 07 2025

Extensions

More terms from R. J. Mathar, Feb 24 2010