# General formula for a sequence of numbers

• I
Hi there. I am working with a problem where a sequence of numbers arises. This sequence reads: ##\{0,1,3,5,10,15,21,28\}## as far as I have worked it. I am trying to figure out the underlying relation that gives this sequence. These are related to indexes in a matrix, and I am trying to generalize the result in order to be able to compute these coefficients for arbitrary matrix sizes.

The thing is that, lets say, for the first row, I have indexes that are non zero for all elements ##a_{1,j}## such that ##j \leq C##, with C an integer.

For the second row, the first index which is not zero is ##a_{2,C+1}## and the last non zero entry is ##a_{2,2C-1}##

For the third row, the first non zero element is ##a_{3,2C}##, and the last non zero entry is ##a_{3,3C-3}##

For the fourth row the first non zero entry is ##a_{4,3C-2}##, and the last non zero entry reads: ##a_{4,4C-5}##.

For the fifth element it is ##a_{5,4C-4}## and the last ##a_{5,5C-10}##

For the sixth: ##a_{6,5C-9}## and the last is: ##a_{6,6C-15}##;

For the seventh, first: ##a_{7,6C-14}##, last ##a_{7,7C-21}##

Eighth, first: ##a_{8,7C-20}##, last: ##a_{8,8C-28}##

I think that if I figure out a general formula for the sequence I've posted at the beginning, then I could generate the indexes for any arbitrary matrix element which is non zero, and for any matrix size.

andrewkirk
Homework Helper
Gold Member
There is an amazing website the Online Encyclopaedia of Integer Sequences. It has an extraordinarily comprehensive set of entries. You just put in the first few elements of your sequence, separated by commas, and it tells you if there's a match. Yours doesn't, see here. It is very rare to come across a sequence that is not in the encyclopaedia. Are you absolutely sure of your values? If even one is wrong, it won't make a match even if the true sequence is in there.

If you are sure of the values and are able to precisely and clearly specify an algorithm for generating the sequence, and the sequence is infinite, you can register it as a new sequence in the encyclopaedia, which I think would be quite an honour.

I don't understand your specification though. It looks to me as though the sequence depends on both the matrix and on C. So the matrix would need to be specified in order to specify the sequence, and every matrix could give a different sequence. It also looks to me as though the sequence would not be infinite, although that could just be my failure to understand the specification.

• Telemachus
mfb
Mentor
First you have to explain where these numbers come from.
The first row has C entries, the second C-1, the third C-2, the fourth C-2 again, the fifth suddenly has C-5, the sixth row has C-5 again. Why? Where does that pattern come from?

• Telemachus
PeroK
Homework Helper
Gold Member
2020 Award
@Telemachus if you change the fourth number from 5 to 6 your sequence is ##\binom{n}{2}##

• FactChecker and Telemachus
Hi! thank you all for your replies. The matrix comes from a system of equations, where there are symmetry constraints. In particular, the solution for the system satisfies ##x_{k,k'}=x_{k',k}##. This is the vector of solution for the matrix that I am trying to construct, and it is entered as ##x_{1,1},x_{1,2},...,x_{1,K},x_{2,2},x_{2,3},...,x_{2,K},x_{3,3},x_{3,4},...,...,x_{K,K}##.

The first row should have K elements, the second should have K-1 elements (for example, if K=3: ##a_{2,4}, a_{2,5})##, if K=4:##a_{2,5}, a_{2,6},a_{2,7}## ), the third row has K-2 elements, the fourth K-3, the fifth K-4, and the nth should have K-n-1e, and the Kth row should have only one element. However, the first element in the second rows appears at the column K+1, the first element of the third rows appears at the 2K column, for the fourth row appears at the 3K-2 column, and so on.

This has to do with the specific structure of the system of equations, the system is under-determined, and the matrix has ##(K^2+K)/2## elements. As there is a strict mathematical procedure by which I am constructing the matrix, I think that there has to be some underlying formula that generates the sequences to obtain the positions of the elements, and that I am actually using it with out finding the general expression for it (I'm not seeing the formula, but I can do it by brute force).

First you have to explain where these numbers come from.
The first row has C entries, the second C-1, the third C-2, the fourth C-2 again, the fifth suddenly has C-5, the sixth row has C-5 again. Why? Where does that pattern come from?

I've made a mistake when I did the counting, here I'll try to correct it:

For the second row, the first index which is not zero is ##a_{2,C+1}## and the last non zero entry is ##a_{2,2C-1}## (K-1) elements)

For the third row, the first non zero element is ##a_{3,2C}##, and the last non zero entry is ##a_{3,3C-3}## (K-2) elements)

For the fourth row the first non zero entry is ##a_{4,3C-2}##, and the last non zero entry reads: ##a_{4,4C-6}##. (K-3) elements)

For the fifth element it is ##a_{5,4C-5}## and the last ##a_{5,5C-10}## (K-4) elements)

For the sixth: ##a_{6,5C-9}## and the last is: ##a_{6,6C-15}##; (K-5) elements)

For the seventh, first: ##a_{7,6C-14}##, last ##a_{7,7C-21}## (K-6) elements)

Eighth, first: ##a_{8,7C-20}##, last: ##a_{8,8C-28}## (K-7) elements)

After the correction, now I see that the sequence is the one provided by PeroK.

Thanks a lot.