cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A261897 Triangle read by rows: T(n,k) (1 <= k <= n+1) = number of sequences of length n, dominated by the squares, with entries from [0,k] and largest entry k.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, 0, 2, 3, 1, 0, 2, 5, 4, 1, 0, 0, 7, 9, 5, 1, 0, 0, 7, 16, 14, 6, 1, 0, 0, 7, 23, 30, 20, 7, 1, 0, 0, 7, 30, 53, 50, 27, 8, 1, 0, 0, 7, 37, 83, 103, 77, 35, 9, 1, 0, 0, 0, 44, 120, 186, 180, 112, 44, 10, 1, 0, 0, 0, 44, 164, 306, 366, 292, 156, 54, 11, 1
Offset: 0

Views

Author

N. J. A. Sloane, Sep 05 2015

Keywords

Comments

A242105 gives the first nonzero terms per row, without repetitions. - Reinhard Zumkeller, Sep 06 2015

Examples

			Triangle begins:
1,
1,1,
0,2,1,
0,2,3,1,
0,2,5,4,1,
0,0,7,9,5,1,
0,0,7,16,14,6,1,
0,0,7,23,30,20,7,1,
0,0,7,30,53,50,27,8,1,
0,0,7,37,83,103,77,35,9,1,
0,0,0,44,120,186,180,112,44,10,1,
0,0,0,44,164,306,366,292,156,54,11,1,
...
		

Crossrefs

Cf. A242105, A261930 (row sums).

Programs

  • Haskell
    a261897 n k = a261897_tabl !! n !! (k-1)
    a261897_row n = a261897_tabl !! n
    a261897_tabl = [1] : f 1 0 [1] where
       f t h xs | t <= (h + 1) ^ 2  = ys : f (t + 1) h ys
                | otherwise         = ys' : f (t + 1) (h + 1) ys'
                where ys = zipWith (+) ([0] ++ xs) (xs ++ [0])
                      ys' = zipWith (+) ([0] ++ xs) (us ++ (0:vs) ++ [0])
                      (us, _:vs) = splitAt h xs
    -- Reinhard Zumkeller, Sep 06 2015

A355129 a(n) is the number of integer sequences b(0..n) of length n+1, with 0 <= b(k) <= k! and monotonic b(k) <= b(k+1).

Original entry on oeis.org

2, 3, 7, 40, 856, 91821, 60080136, 279276911843, 10503211888973754, 3585680755683196123365, 12323227994417456429490342865, 468378989392773003347310901356953089, 214565221409985003242070442557341938941878313, 1282499669290042152350268651085002913530161723080398635
Offset: 0

Views

Author

Thomas Scheuerle, Aug 04 2022

Keywords

Comments

List of the possible cases regarding the patterns of the numbers in the sequence b:
Length: 1 2 3 4 5 6
Pos 0: 1 1 1 1 1 1
Pos 1: 1 2 3 4 5 6
Pos 2: 0 0 3 7 12 18
Pos 3: 0 0 0 7 19 37
Pos 4: 0 0 0 7 26 63
Pos 5: 0 0 0 7 33 96
Pos 6: 0 0 0 7 40 136
Pos 7: 0 0 0 0 40 176
Pos 8: 0 0 0 0 40 216
... ... ... ... ... ... ...
Sum: 2 3 7 40 856 91821
Each row counts the number of possible distributions of numbers, row "Pos 0" is the number of possible distributions with only the number zero. The row "Pos 1" counts the distributions of zeros and ones. The row "Pos 2" the possible distributions of {0,1,2} and so forth.
From top to down: If a number in the column length = k has reached the value of the sum of the column length = k-1, this number will be k!-(k-1)!+1 times repeated. Before this limit is reached each number is the sum of the neighbor one step above and the neighbor one step to the left.

Examples

			For a(0) we get two possible sequences:
  {0}, {1}.
For a(1) we get three possible sequences:
  {0, 0}, {0, 1}, {1, 1}.
For a(2) = 7 we get:
  {0, 0, 0}, {0, 0, 1}, {0, 0, 2}, {0, 1, 1},
  {0, 1, 2}, {1, 1, 1}, {1, 1, 2}.
		

Crossrefs

Cf. A000108 (if we change the definition into 0 <= b(k) <= k).

Programs

  • PARI
    a(n) = binomial((n-1)! + n-1, n-1) + binomial((n-1)! + n-2, n-1) + sum(r = 1, n-2, sum(k = 0, r-1 ,binomial((n-1)! - r! - k+n - 2, n-1)*binomial(r-1,k)*a(r)*(-1)^(k+1)))

Formula

a(n) = binomial((n-1)! + n-1, n-1) + binomial((n-1)! + n-2, n-1) + Sum_{r = 1..n-2} Sum_{k = 0..r-1} binomial((n-1)! - r! - k+n - 2, n-1)*binomial(r-1,k)*a(r)*(-1)^(k+1).
Showing 1-2 of 2 results.