OFFSET
0,4
COMMENTS
Let T(m,n) = number of different strings of length n obtained from "123...m" by iteratively duplicating any substring (A137743).
It can be shown that for given k>=0 and all n>k-2, T(n,n+k) = (1/k!) P[k](n), where P[k] is a monic polynomial of degree k with integer coefficients, whose coefficients are the k-th column of the upper right triangular array defined by present sequence A137738.
Here rows and columns start at 0 (which also motivated the chosen offset 0), i.e. a(0) = 1 means P[0] = 1, a(1..2) = 0,1 means P[1] = 0 + 1*X, a(3..6) = -2,3,1 means P[2] = -2 + 3*X + 1*X^2, etc.
LINKS
M. F. Hasler, New topic: duplication of substrings, SeqFan mailing list, Feb 9-11, 2008.
FORMULA
P[k](n) = k! T(n,n+k) for k>=0 and positive n>k-2, where T(m,n) is given in A137743.
P[k] = X^k + A045943(k) X^(k-1) + O(X^(k-2)) for k>=1.
For m>0, T(n,n+m+3) = sum( T(k,k+m+2), k=m+1..n+1) - (1/m!) Q[m](n), where Q[m] is a monic polynomial of degree <= m with integer coefficients (conjectured - see examples).
EXAMPLE
We have the following formulas for T(m,n) as given in A137743:
T(n,n) = 1, T(n,n+1) = n, T(n,n+2) = (n+1)(n+2)/2 - 2,
T(n,n+3) = A137742 = (1/6)*(n-1)*(n+6)*(n+4) for n>1, for n=1 this formula gives 0 instead of 1.
T(n,n+4) = A137741 = (1/24)*(n+3)*(n^3+15*n^2+50*n-96) for n>2, for n=2 this gives 15 instead of 16.
T(n,n+5) = A137740 = (1/5!)*(n+4)*(n^2+3*n-8)*(n^2+23*n+150)+4 for n>3, for n=3 this gives 137 instead of 138.
T(n,n+6) = A137739 = (1/6!)*(n+9)*(n^5+36*n^4+451*n^3+1716*n^2-380*n-8880)-1 for n>4, for n=4 this gives 1013 instead of 1014.
They satisfy the following relations:
T(n,n+2) = sum( T(k,k+1), k=0..n+1) - 2
T(n,n+3) = sum( T(k,k+2), k=1..n+1) - 5
T(n,n+4) = sum( T(k,k+3), k=2..n+1) - 12 - n
T(n,n+5) = sum( T(k,k+4), k=3..n+1) - 21 - 7n/2 - n^2/2
T(n,n+6) = sum( T(k,k+5), k=4..n+1) + 49 - 25n/3 - 5n^2/2 - n^3/6
CROSSREFS
KEYWORD
AUTHOR
M. F. Hasler, Mar 18 2008
STATUS
approved