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!)
A350530 Square array read by antidiagonals downwards: T(n,k) is the number of sequences of length n with terms in 0..k such that the (n-1)-st difference is zero, but no earlier iterated difference is zero, n, k >= 1. 2

%I #13 Jan 13 2022 02:32:26

%S 1,1,0,1,1,0,1,2,0,0,1,3,0,0,0,1,4,2,0,0,0,1,5,4,0,0,0,0,1,6,8,0,0,0,

%T 0,0,1,7,12,4,0,0,0,0,0,1,8,18,12,8,4,0,0,0,0,1,9,24,28,36,28,4,0,0,0,

%U 0,1,10,32,52,84,116,48,16,0,0,0,0

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

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

%H Pontus von Brömssen, <a href="/A350530/b350530.txt">Antidiagonals n = 1..19, flattened</a>

%e Array begins:

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

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

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

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

%e 3 | 0 0 0 2 4 8 12 18 24 32 40

%e 4 | 0 0 0 0 0 4 12 28 52 84 132

%e 5 | 0 0 0 0 0 8 36 84 176 332 568

%e 6 | 0 0 0 0 4 28 116 308 704 1396 2548

%e 7 | 0 0 0 0 4 48 232 728 2104 4940 11008

%e 8 | 0 0 0 0 16 100 556 1936 7092 19908 49364

%e 9 | 0 0 0 0 12 176 1348 6588 23356 74228 202504

%e 10 | 0 0 0 0 8 268 2492 15544 72820 259800 842688

%e For n = 4 and k = 6, the following T(4,6) = 12 sequences are counted: 1454, 1564, 2125, 2565, 3126, 3236, 4541, 4651, 5212, 5652, 6213, 6323.

%o (Python)

%o def A350530_col(k,nmax):

%o d = []

%o c = [0]*nmax

%o while 1:

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

%o if d and d[-1][-1] == 0:

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

%o elif len(d) < nmax:

%o d.append([-1])

%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, A350365, A350529.

%Y Rows: A000012 (n=1), A001477 (n=2), A007590 (n=3).

%Y Columns: A000007 (k=0), A019590 (k=1), A130706 (k=2).

%K nonn,tabl

%O 1,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 April 23 07:16 EDT 2024. Contains 371905 sequences. (Running on oeis4.)