what is the formula for this function?

466 Views Asked by At

I've been thinking about the differences in numbers so for example:

$\begin{array}{ccccccc} &&&0&&&\\ &&1&&1&&\\&1&&2&&3&\\0&&1&&3&&6 \end{array}$

or with absolute differences:

$\begin{array}{ccccccccccc} &&&\vdots&&\vdots&&\vdots\\ &&1&&0&&2&&2\\ &1&&2&&2&&4&&2\\ 2&&3&&5&&7&&11&&13 \end{array}$

so I found this and I wanted to know if this has an actual mathematical formula:

$\begin{array}{cccccccc} &&&&\vdots\\ &&&3&\cdots&\vdots\\ &&2&&5&\cdots&\vdots\\ &1&&3&&8&\cdots&\vdots\\ 0&&1&&4&&12&\cdots \end{array}$

and the sequence continues 0, 1, 4, 12, 32, 80, 192, 448, 1024, 2304, 5120, 11264, 24576, 53248, 114688, 245760,... If you couldn't tell what I was doing to generate them the first diagonal going up from the 0 increased by one. I wasn't able to find the formula, but I have found some other diagonals have properties like, the second (1,3,5...) is the odd numbers, all of those diagonals are linear.

2

There are 2 best solutions below

4
On BEST ANSWER

This sequence can be described by formula: $$ u(n)=\left\{ \begin{array}{l} n\cdot 2^{n-1}, \qquad\; n=0,1,2,3,4,5,6;\\ n\cdot 2^{n-1}+4, \;\; n=7,8,9,...;\end{array} \right. $$

$u(0)=0$, $u(1)=1$, $u(2)=4$, $u(3)=12$, $\ldots$, $u(6)=192$;

$u(7)=448+4$, $u(8)=1024+4$, $\ldots$, $u(13)=53248+4$.

0
On

It seems to be the number of edges in N-dimensional cube:

4 = 1 * 2 + 2 (square)
12 = 4 * 2 + 4 (ordinary cube)
32 = 12 * 2 + 8 (4-D cube)
80 = 32 * 2 + 16
192 = 80 * 2 + 32
448 = 192 * 2 + 64
1024 = 448 * 2 + 128
2304 = 1024 * 2 + 256
5120 = 2304 * 2 + 512
11264 = 5120 * 2 + 1024
24576 = 11264 * 2 + 2048
53248 = 24576 * 2 + 4096
114688 = 53248 * 2 + 8192
245760 = 114688 * 2 + 16384
524288 = 245760 * 2 + 32768