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.

Showing 1-5 of 5 results.

A099245 Numerator of relative frequency of number of ones in the binary representation of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 1, 3, 3, 1, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 5, 1, 1, 1, 2, 1, 2, 2, 5, 1, 2, 2, 5, 2, 5, 5, 1, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 08 2004

Keywords

Examples

			Fractions begin with 0, 1, 1/2, 1, 1/3, 2/3, 2/3, 1, 1/4, 1/2, 1/2, 3/4, ...
		

Crossrefs

Cf. A000120, A007088, A070939, A099244, A099246 (denominators).

Programs

  • Haskell
    import Data.Ratio ((%), numerator)
    a099245 n = numerator $ (a000120 n) % (a070939 n)
    -- Reinhard Zumkeller, Oct 10 2013
  • Mathematica
    a[n_] := Numerator[First[#]/Total[#]] & @ DigitCount[n, 2, {1, 0}]; Array[a, 100, 0] (* Amiram Eldar, Apr 05 2025 *)

Formula

a(n)*A070939(n) = A099246(n)*A000120(n).
a(n) = A000120(n)/A099244(n) for n > 0.
a(n) = if n=0 then 0 else A000120(n)/GCD(A070939(n), A000120(n)).

A099246 Denominator of relative frequency of number of ones in the binary representation of n.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 3, 1, 4, 2, 2, 4, 2, 4, 4, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 6, 3, 3, 2, 3, 2, 2, 3, 3, 2, 2, 3, 2, 3, 3, 6, 3, 2, 2, 3, 2, 3, 3, 6, 2, 3, 3, 6, 3, 6, 6, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 08 2004

Keywords

Crossrefs

Cf. A000120, A000225, A007088, A070939, A099244, A099245 (numerators).

Programs

  • Haskell
    import Data.Ratio ((%), denominator)
    a099246 n = denominator $ (a000120 n) % (a070939 n)
    -- Reinhard Zumkeller, Oct 10 2013
  • Mathematica
    a[n_] := Denominator[First[#]/Total[#]] & @ DigitCount[n, 2, {1, 0}]; Array[a, 100, 0] (* Amiram Eldar, Apr 05 2025 *)

Formula

a(n)*A000120(n) = A099245(n)*A070939(n).
a(n) = A070939(n)/A099244(n) for n > 0.
a(n) = 1 iff n = A000225(k).
a(n) = if n=0 then 1 else A070939(n)/GCD(A070939(n), A000120(n)).

A099247 Numbers such that, in binary representation, the length and the number of ones are coprime.

Original entry on oeis.org

1, 2, 4, 5, 6, 8, 11, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 47, 55, 59, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2004

Keywords

Crossrefs

Complement of A099248.

Programs

  • Haskell
    a099247 n = a099247_list !! (n-1)
    a099247_list = filter ((== 1) . a099244) [1..]
    -- Reinhard Zumkeller, Oct 10 2013
    
  • Mathematica
    Select[Range[150],CoprimeQ[IntegerLength[#,2],DigitCount[#,2,1]]&] (* Harvey P. Dale, Sep 22 2012 *)
  • PARI
    isok(k) = {my(b = binary(k)); gcd(#b, vecsum(b)) == 1;} \\ Amiram Eldar, Jul 26 2025

Formula

A099244(a(n)) = 1.

Extensions

Definition clarified by Harvey P. Dale, Sep 22 2012

A099248 Numbers such that length in binary representation and number of ones have a common divisor greater than 1.

Original entry on oeis.org

3, 7, 9, 10, 12, 15, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 60, 63, 127, 129, 130, 132, 135, 136, 139, 141, 142, 144, 147, 149, 150, 153, 154, 156, 159, 160, 163, 165, 166, 169, 170, 172, 175, 177, 178, 180
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2004

Keywords

Crossrefs

Complement of A099247.

Programs

  • Haskell
    a099248 n = a099248_list !! (n-1)
    a099248_list = filter ((> 1) . a099244) [1..]
    -- Reinhard Zumkeller, Oct 10 2013
  • Mathematica
    Select[Range[200], !CoprimeQ[BitLength[#], DigitCount[#, 2, 1]] &] (* Amiram Eldar, Jul 16 2023 *)

Formula

A099244(a(n)) > 1.

Extensions

Corrected by Leroy Quet, Sep 04 2008
a(34) and beyond from Diana L. Mecum, Jan 04 2009

A099249 Number of numbers not greater than n such that length in binary representation and number of ones are coprime.

Original entry on oeis.org

1, 2, 2, 3, 4, 5, 5, 6, 6, 6, 7, 7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 28, 28, 29, 30, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2004

Keywords

Comments

Number of numbers m <= n such that A099244(m) = 1.

Crossrefs

Programs

  • Haskell
    a099249 n = a099249_list !! (n-1)
    a099249_list = scanl1 (+) $ map ((0 ^) . (subtract 1)) a099244_list
    -- Reinhard Zumkeller, Oct 10 2013
    
  • Mathematica
    Accumulate[Table[Boole[CoprimeQ[BitLength[n], DigitCount[n, 2, 1]]], {n, 1, 100}]] (* Amiram Eldar, Jul 16 2023 *)
  • PARI
    isA099247(k) = {my(b = binary(k)); gcd(#b, vecsum(b)) == 1;}
    list(nmax) = {my(c = 0); for(n = 1, nmax, if(isA099247(n), c++); print1(c, ", "));} \\ Amiram Eldar, Jul 26 2025

Formula

a(n) = Sum_{k=1..n} A063524(A099244(k)). - Reinhard Zumkeller, Oct 10 2013
Showing 1-5 of 5 results.