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-3 of 3 results.

A092391 a(n) = n + wt(n), where wt(n) = A000120(n) = binary weight of n.

Original entry on oeis.org

0, 2, 3, 5, 5, 7, 8, 10, 9, 11, 12, 14, 14, 16, 17, 19, 17, 19, 20, 22, 22, 24, 25, 27, 26, 28, 29, 31, 31, 33, 34, 36, 33, 35, 36, 38, 38, 40, 41, 43, 42, 44, 45, 47, 47, 49, 50, 52, 50, 52, 53, 55, 55, 57, 58, 60, 59, 61, 62, 64, 64, 66, 67, 69, 65, 67, 68, 70, 70, 72, 73, 75
Offset: 0

Views

Author

Reinhard Zumkeller, May 08 2004

Keywords

Crossrefs

A010061 gives the numbers not occurring in this sequence. A228082 gives the terms of this sequence sorted into ascending order, with duplicates removed. A228085(n) gives the number of times n occurs in this sequence.

Programs

Formula

a(n) = n + A000120(n).
A010062(n+1) = a(A010062(n)).
G.f.: (1/(1 - x))*Sum_{k>=0} (2^k + 1)*x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Jul 23 2017

A230301 Positive numbers not of the form m + wt(m-1), m >= 1.

Original entry on oeis.org

2, 5, 7, 14, 16, 19, 22, 24, 31, 33, 38, 40, 47, 49, 52, 55, 57, 64, 72, 79, 81, 84, 87, 89, 96, 98, 103, 105, 112, 114, 117, 120, 122, 129, 131, 134, 136, 143, 145, 148, 151, 153, 160, 162, 167, 169, 176, 178, 181, 184, 186, 193, 201, 208, 210, 213, 216, 218, 225, 227, 232, 234, 241, 243, 246, 249, 251, 271, 273, 276
Offset: 1

Views

Author

N. J. A. Sloane, Oct 23 2013

Keywords

Comments

wt(m) = A000120(m).
These are numbers k such that A228085(2^k) = A228085(k-1) = 0, or numbers k such that 2^k is a binary self number (A010061). - Amiram Eldar, Feb 23 2021

Crossrefs

Formula

a(n) = A010061(n) + 1.

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).
Showing 1-3 of 3 results.