login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A350529 Square array read by antidiagonals downwards: T(n,k) is the number of sequences of length n with terms in 1..k such that no iterated difference is zero, n, k >= 0. 3

%I #12 Jan 13 2022 02:32:31

%S 1,1,0,1,1,0,1,2,0,0,1,3,2,0,0,1,4,6,2,0,0,1,5,12,10,2,0,0,1,6,20,32,

%T 16,2,0,0,1,7,30,72,86,26,2,0,0,1,8,42,138,256,232,42,2,0,0,1,9,56,

%U 234,624,906,622,68,2,0,0

%N Square array read by antidiagonals downwards: T(n,k) is the number of sequences of length n with terms in 1..k such that no iterated difference is zero, n, k >= 0.

%C For fixed n, T(n,k) is a quasi-polynomial of degree n in k. For example, T(4,k) = k^4 - (116/27)*k^3 + (25/3)*k^2 + b(k)*k + c(k), where b and c are periodic with period 6.

%H Pontus von Brömssen, <a href="/A350529/b350529.txt">Antidiagonals n = 0..20, flattened</a>

%e n\k| 0 1 2 3 4 5 6 7 8 9 10

%e ---+--------------------------------------------------------------------------

%e 0 | 1 1 1 1 1 1 1 1 1 1 1

%e 1 | 0 1 2 3 4 5 6 7 8 9 10

%e 2 | 0 0 2 6 12 20 30 42 56 72 90

%e 3 | 0 0 2 10 32 72 138 234 368 544 770

%e 4 | 0 0 2 16 86 256 624 1278 2370 4030 6462

%e 5 | 0 0 2 26 232 906 2790 6900 15096 29536 53678

%e 6 | 0 0 2 42 622 3180 12366 36964 95494 215146 443464

%e 7 | 0 0 2 68 1662 11116 54572 197294 601986 1562274 3652850

%e 8 | 0 0 2 110 4426 38754 240278 1051298 3788268 11325490 30041458

%e 9 | 0 0 2 178 11774 134902 1056546 5595236 23814458 82024662 246853482

%e 10 | 0 0 2 288 31316 469306 4643300 29762654 149631992 593798912 2027577296

%e For n = 4 and k = 3, the following T(4,3) = 16 sequences are counted: 1212, 1213, 1312, 1313, 1323, 2121, 2131, 2132, 2312, 2313, 2323, 3121, 3131, 3132, 3231, 3232.

%o (Python)

%o def A350529_col(k,nmax):

%o d = []

%o c = [0]*(nmax+1)

%o while 1:

%o if not d or all(d[-1]):

%o c[len(d)] += 1 + (bool(d) and 2*d[0][0] != k+1)

%o if len(d) < nmax:

%o d.append([0])

%o for i in range(len(d)-1):

%o d[-1].append(d[-1][-1]-d[-2][i])

%o while d and d[-1][0] == k:

%o d.pop()

%o if not d or len(d) == 1 and 2*d[0][0] >= k: return c

%o for i in range(len(d)):

%o d[-1][i] += 1

%Y Cf. A200154, A350364, A350530.

%Y Rows: A000012 (n=0), A001477 (n=1), A002378 (n=2), A055232 (terms of row n=3 divided by 2).

%Y Columns: A000007 (k=0), A019590 (k=1), A040000 (k=2), A054886 (k=3).

%K nonn,tabl

%O 0,8

%A _Pontus von Brömssen_, Jan 03 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 9 01:17 EDT 2024. Contains 375759 sequences. (Running on oeis4.)