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 31-38 of 38 results.

A129195 a(n) = denominator(n!/4^n).

Original entry on oeis.org

1, 4, 8, 32, 32, 128, 256, 1024, 512, 2048, 4096, 16384, 16384, 65536, 131072, 524288, 131072, 524288, 1048576, 4194304, 4194304, 16777216, 33554432, 134217728, 67108864, 268435456, 536870912, 2147483648, 2147483648, 8589934592, 17179869184, 68719476736
Offset: 0

Views

Author

Paul Barry, Apr 02 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Denominator[n!/4^n],{n,0,30}] (* Harvey P. Dale, Mar 05 2013 *)

Formula

a(n) = denominator((1/(2*Pi))*int(exp(i*4*t)(-((Pi-t)/i)^n),t,0,2*Pi)), i=sqrt(-1).
a(n) = 2^A092391(n).

A348368 Numbers k such that w(k + w(k)) < w(k), where w(k) is the binary weight of k, A000120(k).

Original entry on oeis.org

6, 7, 13, 14, 15, 21, 29, 30, 31, 37, 45, 46, 47, 55, 59, 60, 61, 62, 63, 69, 77, 78, 79, 87, 91, 92, 93, 94, 95, 103, 107, 108, 109, 111, 115, 123, 124, 125, 126, 127, 133, 141, 142, 143, 151, 155, 156, 157, 158, 159, 167, 171, 172, 173, 175, 179, 187, 188, 189
Offset: 1

Views

Author

Ctibor O. Zizka, Oct 15 2021

Keywords

Examples

			k = 91; A000120(91 + A000120(91)) < A000120(91), thus k = 91 is a term.
		

Crossrefs

Programs

  • Maple
    q:= n-> (wt-> is(wt(n+wt(n)) add(i, i=Bits[Split](k))):
    select(q, [$0..200])[];  # Alois P. Heinz, Oct 15 2021
  • Mathematica
    h[n_] := DigitCount[n, 2, 1]; q[n_] := h[n + (hn = h[n])] < hn; Select[Range[200], q] (* Amiram Eldar, Oct 15 2021 *)
  • Python
    def h(n): return bin(n).count('1')
    def ok(n): return h(n + h(n)) < h(n)
    print(list(filter(ok, range(1, 190)))) # Michael S. Branicky, Oct 15 2021

Formula

k : A000120(A092391(k)) < A000120(k); A348367(k) < A000120(k).

A374348 a(n) = k where wt(k) = n and k + wt(k) = a power of two, where wt(n) = A000120(n) = binary weight of n.

Original entry on oeis.org

1, 6, 13, 60, 59, 250, 505, 2040, 1015, 4086, 8181, 32756, 32755, 131058, 262129, 1048560, 262127, 1048558, 2097133, 8388588, 8388587, 33554410, 67108841, 268435432, 134217703, 536870886, 1073741797, 4294967268, 4294967267, 17179869154, 34359738337, 137438953440
Offset: 1

Views

Author

Steven Reyes, Jul 05 2024

Keywords

Comments

k is uniquely determined by finding the power of two for which k = 2^x - n has wt(k) = n.
Terms are not always increasing, since the number of 0 bits in n-1 reduces k.

Examples

			For n = 4, 60 in binary is 111100, which has sum of digits of 4, and 60 + 4 = 64, a power of two.
For n = 5, 59 in binary is 111011, which has sum of digits of 5, and 59 + 5 = 64.
		

Crossrefs

Programs

  • Maple
    a:= n-> 2^(n+add(i, i=Bits[Split](n-1)))-n:
    seq(a(n), n=1..32);  # Alois P. Heinz, Jul 05 2024
  • Python
    def a(n):
      return (1 << (n + (n-1).bit_count())) - n

Formula

a(n) = 2^A230300(n) - n.
a(n) = 2^(n + A000120(n-1)) - n.
a(n) = 2 * A129195(n-1) - n.
a(n) == n (mod 2).

A228952 A010062(2^n-1).

Original entry on oeis.org

1, 2, 5, 14, 38, 92, 216, 518, 1165, 2641, 5981, 13215, 28880, 62481, 133539, 281878, 595867, 1257995, 2656439, 5585174, 11751388, 24708442, 51644779, 107729838, 224507391, 467923765, 971364960, 2016542071
Offset: 0

Views

Author

M. F. Hasler, Oct 05 2013

Keywords

Comments

Arises in studying the asymptotics of A010062.

Crossrefs

Cf. A229167.

Programs

  • PARI
    s=1;for(n=0,30,for(i=2^n+1,2^(n+1),s+=hammingweight(s));print1(s","))

Formula

A010062(2^n) = A092391(a(n)).

A272652 a(n) is the smallest even number which has n inverse images under the map x -> x + (binary weight of x).

Original entry on oeis.org

0, 14, 134, 4102, 87112285931760246646623899502532662132742, 1852673427797059126777135760139006525652319754650249024631321344126610074239106
Offset: 1

Views

Author

Max Alekseyev and N. J. A. Sloane, May 13 2016

Keywords

Comments

If the word "even" is omitted the sequence is A230303.
The next term is a(7) = 2^4233 + 130.

Examples

			The smallest number with two inverses is 14: the inverses are 11 = 1011_2 which maps to 11+3 = 14, and 12 = 1100_2 which maps to 12+2 = 14.
		

Crossrefs

A348340 For n >= 1; x = n, then iterate x --> x + h(x) until h(x + h(x)) >= h(x). a(n) gives the number of iteration steps where h(i) is A000120(i).

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, Oct 13 2021

Keywords

Comments

a(n) = 1 for n such that A000120(n + A000120(n)) < A000120(n).

Examples

			n = 19; x(1) = 19 + h(19) = 22, h(22) >= h(19) thus x(2) = 22 + h(22) = 25, h(25) >= h(22) thus x(3) = 25 + h(25) = 28, h(28) >= h(25) thus x(4) = 28 + h(28) = 31, h(31) >= h(28) thus x(5) =  31 + h(31) = 36, h(36) < h(31) thus stop. a(19) = 5. h(i) is A000120(i).
		

Crossrefs

Programs

  • Mathematica
    h[n_] := DigitCount[n, 2, 1]; x[n_] := n + h[n]; a[n_] := Length@ NestWhileList[x, n, h[#] <= h[x[#]] &]; Array[a, 110] (* Amiram Eldar, Oct 15 2021 *)

A352776 Numbers k such that w(k + w(k)) = w(k), where w(k) is the binary weight of k, A000120(k).

Original entry on oeis.org

0, 1, 3, 10, 11, 18, 19, 22, 23, 25, 34, 35, 38, 39, 41, 49, 53, 54, 66, 67, 70, 71, 73, 81, 85, 86, 97, 101, 102, 110, 116, 117, 119, 130, 131, 134, 135, 137, 145, 149, 150, 161, 165, 166, 174, 180, 181, 183, 193, 197, 198, 206, 212, 213, 215, 228, 229, 231, 236, 237, 243, 246, 247, 258, 259, 262, 263, 265, 273
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 02 2022

Keywords

Comments

w(k + w(k)) - w(k) = 0 this sequence, w(k + w(k)) - w(k) = 2 for k = 4*j, where A000120(j) = 3.

Examples

			k = 18; A000120(18 + A000120(18)) = A000120(18), thus k = 18 is a term.
		

Crossrefs

Programs

  • Mathematica
    w[n_] := DigitCount[n, 2, 1]; Select[Range[0, 300], w[# + w[#]] == w[#] &] (* Amiram Eldar, Apr 02 2022 *)
  • Python
    def w(n): return bin(n).count("1")
    def ok(n): wn = w(n); return w(n + wn) == wn
    print([k for k in range(274) if ok(k)]) # Michael S. Branicky, Apr 02 2022

Formula

k : A000120(A092391(k)) = A000120(k); A348367(k) = A000120(k).

A352778 Numbers k such that w(k + w(k)) > w(k), where w(k) is the binary weight of k, A000120(k).

Original entry on oeis.org

2, 4, 5, 8, 9, 12, 16, 17, 20, 24, 26, 27, 28, 32, 33, 36, 40, 42, 43, 44, 48, 50, 51, 52, 56, 57, 58, 64, 65, 68, 72, 74, 75, 76, 80, 82, 83, 84, 88, 89, 90, 96, 98, 99, 100, 104, 105, 106, 112, 113, 114, 118, 120, 121, 122, 128, 129, 132, 136, 138, 139, 140, 144, 146, 147, 148, 152, 153, 154, 160, 162, 163, 164
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 02 2022

Keywords

Examples

			k = 17; A000120(17 + A000120(17)) > A000120(17), thus k = 17 is a term.
		

Crossrefs

Programs

  • Mathematica
    w[n_] := DigitCount[n, 2, 1]; Select[Range[200], w[# + w[#]] > w[#] &] (* Amiram Eldar, Apr 02 2022 *)
  • Python
    def w(n): return bin(n).count("1")
    def ok(n): wn = w(n); return w(n + wn) > wn
    print([k for k in range(165) if ok(k)]) # Michael S. Branicky, Apr 02 2022

Formula

k : A000120(A092391(k)) > A000120(k); A348367(k) > A000120(k).
Previous Showing 31-38 of 38 results.