OFFSET
0,2
COMMENTS
Based on Pascal's triangle A007318 by additionally squaring the sum of each term generated. For example, in Pascal, n=3 gives 1,2,1. Here n=3 gives, 1^2, (1+1)^2, 1^2 = 1+4+1.
FORMULA
a(n) = Sum_{k=0..n} T(n,k) where T(n,k) = (T(n-1,k-1) + T(n-1,k))^2; T(0,0)=1; T(n,-1):=0; T(n,k):=0, n < k.
EXAMPLE
1 = 1
1 + 1 = 2
1 + (1 + 1)^2 + 1 = 1 + 4 + 1 = 6
1 + (1 + 4)^2 + (4 + 1)^2 + 1 = 1 + 25 + 25 + 1 = 52
1 + (1 + 25)^2 + (25 + 25)^2 + (25 + 1)^2 + 1 = 1 + 676 + 2500 + 676 + 1 = 3854.
PROG
(Python 3)
def r(i):
t = [[0, 1, 0], [0, 1, 1, 0]]
for n in range(2, i+1):
t.append([0])
for k in range(1, n+2):
t[n].append((t[n-1][k-1] + t[n-1][k])**2)
t[n].append(0)
return(sum(t[i]))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Glen Gilchrist, Aug 30 2020
STATUS
approved