Outstanding Question(s)

By Dustin Darcy, Aug. 15th 2010, updated Dec. 28th 2024

The big question this notebook seeks to answer is whether there is a recurrence relation between the summed rows of triangular numbers of the form tri(n)=((((n^2)+n)/2)) where (Subscript[n, 2])=36, (Subscript[n, 1])=4, and primes to the p-th power ((Subscript[p, 2])= 2, (Subscript[p, 1])=1). 

The initial observation that kicked off the investigation is a curious link between (Subscript[n, 1])=4  (meaning triangular number tri(4)=(((4^2)+4)/2)=10) and (Subscript[n, 2])=36 (or tri(36)=(((36^2)+36)/2)=666).

The link is a bit easier to notice if we think of tri(4) as a summation. It’s trivial to see that tri(4) is the same as (∑_(x=1)^4)x=10. Geometrically this creates a 4 row triangular number sequence composed of 10 digits (see the diagram below) whose base-10 rows sum to: 0123+456+78+9=666. Since (Subscript[n, 2])=36, (∑_(x=1)^36)x=666. This suggested that (Subscript[n, 2])=36 might be a part of another “tri-row-sum sequence” as derived from the footprint of (Subscript[n, 1])=4 through some as of yet unknown recursive series (presumably in base-666).

The second observation which made this connection curious enough to warrant deeper investigation is that 10 is the sum of the first 3 primes to the first power (i.e. (2^1)+(3^1)+(5^1)=10, (Subscript[p, 1])=1) and 666 is the sum of the first seven squared primes (i.e. (2^2)+(3^2)+(5^2)+(7^2)+(11^2)+(13^2)+(17^2)=666, (Subscript[p, 2])=2). This begs the question: is the sum of the rows in an n=36 triangle also equal to the sum of squared, cubed, or some p-power primes?


Note: Unicode has 95,221 characers as of 10/06/10. 

Due to this pattern the problem has been called the “prime-power-sum” or “prime-square-sum” conjecture.

To test the theory I have written a companion python program, called prime-square-sum.py available on github at (https://github.com/djdarcy/Prime-Square-Sum). The application has currently summed almost 50 million prime numbers.

(* discussion at: http://mathematica.stackexchange.com/questions/100498/nesting-baseform-several-functions-deep-causes-dependent-functions-to-not-fully *)

baseForm[num_,n_]:=BaseForm[num//.BaseForm[a_,_]:>a,n]

Clear@baseForm

baseForm/:(c:Except[SetDelayed|baseForm])[d___,baseForm[a_,b_],e___]:=baseForm[c[d,a,e],b]

baseForm/:MakeBoxes[baseForm[a_,b_],fmt_]:=ToBoxes@BaseForm[a,b]

Clear@baseForm

baseForm[n_]:=If[n==10,#,BaseForm[#,n]]&

b[n_]:=If[n==10,#,BaseForm[#,n]]&

Clear@baseForm

(*This is the preferred version, but it doesn't work with assignment and then use later in operations*)

baseForm[e_,n_]:=If[n==10,e,BaseForm[e,n]]

Creating an Algorithm ...

The first goal is to create an algorithm to sum the rows of an arbitrary n-sized triangular number.

(((n^2)+n)/2)

(1) is the standard form for a triangular number.

tri[n_,f_:10]:=baseForm[(((n^2)+n)/2),f]

n specifies the size of the base of the triangle
      f optionally allows a us to specify if we want to view the result in something other than base-10

tri[5]

Example: 
     e
    c d 
   9 a b
 5 6 7 8
0 1 2 3 4

tri[4]

Example:
     9          row #1
    7 8        row #2
  4 5 6       row #3
 0 1 2 3     row #4

tri[3]

tri[2]

tri[1]

The width and height of any triangular number are both equal to n in tri(n).

Note: subtracting between any two adjacent triangular numbers {tri(3),tri(4)} gives the n-value for the larger triangular number

tri[4]-tri[3]

Worded another way, the smaller preceding triangular number (ie. tri(3)=6) is added to the sum of the n of the next (ie. n=4;tri(4)) to arrive at the larger tri(n) value (ex. tri(3)+4=tri(4)=10). Proof:

Simplify[tri[x]+(x+1)==tri[x+1],x]

This behavior may factor into the special relationship between n=4 and n=36 in some way.

To calculate the sum of the rows of a triangular number (ex. tri(3) =6; 012 + 34 + 5 = 51) we’ll need to know how many rows to count. The n in tri(n) is equal to the total number of rows. 

Since n could be a bit more descriptive. We’ll encapsulate the n in a function called max increment (mi() for short) to indicate the maximum upper bound of the summation ((∑_(i=0)^(mi()))...).  This will make it easier later to see why and how we are using n and to explicitly show the total number of times the summation will have to increment. 

This convention will be used commonly throughout the notebook even though the function itself is very simple (mi() is a glorified subtraction: n-1). The algorithm starts at 0 so we need to subtract 1. 

We define function mi() to take the n of tri(n) and second parameter to offset the value to remove 1.

mi[n_,x_]:=n+x

Table[mi[n,-1], {n, 1, 4}]

The first summed-row triangular number correspondence we are interested in is from ...

tri[36]

This is a 666 element triangle. In base-666 we need 666 unique numerals to represent the values for each location in the triangle. The bottom row will have 36 unique characters in it. So the bottom row might look like this:

0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 

How to sum this then with the row above it? 

Thinking about how triangular number tri(4)=10 is structured in base-10.

9
    7 8  
  4 5 6
 0 1 2 3

The trick to get the individual row values (ie. 0123, 456, 78) it seems is to start at 0 and count to 3, then for the next row start at 4 and count to 6, then 7, and finally stop at 9. Or simply 0+4 = 4; 4+3 = 7; 7+2 = 9; last 9+1 = 10 (done). Since we know the number-base (b=10) we know the 4 in advance because we can solve for n in the triangular equation (tri[n]) using the quadratic equation  (i.e. (((n^2)+n)/2)=b->((-((1/2))+(Sqrt[((((1/2)))^2)- 4((1/2))(-b)]))/(2((1/2))))==(((-1)/2)+(Sqrt[(1/4)+2b]))==(-(1/2)+(Sqrt[(1/4)+(8/4)b]))==(-(1/2)+(1/2)(Sqrt[1+8b]))=(1/2) (-1+(Sqrt[1+8b])).

qtri[b_]:=(1/2) (-1+(Sqrt[1+8 b]))

qtri[10]

With base 666 we would start at 36.

qtri[666]

As for how all this works in terms of integer representation...

0*(10^3)+1*(10^2)+2*(10^1)+3*(10^0)

Some test runs ...

(∑_(x=0)^(tri[2]))(tri[2]-x)*(10^x)

(∑_(x=tri[0])^(tri[2]))(tri[0]+x)*(10^(((tri[2])-x)))

(∑_(x=tri[0])^(mi[4,-1]))(tri[0]+x)*(10^(((tri[4]-tri[3]-1)-x)))

(∑_(x=tri[1])^(mi[4,-1]))(tri[2]+x)*(10^((tri[2]-x)))

The next hurdle is figuring out which number to start counting from and when to stop. Once we know the second row from the bottom of a 10 element triangle starts at number 4 it becomes very easy to count forward to get 4,5, and 6. The second row only has three elements in it because tri(4) implies the base of the triangle is 4 numbers wide. Thus the second to bottom row has to be 3 numbers wide.

The easiest way to generate the 4 (3rd row 1st number), 7 (2nd row 1st number), 9 (1st row & only number) sequence is to figure out the length or cardinality of the set of numbers of each of the preceding rows and then sum them up to calculate the first number of the desired row. 

For example, if we wanted the starting number for the 2nd row (r=2) in a 10 element triangular number (or to think of it another way the total number of digits we have to iterate over to get to the first number of the 2nd row) represented by tri[n] where n=4 , then counting from the bottom of the triangle to the top we have: (4th row) {0,1,2,3}=4 elements; (3rd row) {4,5,6} = 3 elements; gives 4+3=7. 

Lets imagine one triangle is full of As and the bigger triangle is full of As and Bs.

   B                    A            row #1
  BB                 AA          row #2
 ABB              BBB         row #3
AABB    or    BBBB       row #4

Since all triangular numbers where tri(n), n>1 can be broken into smaller triangular numbers, then one way to do this would be to subtract the top of the triangle (represented by the As) which includes the numbers we haven’t counted to yet (tri[(n-x)-1]) from the larger triangle (tri[n-x]) (represented by the Bs + As) to figure out which number the next row starts at:

Table[tri[4]-tri[x], {x,1,4}]

If we wanted the bottom of the triangle to be row #1 so we start with 0 and end with 9. We just reverse the order.

Table[tri[4]-tri[4-x+1], {x,1,4}]

To get an arbitrary row length and sum them manually we would do:

(∑_(x=0)^(n-z))(tri[n-x]-tri[(n-x)-1])

As established earlier this can be simplified because the total number of elements in the immediate preceding smaller triangle (or tri(n-1)) is equal to tri(n)-n. So we can just cancel out the n’s (or more correctly the n-x’s) of the two triangles.

To make what’s happening easier to see, just think of a (Subscript[base, infinity]) number line going on indefinitely. If we write out the counting numbers and put a pipe (|) before each triangular number we can see the pattern more clearly:

|0|12|345|6789|ABCDE|FGHIJK|...
   |
  └ Starts at 1 — tri[1]=1,tri[2]=3,tri[3]=6,tri[4]=10 or (Subscript[A, ∞]),tri[5]=15 or (Subscript[F, ∞]),...
 
The whole number line is a triangular number with an infinite sized base. 

Working with triangular number tri(4)=10 causes us to have four breaks.

0123|456|78|9|

Another way to do this rather than subtracting {tri(1), tri(2), tri(3), tri(4)} from tri(n) is to use the summation form tri(n)=(∑_(x=1)^n)x. So instead of subtracting the top of the triangle from the larger triangle (n) we just count and sum all the triangular numbers up to the row (z) that we are currently at.

Factor[(∑_(x=0)^(n-z))(n-x)]

Since we start counting at 0 rather than 1 we need to add 1 to z. This allows us to specify the correct row without having to manually offset by adding one to the z parameter. If we don’t add (z+1) to leftedge() then we would need to do leftedge(n,z+1) on each call.

n = quadratic equation of the total number of elements in the triangle (ex. tri(4) = 10, so n = 4)
z = specific arbitrary row number
f = optional base form

leftedge[n_,z_]:=(1/2) (1+n-(z+1)) (n+(z+1))

Starting from z=1 specifies the row at the top of the triangle. A good description for this function would be “outputs numbers on the left edge of the triangle.”

Table[leftedge[4,x], {x, 1, 4}]

This is correct. The base of the tri(4) triangular number starts at 0 to form {0,1,2,3}. The second row starts at 4 to form {4,5,6} and so on.

As a minor aside, we can get the right edge by doing:

rightedge[n_,z_]:=(1/2) (1+n-(z+1)) (n+(z+1))+(z-1)

Table[rightedge[4,x],{x,1,4}]

The only difference from the leftedge (simplified: (1/2) (n+(n^2)-z-(z^2))) is that we add the “+ (z-1)” term to the end of the expression.

FullSimplify[(1/2)(n-z) (1+n+z)+(z-1)]

The -2 is the only term that’s different. This is basically the same as how we algorithmically produce:

The equation to reverse this sequence in any number base is:

RowReverse[b_,n_]:=baseForm[(∑_(x=1)^n)x*(b^((n-x)))*(b-2)+n,b]

The (b-2) is what’s similar here.

Table[RowReverse[10,x], {x, 1, 9}]

Back on topic, now that we have the LeftEdge[] function we can attempt to generate each row of a triangular number. 

A triangle with 10 elements would have a base row of {0,1,2,3} ...

(∑_(x=0)^(qtri[10]-1))(leftedge[4,4]+x)*(10^(((qtri[10]-1)-x)))

(∑_(x=0)^(qtri[10]-2))(leftedge[4,3]+x)*(10^((qtri[10]-2-x)))

(∑_(x=0)^(mi[2,-1]))(leftedge[4,2]+x)*(10^((mi[2,-1]-x)))

(∑_(x=0)^(mi[1,-1]))(leftedge[4,1]+x)*(10^((mi[1,-1]-x)))

Since this works, we should be able to now create a function out of it.

To calculate the number of rows from the number base (b) and the number of elements per row we run qtri[b]. However remember the quadratic equation gives two values.

(Subscript[z, 1])=Solve[n(((n+1))/2)==10,n]

The expression below will always return the positive element:

(Subscript[z, 1])[[2]][[1]][[2]]

We could write this function so it incorporates qtri(b) to solve for b in tri(b), but for now let’s take the root-triangular number (r) by hand to retrieve an arbitrary row (z). The last parameter (f) optionally allows a caller to specify the BaseForm.

TriRow[b_, r_, z_,f_:10]:=baseForm[FullSimplify[(∑_(x=0)^(mi[z,-1]))(leftedge[r,z]+x)*(b^((mi[z,-1]-x)))],f]

This works out to:

(1/(2 (((-1+b))^2)))(-2+r+z-(r+z) (-r+b (1+r-z)+z)+(b^z) (2+(-1+b) r+(-1+b) (r^2)-(-1+b) z (1+z)))

Now let's test to check everything works.

Table[TriRow[10,4,x], {x, 1,4}]

To automatically insert r we simply solve for tri[n] and extract the positive result of the quadratic equation.

TriRowSimple:= Function[posresult=.;result=Solve[tri[n]==#1,n];posresult=Extract[result[[2,1]],2];TriRow[#1,posresult,#2]]

Table[TriRowSimple[10,x], {x, 1, 4}]

We’ll unset this so we can do it more elegantly...

TriRowSimple=.

Manually running the quadratic equation on (((x^2)+x)/2)=y gives: ((-1+(Sqrt[(1^2)-(4*1*2y)]))/(2*1)). The positive result is: (1/2) (-1+(Sqrt[1+8 y])). Since we already made the qtri[x] function earlier to compute the quadratic value of tri[x]. We use it below.

TriRowSimple[b_,z_,f_:10]:= baseForm[FullSimplify[TriRow[b,qtri[b],z]],f]

Fully simplified this works out to:

((-2+2 b-2 (b^2)+z-b z-(z^2)+b (z^2)+(b^z) (2+2 (b^2)+z+(z^2)-b (2+z+(z^2))))/(2 (((-1+b))^2)))

Table[TriRowSimple[10,x], {x, 1, 4}]

Alternatively, doing this long hand, we would substitute qtri[b] for r.

TriRowLong[b_,z_]=FullSimplify[(∑_(x=0)^(z-1))(leftedge[qtri[b],z]+x)*(b^(((z-1)-x)))]

Table[TriRowLong[10,x], {x, 1,4}]

So now we can run a summation to find the sum of all the rows for triangular number tri(4)=10.

(∑_(x=1)^4)TriRow[10,4,x]

Or to make things especially easy for ourselves ...

SumTriRows[b_,f_:10]:=baseForm[FullSimplify[(∑_(x=1)^(qtri[b]))TriRowSimple[b,x]],f]

This works out to:

(1/(6 (((-1+b))^4)))(3-3 (Sqrt[1+8 b])-9 (b^2) (1+(Sqrt[1+8 b]))+3 (b^((1/2) (3+(Sqrt[1+8 b])))) (1+(Sqrt[1+8 b]))+6 (b^3) (2+(Sqrt[1+8 b]))-2 (b^4) (3+(Sqrt[1+8 b]))-3 (b^((1/2) (1+(Sqrt[1+8 b])))) (3+(Sqrt[1+8 b]))+b (6+8 (Sqrt[1+8 b])))

SumTriRows[10]

Now let’s test it in a smaller number base (6)...

Table[TriRow[6,3,x], {x, 1, 3}]

Table[TriRow[6,3,x]//b@6, {x, 1, 3}]

This is correct because we see 012, then 34, and last 5 by itself (note see “Other Possible Connections” below). 

So if we sum the entire thing we get ...

(∑_(x=1)^3)TriRow[6,3,x]

To check ourselves we can use Mathematica’s builtin base conversion ...

6^^12+6^^34+6^^5

Since everything checks lets see what this looks like in base-6.

(∑_(x=1)^3)TriRow[6,3,x]//b@6

Interestingly...

tri[10]

Solve[tri[x]==35,x]

So there may be a connection between {base,root,sum} of {6,3,BaseForm[(∑_(x=1)^3)TriRowSimple[6,x],6]=(Subscript[55, 6])} and {55,qtri[55]=10, …}, similar to {10,4,666} connects to {666,36,(∑_(x=1)^36)TriRowSimple[666,x]}. Though it would seem the baseform plays an important part in whatever the relationship is. I tried summing various combinations to see if anything beneath base 55 would sum to a series of (primes^2) (i.e. (∑_(x=1)^28424)((Prime[x])^2)=971511442813339), but in all instances it didn't work out.

Conjecture: That aside, this seems to hint that a triangular number, when summing its rows will result in another tri- number. However it must be the value in its baseform? At a later point it may be worthwhile to attempt to figure out how to use the difference between the base-10 and the base-x form to determine the integer digits in the native base that when transformed to base-10 without a conversion would then result in a tri- number (i.e. (Subscript[55, 6])=(Subscript[35, 10]); (Subscript[55, 10]) is a triangular number but (Subscript[35, 10]) is not). This would then allow me to use an arbitrary number base and still be able to find tri- numbers. TODO / INVESTIGATE ME (see: “Sum of tri[n] rows in base form is equal to tri[n + 1]?” below)

qtri[55]

Otherwise, as demonstrated below, it doesn't necessarily work.

qtri[35]

Also let’s test in a higher number base that uses letters like base 36.

qtri[36]

Table[TriRow[36,8,x]//b@36, {x, 1, 8}]

(∑_(x=1)^8)TriRow[36,8,x]//b@36

Note this is compressible to 7 digits, one less than 8. As a caveat since base-10 isn't dense enough to contain rgbbfg there is probably not a reverse map. Unless we can convert (Subscript[b, 36]) to something like 11 and concatenate that way (i.e. / bb => 1111) the best we can probably do is test in an upwards direction. (see section: Do 11^n and Pascal’s Triangle Provide A Way to Go From Base-Infinity to Base Specific (i.e. Base-10)? for a possible way to do this).

(∑_(x=1)^8)TriRow[36,8,x]//b@10

To explain this in another way, it is easy to see (Subscript[55, 6])~(Subscript[55, 10]) and test if 55 in base-10 is a triangular number, but the question is whether there is a way to determine if 9(Subscript[rgbbfg, 36]) is triangular when dropped to a lower number base that doesn’t contain the number “r”. I’m doubtful (how would this be expressed?), but maybe there is something that could done algorithmically. For now we can at least test whether (Subscript[21251029660, 10]) is  triangular when we drop the (Subscript[base, 10]) and convert to (Subscript[base, 36]).

qtri[21251029660]

qtri[36^^21251029660]

FromDigits[IntegerDigits[(∑_(x=1)^8)TriRow[36,8,x],36],36]

Neither unfortunately is a triangular number.

One thing we can do though is look at  (∑_(x=1)^8)TriRow[36,8,x] in base-6 since each base 36 digit can be represented as two base 6 digits.

Table[BaseForm[TriRow[36,8,x],6], {x, 1, 8}]

How fascinating. Base 36's highest number is the sum of all values in base 6. I suppose this makes sense since all base-36 numbers can be represented by two base 6 numbers. The last of the square ((x^2)=36, x=6) will thus contain all the information from the sum of all the rows of the square root as a base (x).

By induction the algorithm appears to work across all number bases.

Table[TriRow[666,36,x], {x, 1, 36}]

Unfortunately since 666 isn't a perfect square of any number...

Solve[666==(x^2)]

N[3 (Sqrt[74])]

The best we can do to see that this is working correctly is try base 25 or 26 (e.g. Table[BaseForm[TriRow[666,36,x],25], {x, 1, 36}]).

So the sum of all the rows of base-666 is ...

(∑_(x=1)^36)TriRow[666,36,x]

If the “prime-square-sum” theory is correct this number should be a sum of (primes^n). Since a base 666 system could contain 665 in 1 character at most this would be 15 characters long natively (Subscript[log, 666])((Subscript[p, o])).

(Subscript[p, 0])=37005443752611483714216385166550857181329086284892731078593232926279977894581784762614450464857290

One of the major questions is does the sum of the rows of a tri-sequence always result in another triangular pattern?

Solve[n(((n+1))/2)==(Subscript[p, 0]),n]

In this case no. However as established earlier it does appear to give a tri-number when in baseform. Recall, (∑_(x=1)^3)TriRow[6,3,x] = 35. However when the number is expressed in base-6 form we get, BaseForm[(∑_(x=1)^3)TriRow[6,3,x],6] = (Subscript[55, 6]). And tri[10]=55. So even though (Subscript[35, 10]) isn't triangular (Subscript[55, 6]) (dropping the 6 and treating it as though it were natively base-10) does give us a triangular value. This may be purely coincidental however. Also recall that it reveals a problem. Base-10 can encapsulate base-6. Unfortunately though base-10 cannot encapsulate base-666. So there doesn’t appear to be an easy way to show (Subscript[p, 0]) is triangular when converted to some other number base (see: “Sum of tri[n] rows in base form is equal to tri[n + 1]?”).

Trying to figure out if the (Subscript[p, 0]) value is a sum of square primes is going to take a long time to calculate ...

(∑_(x=1)^7)((Prime[x])^2)

(∑_(x=1)^(10^7))((Prime[x])^2)

103158861357874372432083

Running 10^7 takes almost half a minute. 10^10 takes hours upon hours. I’ll have to try to come up with a way to optimize this process.

Other Possible Connections

Summing rows results in next tri numbers first row? NO

Interestingly enough, it seems there is some degree of further compressibility.  The sum of the rows from TriRowSimple[tri[n],x] in baseform of tri[n] where the digits are transposed to base tri[n+1] equal the bottom row of tri[n+1].

Table[TriRowSimple[tri[3],x] //b@tri[3], {x, 1, 3}]

Table[TriRowSimple[tri[3],x]//b@tri[4], {x, 1, 3}]

Now note the tri[3] result in base tri[4] digits when visualized in baseform of tri[3] shows ...

BaseForm[12+34+5,tri[3]]

To programmatically do this (I’d prefer a loop-free formula) we could run:

Sum[FromDigits[IntegerDigits[TriRowSimple[tri[3],x],tri[3]],10],{x, 1, 3}]//b@6

This is the basis of the bottom row of tri[4]. So if this pattern holds we should see that
0123 + 456 + 78 + 9 when converted to base-15 and after summing the rows should equal 1234 in base 10. 

First let’s convert the tri[4] row 4 to base-15 (=tri[5])...

TriRowSimple[tri[4],4]

{15^^123,BaseForm[15^^123,15]}

On further examination, we find that the sum of all the tri[4] rows in base-15 equals,

{15^^123 + 15^^456 + 15^^78 + 15^^9 ,BaseForm[15^^123 + 15^^456 + 15^^78 + 15^^9 ,15]}

In base-10 the first row of tri[5] should work out to

TriRowSimple[tri[5],5]//b@15

Which equals 3874 in base-10.

TriRowSimple[tri[5],5]//b@tri[4]

So unfortunately (Subscript[1361, 10])=60(Subscript[b, 15]) doesn’t map to (Subscript[1234, 15])(=(Subscript[3874, 10])=TriRowSimple[tri[5],5]) like (Subscript[123, 6]) maps to (Subscript[123, 10])(=TriRowSimple[tri[4],4]).

Sum of tri[n] rows in base form is equal to tri[n + some x]?

For reference, here are the first 10 triangular numbers:

Table[tri[x], {x, 1, 20}]

Earlier we showed that the sum of all the rows in base-6 of a tri[3] tri sequence works out to (Subscript[55, base-6]).

SumTriRows[tri[3]]//b@tri[3]

And that the 10th triangular number in base 10 is (Subscript[55, base-10]).

tri[10]

Or, put another way,

tri[tri[4]]

For comparison purposes lets look at all the possible ways of “viewing” this number in number bases 2 to 10.

Table[SumTriRows[tri[3]]//b@x, {x, 2, 10}]

This seems to hint at the possibility that summing the rows from tri[n] (BaseForm[SumTriRows[tri[n]],tri[n]]) and dropping the base to make the number base tri(n+?), where n+? = 10, will equal tri[tri[n+1]].

Another interesting correlation is that the topmost number in base-36 is (Subscript[35, base-10]) (just like f=(Subscript[15, base-10]) is the topmost number in base-16) and (Subscript[35, base-10])=(Subscript[55, base-6]).

Table[BaseForm[TriRowSimple[36,x],6], {x, 1, 3}]

This observations holds when we look at a triangle with a height of two {(Subscript[2, 3]), (Subscript[01, 3])} and sum the rows. We get:

BaseForm[SumTriRows[tri[2]], tri[2]]

For comparison purposes lets look at all the possible ways of “viewing” this number in number bases 2 to 10.

Table[BaseForm[SumTriRows[tri[2]],x], {x, 2, 10}]

So if we were to drop the number base of 3 from (Subscript[10, 3]) and increment tri(n) where n=2 to n=4. We get:

tri[4]

In summary, the sum of the rows of tri[2] works out to be (Subscript[10, 3]) which maps to (Subscript[10, 10])=tri[4] (n-diff: 4-2=2, base-diff: 10-3=7). Next the sum of the rows of tri[3] works out to be (Subscript[55, 6]) which maps to (Subscript[55, 10])=tri[10] (n-diff: 10-3=7, base-diff: 10-6=4).

Failed Explanation Number #1 — Summed tri[n] rows in base form of tri[n+1] is equal to tri[tri[n + 1]]?

So since the sum of the rows of tri[4] equals:

BaseForm[SumTriRows[10],10]

And:

tri[36]

The pattern seems to hold. 

So for our first naive attempt to explain what’s happening. Lets assume that SumTriRows[tri[n]]=s gives a number s that in baseform of tri[n+1] will equal some other tri[x]=s (possibly as tri[tri[n+1]]). So, lets convert the number as though it was previously in base-15.

15^^666

tri[15]

BaseForm[tri[15],15]

Sadly tri[15]≠1446 nor does it equal 666. However since tri[n] will always equal a number that has a whole qtri[tri[n]]. This means all values generated by tri[n] are also triangular.

tri[26796]

Is the Prime-Power-Sum sequence a simple N+(N+1) prime summation and then n+1 power? NO

Notice that 2 + 3 + 5 = 10 (10 is a triangular value -- and the first 3 primes). Then the first 7 primes squared are a triangular number (666 -- or the first 3 primes + 4 additional primes). Is it possible this is as simple as taking 3+4+5+6+7 and each new addition of primes are then raised to the next power? Meaning sum of primes (3+4+5) cubed or (3+4+5+6) to the fourth.

PrimePowerSum[x_,p_:1]:=(∑_(a=1)^x)((Prime[a])^p)

PrimePowerSum[3]

Solve[tri[n]==PrimePowerSum[3,1],n]

PrimePowerSum[3+4,2]

Solve[tri[n]==PrimePowerSum[3+4,2],n]

PrimePowerSum[3+4+5,3]

Solve[tri[n]==PrimePowerSum[3+4+5,3],n]

Answer: no, but this may be promising for more experimentation.

Do (11^n) and Pascal’s Triangle Provide A Way to Go From Base-Infinity to Base Specific (i.e. Base-10)? No Answer Yet

On Imgur I stumbled on https://imgur.com/gallery/on6zVM6/comment/1834371379 which resulted in a brief dialogue with Greg and later again in 2022-08-16. This made me realize Pascal’s triangle (https://www.geogebra.org/m/hcmgsfpu) is fundamentally tied to (11^n) and how (11^5)=161051 shows how triangular values bridge from base-10 to potentially base-infinity (15AA51). In other words the pattern of (11^n)=PascalRow(n) for n<5 as shown below, but Pascal’s triangle easily handles any number of rows with perfect symmetry forever.


This is even more interesting when considering how:

(((a + b))^n) = PascalRow(n, 0)*(a^n)+ PascalRow(n, 0)*(a^(n-1))(b^(n-2))...+PascalRow(n, n)*(b^n)

Using an example:

(((a+b))^2)=PascalRow(2,0)*(a^2)+ PascalRow(2,1)*(a^1)(b^1)+PascalRow(2,2)*(b^2)

A secondary interesting feature is how Pascal’s triangle also generates the Fibonacci sequence which encodes the Golden Ratio as the ratio between the Fib(n+1) and the Fib(n) value.

Limit[((Fibonacci[n+1])/(Fibonacci[n])),n-> ∞]

Thinking about this I realized we could use the geometric squares as a direct parallel with the squares in (((a + b))^n).

So,

(a^2)+2ab+(b^2)=121=100+20+1 where ⌈a⌉=10, ⌊b⌋=1 because a=11-b, b=11-a. So the biggest a can be is 10, making b=1. Thus 2ab=2*10*1=20.

This gave me an idea of how we could possibly figure out (11^5)=161051 as more properly 1,5,10,10,5,1. Since 161051 is just the result of 1(5+1)(0+1)(0)51. Meaning we could possibly disentangle this to get it in a format like 15AA51 by using the factors. Basically we know the front and end are correct because we have 1s there. The middle we know is somehow messed up because it doesn’t mirror on the left and right as 5AA5. So the idea is we could use the expansion of (((a+b))^5) to decompose the middle piece.

Expand[(((a+b))^5)]

Given this expansion we can take the middle terms and set it to the difference removing (a^5) and (b^5) from the entire thing combined as (11^5). For example,  (11^5)-((10^5)+(1^5))=5(a^4) b+10 (a^3) (b^2)+10 (a^2) (b^3)+5 a (b^4)==61050 (solving for 61051 gives an interesting 2(Sqrt[5])pattern).

Solve[5 (a^4) b+10 (a^3) (b^2)+10 (a^2) (b^3)+5 a (b^4)==61050,a]

Evaluating the individual terms we would get a=(10^5),b=(10^1)or 100001 leaving the 4 values in the middle open (6105 being what we get from (11^5) and 5AA5 from pascal’s triangle). So since we know how to go from 5AA5 to 6105 (i.e. (5+1)(0+1)05=6105) we can ask if we can go from 6105 to 5AA5?

I suspect we would have to know the number-base we are already in (guessing base-11 here for (11^5)) and the numberbase we’re going to. This gets to the problem from earlier:

(∑_(x=1)^8)TriRow[36,8,x]//b@36

If we look at the left-most r it would equal r*(36^5)//b@36 and r is the 18th character so we start counting 9+18.

(9+18)*(36^5)//b@36

The problem is this value in base-10 isn’t just a simple 10+1 scenario where we carry a single digit to the left and leave a single digit in the right column. There are 18 1’s (from 9+18=27) that need to carry to the left in base-10. Meaning if there was a 0 to the left of our r*(36^5) it would become 18 in base-10. This is further complicated because our positions in this string represent multiples of (36^x). This means 10 is really 37. Having 18 extra 37s gives 666 (funny). To make matters more difficult (36^5)=60466176. This indicates our 18 1’s are multiples of this and generates integers all the way up to (10^9). So going from base-10 to base-36 in-situ for middle values is probably pretty hard because it ends up affecting numbers in every term of the expansion.

(9+18)*(36^5)//b@10

11 may be a unique case that helps abstract this so we can handle the carrying more cleanly as we go from base-11 (?) to base-10 (as the simple case that we see with 5AA5 and 6105) to more complicated operations. 

Since we have a way to go from 5AA5 to 6105 (i.e. (5+1)(0+1)05=6105) let’s see how we reverse it using (((a+b))^5) as (5 (a^4) b)+(10 (a^3) (b^2))+(10 (a^2) (b^3))+(5 a (b^4)). Here we have (5 (a^4) b)=60000 or =50000. In the case of it being 5*(10^4) this means a and b have to be 10 and 1.

A=10;B=1;

baseForm[(A^5)+5 (A^4) B+10 (A^3) (B^2)+10 (A^2) (B^3)+5 A (B^4)+(B^5),10]

11^^15AA51 (*Note this is roughly what we want, but clearly base-11 doesn't work*)

A=.;B=.;

In the case of 6? We can look at how the whole expression should work out for a or b over 161051.

Solve[((a^5))+(5 (a^4) b)+(10 (a^3) (b^2))+(10 (a^2) (b^3))+(5 a (b^4))+((b^5))==161051,a]

Unfortunately the is don’t help to make this any more easy to interpret, so we’ll look at 6*(10^4) alone.

Solve[(5 (a^4) b)==60000,b]

Solve[(5 (a^4) b)==60000,a]

What’s interesting is this is saying 5*(a^4)*(12000/(a^4))=60000. So the ((a^4)/(a^4))=1 meaning 5*12000=60000. In the case of 5*(10^4)

Solve[(5 (a^4) b)==50000,b]

What changes is the 10,000 from 12,000. So somehow I need to know how to go from 12*(10^4)->10*(10^4)=(10^5). The leading 5 is obviously the giveaway (5(a^4)b). The problem is we don’t have that expression by default. It’s constructed by hand and we want to get this by doing something like (11^5). We could use the previous row to build it. However, it feels like we should be able to do this just by looking at a single row alone. I suppose if (a^4)b≠(10^5) then we know we’re already up or down 1 in the current column. The problem is we still need to know what to divide by. Given 12000 I can see the value is 5 ((60000/12000)). Therefore we’re +1 and need to subtract that value and add it to the column to the right. (x+1)*(10^3). Maybe we can look at its mirror in the (10^1)? No because after 1,2,3,4,5,6,7,8,9, we get a 10 and then it would carry to the left and need to be reverted.

Basically we’re in a bind. If I have Pascal’s triangle computing the coefficients I don’t need (11^x). If I do have Pascal’s triangle in play I can use it to do the conversion because

N[(60000/12000)]

However, really all that ever does is just create the 0s. So I could just use Log to find the length for a particular position in the number.

N[Ceiling[Log[10,60000+.0000001]]]

So all I really need is the difference 6-5=1. That means we add the value back to the right.

This won’t work as a standard number-base conversion because the outer characters maintain a lower base from the factors in the center.

Finding a way to convert from nonstandard numbers to other numbers of bases (i.e. converting 17 base-10 to base-2) is likely a way to understand all of this at a deeper level because it’s not base-specific then

Trying to use formulas like TriRow could help to think about how to properly represent these values

(11^5)=(Subscript[10000, 11]) shows that converting to 15AA51 isn’t a simple matter of base conversion. I think each factor has its own number base or the pairs have the same number base. i.e BaseForm[10,11]=(Subscript[a, 11])

Note: (A^5)+5 (A^4) B+10 (A^3) (B^2)+10 (A^2) (B^3)+5 A (B^4)+(B^5) , in this situation A represents the number-base (i.e. (11^X) shown in (Subscript[base, infinity])). B represents the multiplicative identity.

A=10+1; (* i.e. 10=A and 11 is the new 10 *)

1*(A^5)+5*(A^4)+10*(A^3)+10*(A^2)+5*(A^1)+1//b@A  (* PascalsTriangleRow[5]= 1,5,10,10,5,1 *)

1*(A^5)+5*(A^4)+10*(A^3)+10*(A^2)+5*(A^1)+1

Expand[(((a+b))^6)]

A=(10+11); (* i.e. 20=k,15=f in 1,6,F,K,F,6,1 and 21 is the new 10 *)

(A^6)+6(A^5)+15(A^4)+20(A^3)+15(A^2)+6 (A^1)+1//b@A (* PascalsTriangleRow[6]= 1,6,15,20,15,6,1 *)

So the question becomes? What is the connection between (11^5) and A=11;1*(A^5)+5*(A^4)+10*(A^3)+10*(A^2)+5*(A^1)+1=248832? Similarly (11^6) and A=21;1*(A^6)+6*(A^5)+15*(A^4)+20*(A^3)+15(A^2)+6 (A^1)+1? Note it increases by multiples of 6,3,2,(1/2).

(11^5) (*analyzing the 5th row of pascal's triangle*)

A=11;1*(A^5)+5*(A^4)+10*(A^3)+10*(A^2)+5*(A^1)+1

N[248832/(11^5)] (*so roughly ~1.5 times bigger*)

N[Log[((11^5)),248832]] (* how much higher of a power is this? 5 * 1.03629 *)

(11^6)  (*now analyzing the 6th row*)

A=21;1*(A^6)+6*(A^5)+15*(A^4)+20*(A^3)+15(A^2)+6 (A^1)+1

N[113379904/(11^6)]  (* 6th row is 64 times greater ... *)

FactorInteger[64] (* ... and the factors of how much bigger relate to the rows? *)

(2^6)

Note: (11^6)= 1,6,F,T,F,6,1 and this is the 7th (start=1) or 6th row (start=0) of Pascal’s triangle. So if I can find a common growth rate between (11^x) and Pascal’s Triangle I may be able to do (11^x)*growth or ((((11^x)))^growth) to get the right number and then I just need to find the number base which is just (11*x)-(x-1)?

({{(11^5)*x, 248832}, {(11^6)*x, 113379904}})

(11*3)-(3-1)

We need 2x2 to find the inverse for AX=B->X=(A^(-1))B

A=(({{((11^5)-1), 1}, {((11^6)-1), 1}}));X=(({{(Subscript[x, 0])}, {(Subscript[x, 1])}}));B=(({{248832}, {113379904}}));

A.Inverse[A]==IdentityMatrix[2]

N[MatrixForm[Inverse[A].B]]

A=(({{((11^5)-2), 1, 1}, {((11^6)-2), 1, 1}, {((11^7)-2), 1, 1}}));X=(({{(Subscript[x, 0])}, {(Subscript[x, 1])}, {(Subscript[x, 2])}}));B=(({{248832}, {113379904}, {94931877133}}));

N[MatrixForm[Inverse[A].B]]

((11^7)-2)*5177.82

A=.;B=.;X=.

PascalRow[n_,b_:-1]:=Module[{n2,base,vbase,pascalVal,pascalSet},
n2=n-1; (*local n*)
base=Binomial[n2,Round[(n2)/2]]+1;
If[b==-1,vbase=base,vbase=b];
pascalVal=(∑_(i=0)^n2)Binomial[n2,i]*(base^(n2-i));
pascalSet=Table[Binomial[n2, k], {k, 0, n2}];
{{base,pascalSet, If[base≤36,BaseForm[pascalVal,vbase],pascalVal]},(11^n2)}]

FullSimplify[Binomial[n2,Floor[(n2)/2]]+1]

FullSimplify[(∑_(i=0)^n2)Binomial[n2,i]*(base^(n2-i))]

PascalVal[r_]:=BaseForm[(((1+(1/(NumberBaseForRow[r-1]))))^r) (((NumberBaseForRow[r])^r),NumberBaseForRow[r]]

PascalVal[5]

(11^3)=(((1+(1/4)))^3)(4^3)
(11^4)=(((1+(1/7)))^4)(7^3)

NumberBaseForRow[r_]:=Module[{n},n=r-1;(((n!)/((n-(Floor[(n/2)]))!(Floor[(n/2)])!))+1)]

Table[N[NumberBaseForRow[x]],{x,1,20}]

Do[Print[PascalRow[n]], {n,1,12}]

Do[Print[PascalRow[n,10]], {n,1,12}]

The sequence 2,2,3,4,7, etc comes from OEIS A051920.

Miscellaneous Tinkering ...

(∑_(y=0)^2)((∑_(x=1)^1)2-y)

(tri[3]-tri[2])-1

(∑_(x=((tri[4]-tri[3])-1))^(((tri[4]-tri[3])-1)+(tri[3]-tri[2])))(tri[0]+x)*(10^(((tri[4]-tri[3]-1)-x)))

(∑_(x=tri[2])^((tri[3]-tri[2])-1))(tri[0]+x)*(10^((((tri[3]-tri[2])-1)-x)))

(∑_(x=tri[3])^(tri[4]))(tri[4]+x)*(10^((tri[4]-x)))

(∑_(y=3)^0)\[Placeholder](∑_(x=0)^y)(y-x)*(10^x)

So likewise using base 36 ...

(∑_(x=0)^(36-1))(35-x)*(36^x)

Connection Between Primes and Triangular Numbers

The big question here that I want to explore is whether (∑_(x=1)^4)TriRow[10,4,x]=666= (2^2)+(3^2)+(5^2)+(7^2)+(11^2)+(13^2)+(17^2) somehow means (∑_(x=1)^36)TriRow[666,36,x] = (2^2) + (3^2) + (5^2) + ... +((Subscript[p, z])^2).

To really dig into this question it's helpful to look at a table of triangular numbers and compare it to a table of summed primes and squared primes to find moments when the two meet.

Table[tri[x], {x, 1, 69}]

Next let’s create a quick function to sum primes and their squares

p[m_,e_]:=(∑_(x=1)^m)((Prime[x])^e)

Now let’s see if we get any hits with triangular numbers ...

Table[p[x,1], {x, 1, 36}]

The set of hits include {10, 28}

Intersection[Table[p[x,1], {x, 1, 36}], Table[tri[x], {x, 1, 69}]]

Now let’s try squared primes.

Table[p[x,2], {x, 1, 13}]

In this case we get hits with {666}.

Intersection[Table[tri[x], {x, 1, 69}],Table[p[x,2], {x, 1, 13}]]

So it’s not exactly a common occurrence. What’s interesting though is, again, we see 10 and 666 seem to have something in common.

Now let’s try to sum lots of different number bases and see whether those numbers align with the above prime lists (these numbers should always be triangular numbers). 

Obviously only triangular numbers will give whole ℤ’s, as the command below shows ...

Table[N[SumTriRows[x]], {x, 2, 12}]

So just putting in tri’s ...

Table[SumTriRows[x],{x,{3,6,10,15,21,28,36,45,55}}]

The set of hits includes {666}.

Oddities

2+3+5=10 (or (∑_(i=1)^3)Prime[i] = △10 /w elements 0-9 that sum to 666) &  (2^2)+(3^2)+(5^2)+(7^2) +(11^2)+(13^2)+(17^2)=666 (or (∑_(i=1)^7)((Prime[i])^2)=△666). △10 seems to emit elements of the second:

In place of an equilateral △, we can use trigonometric properties of a right tri (ie. (Subscript[θ, B])=90°, (Subscript[θ, A])+(Subscript[θ, C])=90°) to look for correspondences between well-known constants to see if any line up around 60°=(π/3)=1.0472.

Formulary (FindingRatiosByMod[ratiotest, start, end], FindingRatiosByCoeff[coeff, ...], FindingRatiosList[{test1,test2},...], MatchForWhichBy...[...], ... )

ClearAll["Global`*"]

TotalDegrees=360

DigitalRoots[l_]:=Module[{result=l},
While[True,
result=Plus@@IntegerDigits[result];
If[IntegerLength[result]>1, (**Print[result];**) Continue[]];
Break[];
];
result
]

Table[N[x,0], {x, 0,5,.3}]

Table[
If[True,
(*THEN*)x,
(*ELSE*)I] (* shouldn't ever hit I  -- {x,sinMin,sinBig}*),
{x,1,5, .5}]

FindingRatiosByMod[ratiotest_,start_,end_,inc_]:=Module[
{prec=6,sinVal=0,sinBig=0,sinMin=0,cosVal=0,cosBig=0,cosMin=0,nratio=0,final},(** local variables **)
(**Print[ratiotest, " ", start," ", end];**)
Block[{$MaxExtraPrecision=prec},
nratio=N[ratiotest,prec];
final=Table[
sinVal=N[Sin[((x*π)/(TotalDegrees/2))],prec];
cosVal=N[Cos[((x*π)/(TotalDegrees/2))],prec];
sinBig=Max[sinVal,nratio];
cosBig=Max[cosVal,nratio];
sinMin=Min[sinVal, nratio];
cosMin=Min[cosVal, nratio];
If[
(  sinMin≠0∧ Mod[sinBig,sinMin]==0 ∨
cosMin≠0∧ Mod[cosBig,cosMin]==0),
(*THEN*)x, (*debug: {x,inc}*)
(*ELSE*)I] (* shouldn't ever hit I  -- {x,sinMin,sinBig}*),
{x,start,end, inc}]
];
final=DeleteCases[final,I];
final
]

FindingRatiosList[ratiotest_,start_,end_, inc_]:= Module[{},
Cases[ratiotest,i_:> FindingRatiosByMod[i,start,end,inc]]
]

FindingRatiosByCoeff[coeff_,ratiotest_,start_,end_,inc_:1]:=Intersection[Table[If[(Abs[coeff*Sin[((x*π)/(TotalDegrees/2))]]==ratiotest)∨(Abs[coeff*Cos[((x*π)/(TotalDegrees/2))]]==ratiotest),x,I],{x,start,end}], Table[x, {x,start,end,inc}]]

MatchForWhichByCoeff[coeff_,ratiotest_,start_,end_]:=Cases[FindingRatiosByCoeff[coeff,ratiotest, start,end],i_:> {i,If[Abs[coeff*Sin[(i)°]]==ratiotest,"Sin","Cos"]}]

MatchForWhichByMod[ratiotest_,list_]:=Cases[list,i_:> {i, If[FractionalPart[FullSimplify[(ratiotest/(Sin[(i)°]))]]==0,"Sin","Cos"]}]

GenerateProductCompositeOddBase[base_Integer,d2_Integer,n_Integer]:=Module[{d1,A,B,ProductDecimal,ProductBase,carry,resultDigits,i},
If[PrimeQ[base],Return["Base must be composite."]];If[!Divisible[base,d2],Return["d2 must be a factor of the base."]];If[d2==1,Return["d2 cannot be 1, as it leads to invalid d1."]];
d1=base/d2;
If[!IntegerQ[d1],Return["d1 must be an integer."]];
A=FromDigits[Table[d1,{n+1}],base];
B=FromDigits[Table[d2,{n}],base];
ProductDecimal=A*B;
ProductBase=IntegerDigits[ProductDecimal,base];{"Base"->base,"d1"->d1,"d2"->d2,"FirstMultiplicand (A)"->BaseForm[A,base],"SecondMultiplicand (B)"->BaseForm[B,base],"Product in Base 10"->ProductDecimal,"Product in Base "<>ToString[base]->BaseForm[ProductDecimal,base],"Pattern Observed"->ProductBase}
]

Feigenbaum=π+ArcTan[(E^π)];Apery=1.2020569;Conway=1.30357;Brun=1.90216054;TwinPrime=0.6601618158;

FindingRatiosList[{GoldenRatio,E,EulerGamma,(Sqrt[2]),(Sqrt[5]),Catalan,Glaisher, Khinchin,Feigenbaum,Apery,Conway, Brun,TwinPrime}, 0, TotalDegrees*2,1]

{{36,54,126,144,216,234,306,324,396,414,486,504,576,594,666,684},{},{},{45,135,315,405,495,675},{},{},{},{},{},{},{}, {}}

Curiously we find 666° in the list and it happens to equal a known constant (possibly because base-60 is a superior highly composite number or because primes are adjacent to multiples of 6?).

GoldenRatio==((1+(Sqrt[5]))/2)==2*Cos[(π/5)]==-2*Sin[666°]

666==1+5+10+50+100+500==1+(1*5)+(5*2)+(10*5)+(50*2)+(100*5)

The 1+5+10+50+100+500 sequence is the same as I + V + X + L + C + D. A variation of 5,2,5,2,5… where the new number is multiplied by the previous one. Now, note, as stated above ϕ = (Sqrt[1+5])/2. As strange as this is, it appears there is a mapping of some sort between an irrational number (ϕ), an integer (666), and the same number as a degree measure (666°=4π-54°=3.7π).

The {5,2} appears to be key in the relationship:

(∑_(y=1)^3)(5^y)+(∑_(x=1)^8)(2^x)+1

Note how each element from the above summation breaks down over the individual rows of tri[4] ...

({{ , rows, equivalancy, (5^x)+(2^x) breakdown, {(5^x),(2^x)} sum}, {a), 9 = , ((5^1)*2)-1=…, (5^1)+(2^2)=, 9}, {b), 78 = , ((5^2)*3)+3; vs., (5^2)+(2^5)+(2^4)+(2^1)+1=, 76}, {c), 456 =, …, (2^8)+(2^7)+(2^6)+(2^3)=, 456}, {d), 123 =, ((5^3)*1)-2; vs., (5^3)=, 125}})

There seems to be some sort of “integer reciprocalness” (1*.5=(1/2)) where 5 mimics 2, and vice versa, on the flipside of the radix point ((5/2)=2.5) that appears to show a connection between operations versus values ((5^2)=25). Almost as though the numbers somehow intrinsically flip about each other. This “flipping” is possibly reflected as a property of the number-base (mirroring half of the rowreverse[], leftedge[], and the rightedge[] functions as discussed in the preamble establishing the initial SumTriRows[]):

555555*22222

When factoring the number base ((Subscript[d, 1])=(b/(Subscript[d, 2]))) and identifying the lowest prime factor ((Subscript[d, 2])=LowestPrimeFactor[b]) this will generate the pattern above consistently.

GenerateProductCompositeOddBase[10,2,9]

This works for all numbers that aren’t prime, and can be demonstrated with odd numbers like so:

GenerateProductCompositeOddBase[9,3,4]

Todo: check tetration and compare area ((n(n+1))/2) to (1/2)bh and ((Sqrt[3])/4)(s^2), s=(Sqrt[2(n^2)]) (i.e. Solve[(((n^2)+n)/2)==((2(n^2)(Sqrt[3]))/2)]->{{n->0},{n->(1/(-1+2 (Sqrt[3])))}}).

r[n_]:=((∑_(x=1)^n)(5^x)*(2^((x-1)))+(∑_(y=1)^n)(((2^y)*(5^((y-1))))/2))

Table[r[x], {x, 1, 5}]