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

A271343 Triangle read by rows: T(n,k) = A196020(n,k) - A266537(n,k), n>=1, k>=1.

Original entry on oeis.org

1, 1, 5, 1, 1, 0, 9, 3, 1, -2, 1, 13, 5, 0, 1, 0, 0, 17, 7, 3, 1, -6, 0, 1, 21, 9, 0, 0, 1, 0, 3, 0, 25, 11, 0, 0, 1, -10, 0, 3, 29, 13, 7, 0, 1, 1, 0, 0, 0, 0, 33, 15, 0, 0, 0, 1, -14, 3, 5, 0, 37, 17, 0, 0, 0, 1, 0, 0, -2, 3, 41, 19, 11, 0, 0, 1, 1, -18, 0, 7, 0, 0, 45, 21, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0
Offset: 1

Views

Author

Omar E. Pol, Apr 06 2016

Keywords

Comments

Gives an identity for A000593. Alternating sum of row n equals the sum of odd divisors of n, i.e., Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A000593(n).
Row n has length A003056(n) hence the column k starts in row A000217(k).
Since the odd-indexed rows of the triangle A266537 contain all zeros then odd-indexed rows of this triangle are the same as the odd-indexed rows of the triangle A196020.
If T(n,k) is the second odd number in the column k then T(n+1,k+1) = 1 is the first element in the column k+1.
Alternating row sums of A196020 give A000203.
Alternating row sums of A266537 give A146076.

Examples

			Triangle begins:
1;
1;
5,   1;
1,   0;
9,   3;
1,  -2,  1;
13,  5,  0;
1,   0,  0;
17,  7,  3;
1,  -6,  0,  1;
21,  9,  0,  0;
1,   0,  3,  0;
25, 11,  0,  0;
1, -10,  0,  3;
29, 13,  7,  0,  1;
1,   0,  0,  0,  0;
33, 15,  0,  0,  0;
1, -14,  3,  5,  0;
37, 17,  0,  0,  0;
1,   0,  0, -2,  3;
41, 19, 11,  0,  0,  1;
1, -18,  0,  7,  0,  0;
45, 21,  0,  0,  0,  0;
1,   0,  3,  0,  0,  0;
49, 23,  0,  0,  5,  0;
1, -22,  0,  9,  0,  0;
53, 25, 15,  0,  0,  3;
1,   0,  0, -6,  0,  0,  1;
...
For n = 18 the divisors of 18 are 1, 2, 3, 6, 9, 18 and the sum of odd divisors of 18 is 1 + 3 + 9 = 13. On the other hand, the 18th row of the triangle is 1, -14, 3, 5, 0, so the alternating row sum is 1 -(-14) + 3 - 5 + 0 = 13, equaling the sum of odd divisors of 18.
		

Crossrefs

A266069 Decimal representation of the n-th iteration of the "Rule 3" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 4, 2, 121, 4, 2035, 8, 32743, 16, 524239, 32, 8388511, 64, 134217535, 128, 2147483263, 256, 34359737599, 512, 549755812351, 1024, 8796093019135, 2048, 140737488349183, 4096, 2251799813672959, 8192, 36028797018939391, 16384, 576460752303374335, 32768
Offset: 0

Views

Author

Robert Price, Dec 20 2015

Keywords

Comments

Rule 35 also generates this sequence.

Examples

			From _Michael De Vlieger_, Dec 21 2015: (Start)
First 8 rows, replacing leading zeros with ".", the row converted to its binary, then decimal equivalent at right:
              1                =               1 ->     1
            1 0 0              =             100 ->     4
          . . . 1 0            =              10 ->     2
        1 1 1 1 0 0 1          =         1111001 ->   121
      . . . . . . 1 0 0        =             100 ->     4
    1 1 1 1 1 1 1 0 0 1 1      =     11111110011 ->  2035
  . . . . . . . . . 1 0 0 0    =            1000 ->     8
1 1 1 1 1 1 1 1 1 1 0 0 1 1 1  = 111111111100111 -> 32743
(End)
		

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Programs

  • Mathematica
    rule = 3; rows = 30; Table[FromDigits[Table[Take[CellularAutomaton[rule,{{1},0}, rows-1, {All,All}][[k]], {rows-k+1, rows+k-1}], {k,1,rows}][[k]],2], {k,1,rows}]
  • Python
    print([2*4**n - 3*2**((n-1)//2) - 1 if n%2 else 2**(n//2) for n in range(30)]) # Karl V. Keller, Jr., Aug 25 2021

Formula

G.f.: (1+4*x-17*x^2+45*x^3+16*x^4-64*x^5) / ((1-x)*(1+x)*(1-4*x)*(1+4*x)*(1-2*x^2)). - Colin Barker, Dec 21 2015 and Apr 18 2019
a(n) = 2*4^n - 3*2^((n-1)/2) - 1 for odd n; a(n) = 2^(n/2) for even n. - Karl V. Keller, Jr., Aug 25 2021
Showing 1-2 of 2 results.