|
|
A158415
|
|
Number of different (by numeric value, not by structure) expressions, consisting of N symbols, each of them is one of: nullary 1, unary sqrt(), binary +.
|
|
1
|
|
|
1, 1, 2, 3, 5, 8, 13, 20, 33, 54, 91, 154, 264, 455, 791, 1379, 2424, 4277, 7588, 13513, 24162, 43336, 77978, 140683, 254487, 461409, 838433, 1526536
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
EXAMPLE
|
a(3)=2 because there are 2 different expressions: sqrt(sqrt(1)), 1+1.
|
|
PROG
|
(PARI) allocatemem(2*10^8); \
a=L=vector(28); eps=10^(-20); a[1]=[1]; L[1]=1; print1(1", "); \
for(i=2, 28, b=vector(L[i-1]+sum(j=1, (i-1)\2, L[j]*L[i-j-1])); \
up=0; for(j=1, L[i-1], up++; b[up]=sqrt(a[i-1][j])); \
for(j=1, (i-1)\2, for(k=1, L[j], for(l=1, L[i-1-j], \
up++; b[up]=a[j][k]+a[i-1-j][l]))); \
c=vector(up, j, b[j]); c=vecsort(c); s=0; \
for(j=1, up, if((j==1)||(c[j]>c[j-1]+eps), s++)); \
a[i]=vector(s); s=0; \
for(j=1, up, if((j==1)||(c[j]>c[j-1]+eps), s++; a[i][s]=c[j])); \
|
|
CROSSREFS
|
|
|
KEYWORD
|
hard,more,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|