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.

Previous Showing 11-16 of 16 results.

A139373 Let the binary expansion of n be n = Sum_{k} 2^{r_k}, let e(n) be the number of r_k's that are even, o(n) the number that are odd; sequence lists n such that e(n) > o(n).

Original entry on oeis.org

1, 4, 5, 7, 13, 16, 17, 19, 20, 21, 22, 23, 25, 28, 29, 31, 37, 49, 52, 53, 55, 61, 64, 65, 67, 68, 69, 70, 71, 73, 76, 77, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 97, 100, 101, 103, 109, 112, 113, 115, 116, 117, 118, 119, 121, 124
Offset: 1

Views

Author

Nadia Heninger and N. J. A. Sloane, Jun 07 2008

Keywords

Comments

e(n)+o(n) = A000120(n), the binary weight of n. For e(n) = o(n) see A039004.

Crossrefs

Programs

  • Fortran
    c See link in A139351
    
  • Mathematica
    aQ[n_] := Module[{d = Reverse[IntegerDigits[n,2]]}, Total@d[[1;;-1;;2]] > Total@d[[2;;-1;;2]]]; Select[Range[180], aQ] (* Amiram Eldar, Dec 15 2018 *)
  • PARI
    isok(n) = {my(irb = Vec(select(x->(x%2), Vecrev(binary(n)), 1))); #select(x->(x%2), irb) > #irb/2;} \\ Michel Marcus, Dec 15 2018

A366247 The number of infinitary divisors of n that are "Fermi-Dirac primes" (A050376) and terms of A366243.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Amiram Eldar, Oct 05 2023

Keywords

Comments

First differs from A101436 at n = 32.

Crossrefs

Programs

  • Mathematica
    s[0] = 0; s[n_] := s[n] = s[Floor[n/4]] + If[Mod[n, 4] > 1, 1, 0]; f[p_, e_] := s[e]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    s(e) = if(e>3, s(e\4)) + e%4\2 \\ after Charles R Greathouse IV at A139352
    a(n) = vecsum(apply(s, factor(n)[, 2]));

Formula

Additive with a(p^e) = A139352(e).
a(n) = A064547(n) - A366246(n).
a(n) = A064547(A366245(n)).
a(n) >= 0, with equality if and only if n is in A366242.
a(n) <= A064547(n), with equality if and only if n is in A366243.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} f(1/p) = 0.39310573826635831710..., where f(x) = Sum_{k>=0} (x^(2*4^k)/(1+x^(2*4^k))).

A037863 a(n) = (number of digits <=1) - (number of digits >1) in base 4 representation of n.

Original entry on oeis.org

1, -1, -1, 2, 2, 0, 0, 0, 0, -2, -2, 0, 0, -2, -2, 3, 3, 1, 1, 3, 3, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -3, -3, -1, -1, -3, -3, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -3, -3, -1, -1, -3, -3, 4, 4, 2, 2, 4, 4, 2, 2, 2, 2, 0, 0
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A037863 := proc(n)
        a := 0 ;
        dgs := convert(n,base,4);
        for i from 1 to nops(dgs) do
            if op(i,dgs)<=1 then
                a := a+1 ;
            else
                a := a-1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Oct 16 2015
  • PARI
    a(n) = my(d=digits(n, 4)); #select(x->(x<=1), d) - #select(x->(x>1), d); \\ Michel Marcus, Jan 27 2025

Formula

a(n) = A110591(n)-2*A139352(n). - R. J. Mathar, Jan 27 2025

A366309 The number of infinitary divisors of n that are terms of A366243.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Amiram Eldar, Oct 06 2023

Keywords

Crossrefs

Programs

  • Mathematica
    s[0] = 0; s[n_] := s[n] = s[Floor[n/4]] + If[Mod[n, 4] > 1, 1, 0]; f[p_, e_] := 2^s[e]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    s(e) = if(e > 3, s(e\4)) + e%4\2 \\ after Charles R Greathouse IV at A139352
    a(n) = vecprod(apply(x -> 2^s(x), factor(n)[, 2]));

Formula

Multiplicative with a(p^e) = 2^A139352(e).
a(n) = 2^A366247(n).
a(n) = A037445(n)/A366308(n).
a(n) = A037445(A366245(n)).
a(n) >= 1, with equality if and only if n is in A366242.
a(n) <= A037445(n), with equality if and only if n is in A366243.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Product_{p prime} (1 - 1/p)*(1 + Sum_{k>=1} 2^A139352(k)/p^k) = 1.44736831993091923328... .

A165274 Table read by antidiagonals: T(n, k) is the k-th number with n-1 even-power summands in its base 2 representation.

Original entry on oeis.org

2, 8, 1, 10, 3, 5, 32, 4, 7, 21, 34, 6, 13, 23, 85, 40, 9, 15, 29, 87, 341, 42, 11, 17, 31, 93, 343, 1365, 128, 12, 19, 53, 95, 349, 1367, 5461, 130, 14, 20, 55, 117, 351, 1373, 5463, 21845, 136, 16, 22, 61, 119, 373, 1375, 5469, 21847, 87381, 138, 18, 25, 63
Offset: 1

Views

Author

Clark Kimberling, Sep 12 2009

Keywords

Comments

For n>=0, row n is the ordered sequence of positive integers m such that the number of even powers of 2 in the base 2 representation of m is n.
Every positive integer occurs exactly once in the array, so that as a sequence it is a permutation of the positive integers.
For odd powers, see A165275.
For the number of even powers of 2 in the base 2 representation of n, see A139351; for odd, see A139352.
Essentially, (Row 0)=A062880, (Row 1)=A158705, (Column 1)=A002450, also possibly (Column 2)=A163832.

Examples

			Northwest corner:
2....8...10...32...34...40...42...129
1....3....4....6....9...11...12...14
5....7...13...15...17...19...20...22
21..23...29...31...53...55...61...63
Examples:
40 = 32 + 8 = 2^5 + 2^3, so that 40 is in row 0.
13 = 8 + 4 + 1 = 2^3 + 2^2 + 2^0, so that 13 is in row 2.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Total[(Reverse@IntegerDigits[n, 2])[[1 ;; -1 ;; 2]]]; T = GatherBy[ SortBy[Range[10^5], f], f]; Table[Table[T[[n - k + 1, k]], {k, n, 1, -1}], {n, 1, Length[T]}] // Flatten (* Amiram Eldar, Feb 04 2020*)

Extensions

More terms from Amiram Eldar, Feb 04 2020

A165275 Table read by antidiagonals: T(n, k) is the k-th number with n-1 odd-power summands in its base 2 representation.

Original entry on oeis.org

1, 4, 2, 5, 3, 10, 16, 6, 11, 42, 17, 7, 14, 43, 170, 20, 8, 15, 46, 171, 682, 21, 9, 26, 47, 174, 683, 2730, 64, 12, 27, 58, 175, 686, 2731, 10922, 65, 13, 30, 59, 186, 687, 2734, 10923, 43690, 68, 18, 31, 62, 187, 698, 2735, 10926, 43691, 174762, 69, 19, 34
Offset: 1

Views

Author

Clark Kimberling, Sep 12 2009

Keywords

Comments

For n>=0, row n is the ordered sequence of positive integers m such that the number of odd powers of 2 in the base 2 representation of m is n.
Every positive integer occurs exactly once in the array, so that as a sequence it is a permutation of the positive integers.
For even powers, see A165274. For the number of even powers of 2 in the base 2 representation of n, see A139351; for odd, see A139352.
Essentially, (Row 0)=A000695, (Column 1)=A020988, also possibly (Column 2)=A007583.
It appears that, for n>=3, a(t(n)) = 4*a(t(n-1))+2, where t(n) is the n-th triangular number t(n)=n(n+1)/2 (A000217). [John W. Layman, Sep 15 2009]

Examples

			Northwest corner:
  1....4....5...16...17...20...21...64
  2....3....6....7....8....9...12...13
  10..11...14...26...27...30...31...34
  42..43...46...47...58...59...62...63
Examples:
20 = 16 + 4 = 2^4 + 2^2, so that 20 is in row 0.
13 = 8 + 4 + 1 = 2^3 + 2^2 + 2^0, so that 13 is in row 1.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Total[(Reverse@IntegerDigits[n, 2])[[2 ;; -1 ;; 2]]]; T = GatherBy[ SortBy[Range[10^5], f], f]; Table[Table[T[[n - k + 1, k]], {k, n, 1, -1}], {n, 1, Length[T]}] // Flatten (* Amiram Eldar, Feb 04 2020*)

Extensions

a(27) corrected and a(28)-a(54) added by John W. Layman, Sep 15 2009
More terms from Amiram Eldar, Feb 04 2020
Previous Showing 11-16 of 16 results.