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

A089400 a(n) = m - A089398(2^m - n) for m>=n.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Oct 30 2003

Keywords

Comments

A089398(n) = n-th column sum of binary digits of k*2^(k-1), where summation is over k>=1, without carrying between columns.

Examples

			a(6)=4 since 7 - A089398(2^7 - 6) = 7 - 3 = 4.
		

Crossrefs

Formula

a(2^k)=1 (for k>1), a(2^k+j)=1+a(j) (for 2^k-k>j>=0), a(2^k-j)=1+A089401(j) (for k>j>0).

A089401 a(n) = m - A089398(2^m + n) for m>=n.

Original entry on oeis.org

1, 1, 3, 2, 4, 5, 6, 5, 7, 8, 11, 9, 11, 12, 13, 12, 14, 15, 18, 18, 19, 20, 21, 20, 22, 23, 26, 24, 26, 27, 28, 27, 29, 30, 33, 33, 36, 36, 37, 36, 38, 39, 42, 40, 42, 43, 44, 43, 45, 46, 49, 49, 50, 51, 52, 51, 53, 54, 57, 55, 57, 58, 59, 58, 60, 61, 64, 64, 67, 69, 69, 68, 70
Offset: 1

Views

Author

Paul D. Hanna, Oct 30 2003

Keywords

Comments

A089398(n) = n-th column sum of binary digits of k*2^(k-1), where summation is over all k>=1, without carrying from columns sums that may exceed 2.
Row sums of triangular arrays in A103582 and in A103583. - Philippe Deléham, Apr 04 2005

Examples

			a(6)=5 since 7 - A089398(2^7 + 6) = 7 - 2 = 5.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{lg = Floor[Log[2, n]] + 1}, Sum[ Join[ Reverse[ IntegerDigits[n - i + 1, 2]], {0}][[i]], {i, lg}]]; Table[n - f[2^n + n] + 2, {n, 0, 72}] (* Robert G. Wilson v, Mar 29 2005 *)
  • PARI
    a(n)=n/2+1/2*sum(k=1,n,(-1)^floor((n-k)/2^(k-1))) \\ Benoit Cloitre
    
  • PARI
    {a(n)=if(n<=0,0,m=floor(log(n)/log(2)); if(n-2^m<=m,n-m+a(n-2^m),2^m-1+a(n-2^m)))} \\ Paul D. Hanna, Mar 28 2005

Formula

a(n) = n/2+1/2*sum(k=1, n, (-1)^floor((n-k)/2^(k-1))). - Benoit Cloitre, Mar 28 2005
Let a(0)=0; when n - 2^[log_2(n)] <= [log_2(n)] then a(n) = a(n - 2^[log_2(n)]) + n - [log_2(n)], else a(n) = a(n - 2^[log_2(n)]) + 2^[log_2(n)] - 1. Thus a(2^m) = 2^m - m for all m>=0; for 0<=k<=m: a(2^m + k) = a(k) + 2^m + k - m; for mPaul D. Hanna, Mar 28 2005

Extensions

More terms from Benoit Cloitre and Robert G. Wilson v, Mar 28 2005

A089399 a(n) satisfies: 2^a(n)+1 = sum(k=1,n, A089398(k)*2^(k-1)) for n>2, with a(1)=a(2)=0.

Original entry on oeis.org

0, 0, 3, 4, 5, 6, 8, 9, 10, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 51, 52, 53, 54, 55, 57, 58, 59, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 69, 70, 71, 72, 73
Offset: 1

Views

Author

Paul D. Hanna, Oct 30 2003

Keywords

Comments

A089398(n) = n-th column sum of binary digits of k*2^(k-1), where summation is over all k>=1, without carrying from columns sums that may exceed 2.

Examples

			a(7)=8 since 2^8+1=257=(1)+(0)2+(2)2^2+(1)2^3+(1)2^4+(1)2^5+(3)2^6,
and A089398 begins: {1,0,2,1,1,1,3,2,2,0,3,2,2,2,4,3,3,1,...}.
		

Crossrefs

Cf. A089398.

A103581 A102371 written in base 2.

Original entry on oeis.org

1, 10, 111, 1100, 11101, 111110, 1111011, 11111000, 111111001, 1111111010, 11111111111, 111111110100, 1111111110101, 11111111110110, 111111111110011, 1111111111110000, 11111111111110001, 111111111111110010
Offset: 1

Views

Author

Philippe Deléham, Mar 23 2005

Keywords

Comments

The number of zeros in the n-th term appears to match A089398. - Benoit Cloitre, Mar 24 2005

Crossrefs

Formula

a(n) = A007088(A102371(n)). - Michel Marcus, May 08 2020

Extensions

More terms from Benoit Cloitre, Mar 24 2005

A105034 Binary equivalents of A105033.

Original entry on oeis.org

0, 1, 0, 11, 10, 1, 100, 111, 110, 101, 0, 1011, 1010, 1001, 1100, 1111, 1110, 1101, 1000, 11, 10010, 10001, 10100, 10111, 10110, 10101, 10000, 11011, 11010, 11001, 11100, 11111, 11110, 11101, 11000, 10011, 10, 100001, 100100, 100111, 100110
Offset: 0

Views

Author

N. J. A. Sloane, Apr 04 2005

Keywords

Comments

Number of 1's in a(n) is A089398(n). - Philippe Deléham, Apr 05 2005.
The version 0, 01, 000, 0011, 00010, 000001, ... is obtained by interchanging 0 and 1 in A103581: 1, 10, 111, 1100, 11101, 111110, .... - Philippe Deléham, Apr 07 2005

Crossrefs

Cf. triangular array in A103589.

Extensions

More terms from Benoit Cloitre, Apr 04 2005

A103175 A001787 written in base 2.

Original entry on oeis.org

0, 1, 100, 1100, 100000, 1010000, 11000000, 111000000, 10000000000, 100100000000, 1010000000000, 10110000000000, 110000000000000, 1101000000000000, 11100000000000000, 111100000000000000
Offset: 0

Views

Author

Philippe Deléham, Mar 30 2005

Keywords

Crossrefs

Cf. A089398.

Extensions

More terms from Erich Friedman, Aug 08 2005
Showing 1-6 of 6 results.