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.

A126198 Triangle read by rows: T(n,k) (1 <= k <= n) = number of compositions of n into parts of size <= k.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 1, 5, 7, 8, 1, 8, 13, 15, 16, 1, 13, 24, 29, 31, 32, 1, 21, 44, 56, 61, 63, 64, 1, 34, 81, 108, 120, 125, 127, 128, 1, 55, 149, 208, 236, 248, 253, 255, 256, 1, 89, 274, 401, 464, 492, 504, 509, 511, 512, 1, 144, 504, 773, 912, 976, 1004, 1016, 1021, 1023, 1024
Offset: 1

Views

Author

N. J. A. Sloane, Mar 09 2007

Keywords

Comments

Also has an interpretation as number of binary vectors of length n-1 in which the length of the longest run of 1's is <= k (see A048004). - N. J. A. Sloane, Apr 03 2011
Higher Order Fibonacci numbers: A126198(n,k) = Sum_{h=0..k} A048004(n,h); for example, A126198(7,3) = Sum_{h=0..3} A048004(7,h) or A126198(7,3) = 1 + 33 + 47 + 27 = 108, the 7th tetranacci number. A048004 row(7) produces A126198 row(7) list of 1,34,81,108,120,125,127,128 which are 1, the 7th Fibonacci, the 7th tribonacci, ... 7th octanacci numbers. - Richard Southern, Aug 04 2017

Examples

			Triangle begins:
  1;
  1,  2;
  1,  3,  4;
  1,  5,  7,  8;
  1,  8, 13, 15, 16;
  1, 13, 24, 29, 31, 32;
  1, 21, 44, 56, 61, 63, 64;
Could also be extended to a square array:
  1  1  1  1  1  1  1 ...
  1  2  2  2  2  2  2 ...
  1  3  4  4  4  4  4 ...
  1  5  7  8  8  8  8 ...
  1  8 13 15 16 16 16 ...
  1 13 24 29 31 32 32 ...
  1 21 44 56 61 63 64 ...
which when read by antidiagonals (downwards) gives A048887.
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, pp. 154-155.

Crossrefs

Rows are partial sums of rows of A048004. Cf. A048887, A092921 for other versions.
2nd column = Fibonacci numbers, next two columns are A000073, A000078; last three diagonals are 2^n, 2^n-1, 2^n-3.
Cf. A082267.

Programs

  • Maple
    A126198 := proc(n,k) coeftayl( x*(1-x^k)/(1-2*x+x^(k+1)),x=0,n); end: for n from 1 to 11 do for k from 1 to n do printf("%d, ",A126198(n,k)); od; od; # R. J. Mathar, Mar 09 2007
    # second Maple program:
    T:= proc(n, k) option remember;
          if n=0 or k=1 then 1
        else add(T(n-j, k), j=1..min(n, k))
          fi
        end:
    seq(seq(T(n, k), k=1..n), n=1..15);  # Alois P. Heinz, Oct 23 2011
  • Mathematica
    rows = 11; t[n_, k_] := Sum[ (-1)^i*2^(n-i*(k+1))*Binomial[ n-i*k, i], {i, 0, Floor[n/(k+1)]}] - Sum[ (-1)^i*2^((-i)*(k+1)+n-1)*Binomial[ n-i*k-1, i], {i, 0, Floor[(n-1)/(k+1)]}]; Flatten[ Table[ t[n, k], {n, 1, rows}, {k, 1, n}]](* Jean-François Alcover, Nov 17 2011, after Max Alekseyev *)

Formula

G.f. for column k: (x-x^(k+1))/(1-2*x+x^(k+1)). [Riordan]
T(n,3) = A008937(n) - A008937(n-3) for n>=3. T(n,4) = A107066(n-1) - A107066(n-5) for n>=5. T(n,5) = A001949(n+4) - A001949(n-1) for n>=5. - R. J. Mathar, Mar 09 2007
T(n,k) = A181695(n,k) - A181695(n-1,k). - Max Alekseyev, Nov 18 2010
Conjecture: Sum_{k=1..n} T(n,k) = A039671(n), n>0. - L. Edson Jeffery, Nov 29 2013

Extensions

More terms from R. J. Mathar, Mar 09 2007

A082266 In the array shown below the n-th row contains all the palindromes that use digits > 0 and have a digit sum of n. The sequence contains the array read by rows.

Original entry on oeis.org

1, 2, 11, 3, 111, 4, 22, 121, 1111, 5, 131, 212, 11111, 6, 33, 141, 222, 1221, 2112, 11211, 111111, 7, 151, 232, 313, 11311, 12121, 21112, 1111111, 8, 44, 161, 242, 323, 1331, 2222, 3113, 11411, 12221, 21212, 112211, 121121, 211112, 1112111, 11111111
Offset: 1

Views

Author

Amarnath Murthy, Apr 12 2003

Keywords

Examples

			In the following array the n-th row contains all the palindromes that use digits > 0 and have a digit sum of n.
1
2 11
3 111
4 22 121 1111
5 131 212 11111
6 33 141 222 1221 2112 111111
...
The sequence contains the array read by rows.
		

Crossrefs

Programs

  • Maple
    isPali := proc(perm) local i ; for i from 1 to nops(perm)/2 do if op(i,perm) <> op(-i,perm) then RETURN(false) ; fi ; od ; RETURN(true) ; end: isSingDig := proc(perm) local i ; for i from 1 to nops(perm) do if op(i,perm)>9 then RETURN(false) ; fi ; od ; RETURN(true) ; end: A082266 := proc(n) local arow,npart,pindx,part,perm,i,cand,j,pali ; arow := [] ; npart := combinat[partition](n) ; for pindx from 1 to nops(npart) do part := op(pindx,npart) ; perm := combinat[permute](part) ; for i from 1 to nops(perm) do cand := op(i,perm) ; if isSingDig(cand) and isPali(cand) then pali := add( op(j,cand)*10^(j-1),j=1..nops(cand) ) ; arow := [op(arow),pali] ; fi ; od ; od ; RETURN(sort(arow)) ; end: for n from 1 to 10 do arow := A082266(n) : for i from 1 to nops(arow) do printf("%d,",op(i,arow)) ; od : od : # R. J. Mathar, Mar 07 2007

Formula

For formulas see A082267.

Extensions

Corrected and extended by R. J. Mathar, Mar 07 2007
Showing 1-2 of 2 results.