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

A355808 a(n) is the number at the apex of a triangle whose base contains the distinct powers of 2 summing to n (in ascending order), and each number in a higher row is the difference of the two numbers directly below it; a(0) = 0.

Original entry on oeis.org

0, 1, 2, 1, 4, 3, 2, 1, 8, 7, 6, 5, 4, 1, 2, 1, 16, 15, 14, 13, 12, 9, 10, 9, 8, 1, 2, -3, 4, 3, 2, 1, 32, 31, 30, 29, 28, 25, 26, 25, 24, 17, 18, 13, 20, 19, 18, 17, 16, 1, 2, -11, 4, -5, -6, -15, 8, 7, 6, 9, 4, 1, 2, 1, 64, 63, 62, 61, 60, 57, 58, 57, 56, 49
Offset: 0

Views

Author

Rémy Sigrist, Jul 18 2022

Keywords

Examples

			For n = 27:
- we have the following triangle:
           -3
          5   2
        1   6   8
      1   2   8  16
- so a(27) = -3.
		

Crossrefs

See A355807 for similar sequences.
Cf. A348296.

Programs

  • PARI
    a(n) = { my (b=vector(hammingweight(n))); for (k=1, #b, n-=b[k]=2^valuation(n,2)); while (#b>1, b=vector(#b-1, k, b[k+1]-b[k])); if (#b, b[1], 0) }

Formula

a(n) <= n with equality iff n = 0 or n is a power of 2.
a(2*n) = 2*a(n).

A355809 a(n) is the number at the apex of a triangle whose base contains the distinct powers of 2 summing to n (in ascending order), and each number in a higher row is the sum of the two numbers directly below it; a(0) = 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 8, 9, 10, 13, 12, 17, 18, 27, 16, 17, 18, 21, 20, 25, 26, 35, 24, 33, 34, 47, 36, 53, 54, 81, 32, 33, 34, 37, 36, 41, 42, 51, 40, 49, 50, 63, 52, 69, 70, 97, 48, 65, 66, 87, 68, 93, 94, 129, 72, 105, 106, 153, 108, 161, 162, 243, 64, 65
Offset: 0

Views

Author

Rémy Sigrist, Jul 18 2022

Keywords

Examples

			For n = 27:
- we have the following triangle:
          47
        13  34
       3  10  24
     1   2   8  16
- so a(27) = 47.
		

Crossrefs

See A355807 for similar sequences.

Programs

  • PARI
    a(n) = { my (b=vector(hammingweight(n))); for (k=1, #b, n-=b[k]=2^valuation(n, 2)); while (#b>1, b=vector(#b-1, k, b[k+1]+b[k])); if (#b, b[1], 0) }

Formula

a(n) >= n with equality iff n = 0 or n belongs to A048645.
a(2*n) = 2*a(n).

A355810 a(n) is the number at the apex of a triangle whose base contains the distinct powers of 2 summing to n (in ascending order), and each number in a higher row is the bitwise XOR of the two numbers directly below it; a(0) = 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 5, 8, 9, 10, 9, 12, 9, 10, 15, 16, 17, 18, 17, 20, 17, 18, 23, 24, 17, 18, 27, 20, 29, 30, 17, 32, 33, 34, 33, 36, 33, 34, 39, 40, 33, 34, 43, 36, 45, 46, 33, 48, 33, 34, 51, 36, 53, 54, 33, 40, 57, 58, 33, 60, 33, 34, 51, 64, 65, 66, 65
Offset: 0

Views

Author

Rémy Sigrist, Jul 18 2022

Keywords

Examples

			For n = 27:
- we have the following triangle:
          27
         9  18
       3  10  24
     1   2   8  16
- so a(27) = 27.
		

Crossrefs

See A355807 for similar sequences.

Programs

  • PARI
    a(n) = { my (b=vector(hammingweight(n))); for (k=1, #b, n-=b[k]=2^valuation(n,2)); while (#b>1, b=vector(#b-1, k, bitxor(b[k+1], b[k]))); if (#b, b[1], 0) }

Formula

a(n) <= n with equality iff n = 0 or n belongs to A143071.
a(2*n) = 2*a(n).

A355811 a(n) is the number at the apex of a triangle whose base contains the distinct powers of 2 summing to n (in ascending order), and each number in a higher row is the product of the two numbers directly below it; a(0) = 1.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 8, 16, 8, 8, 16, 32, 32, 128, 256, 4096, 16, 16, 32, 64, 64, 256, 512, 8192, 128, 1024, 2048, 65536, 4096, 524288, 1048576, 4294967296, 32, 32, 64, 128, 128, 512, 1024, 16384, 256, 2048, 4096, 131072, 8192, 1048576, 2097152, 8589934592, 512
Offset: 0

Views

Author

Rémy Sigrist, Jul 18 2022

Keywords

Examples

			For n = 27:
- we have the following triangle:
           65536
         32  2048
       2    16   128
    1     2     8    16
- so a(27) = 65536.
		

Crossrefs

See A355807 for similar sequences.

Programs

  • PARI
    a(n) = { my (b=vector(hammingweight(n))); for (k=1, #b, n-=b[k]=2^valuation(n, 2)); while (#b>1, b=vector(#b-1, k, b[k+1]*b[k])); if (#b, b[1], 1) }

Formula

a(n) = n iff n is a power of 2.
a(2*n) = a(n) * 2^A048896(n-1) for any n > 0.
Showing 1-4 of 4 results.