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 21-23 of 23 results.

A328732 Irregular table read by rows; for any n >= 0, the n-th row contains the numbers of the form u - v with u + v = n and u AND v = 0 (where AND denotes the bitwise AND operator), in ascending order.

Original entry on oeis.org

0, -1, 1, -2, 2, -3, -1, 1, 3, -4, 4, -5, -3, 3, 5, -6, -2, 2, 6, -7, -5, -3, -1, 1, 3, 5, 7, -8, 8, -9, -7, 7, 9, -10, -6, 6, 10, -11, -9, -7, -5, 5, 7, 9, 11, -12, -4, 4, 12, -13, -11, -5, -3, 3, 5, 11, 13, -14, -10, -6, -2, 2, 6, 10, 14
Offset: 0

Views

Author

Rémy Sigrist, Oct 26 2019

Keywords

Comments

The n-th row:
- has A001316(n) terms,
- has -n as first term and n as last term,
- has least positive term T(n, A001316(n)/2+1) = A080079(n) (when n > 0).

Examples

			Table begins:
    0;
   -1,   1;
   -2,   2;
   -3,  -1,   1,   3;
   -4,   4;
   -5,  -3,   3,   5;
   -6,  -2,   2,   6;
   -7,  -5,  -3,  -1,   1,   3,   5,   7;
   -8,   8;
   -9,  -7,   7,   9;
  -10,  -6,   6,  10;
  -11,  -9,  -7,  -5,   5,   7,   9,  11;
  -12,  -4,   4,  12;
  -13, -11,  -5,  -3,   3,   5,  11,  13;
  ...
		

Crossrefs

Programs

  • PARI
    row(n) = my (r=[0], b=Vecrev(binary(n))); for (k=0, #b-1, if (b[k+1], r=concat(apply(v -> [v-2^k,v+2^k], r)))); Set(r)

A348647 Irregular table read by rows; the n-th row contains the lengths of the runs of consecutive terms with the same parity in the n-th row of Pascal's triangle (A007318).

Original entry on oeis.org

1, 2, 1, 1, 1, 4, 1, 3, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 8, 1, 7, 1, 2, 6, 2, 1, 1, 1, 5, 1, 1, 1, 4, 4, 4, 1, 3, 1, 3, 1, 3, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 1, 15, 1, 2, 14, 2, 1, 1, 1, 13, 1, 1, 1, 4, 12, 4, 1, 3, 1, 11, 1, 3, 1
Offset: 0

Views

Author

Rémy Sigrist, Oct 27 2021

Keywords

Comments

For any n >= 0, the n-th row:
- is palindromic,
- has A038573(n+1) terms,
- has leading term A006519(n+1),
- has central term A080079(n+1).

Examples

			Triangle begins:
    1;
    2;
    1, 1, 1;
    4;
    1, 3, 1;
    2, 2, 2;
    1, 1, 1, 1, 1, 1, 1;
    8;
    1, 7, 1;
    2, 6, 2;
    1, 1, 1, 5, 1, 1, 1;
    4, 4, 4;
    1, 3, 1, 3, 1, 3, 1;
    2, 2, 2, 2, 2, 2, 2;
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
    16;
    ...
		

Crossrefs

Programs

  • PARI
    row(n) = { my (b=binomial(n)%2, r=[], p=1, w=1); for (k=2, #b, if (p==b[k], w++, r=concat(r, w); p=b[k]; w=1)); concat(r, w) }

Formula

Sum_{k = 1..A038573(n+1)} T(n, k) = n+1.
T(n, 1) = A006519(n+1).
T(n, A048896(n)) = A080079(n+1).
T(2^k-1, 1) = 2^k for any k >= 0.

A333906 For n >= 2, a(n) = Sum_{k=2..n} prevpower2(k) + nextpower2(k) - 2*k, where prevpower2(k) is the largest power of 2 < k, nextpower2(k) is the smallest power of 2 > k.

Original entry on oeis.org

1, 1, 3, 5, 5, 3, 7, 13, 17, 19, 19, 17, 13, 7, 15, 29, 41, 51, 59, 65, 69, 71, 71, 69, 65, 59, 51, 41, 29, 15, 31, 61, 89, 115, 139, 161, 181, 199, 215, 229, 241, 251, 259, 265, 269, 271, 271, 269, 265, 259, 251, 241, 229, 215, 199, 181, 161
Offset: 2

Views

Author

Ctibor O. Zizka, Apr 09 2020

Keywords

Comments

Partial sums of b(k) = prevpower2(k) + nextpower2(k) - 2*k; b(k) = 0 for A007283.

Examples

			a(2) = (1 + 4 - 2*2) = 1;
a(3) = (1 + 4 - 2*2) + (2 + 4 - 2*3) = 1;
a(4) = (1 + 4 - 2*2) + (2 + 4 - 2*3) + (2 + 8 - 2*4) = 3.
		

Crossrefs

Previous Showing 21-23 of 23 results.