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-5 of 5 results.

A168021 Triangle T(n,k) read by rows in which row n lists the number of partitions of n into parts divisible by k.

Original entry on oeis.org

1, 2, 1, 3, 0, 1, 5, 2, 0, 1, 7, 0, 0, 0, 1, 11, 3, 2, 0, 0, 1, 15, 0, 0, 0, 0, 0, 1, 22, 5, 0, 2, 0, 0, 0, 1, 30, 0, 3, 0, 0, 0, 0, 0, 1, 42, 7, 0, 0, 2, 0, 0, 0, 0, 1, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 77, 11, 5, 3, 0, 2, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Omar E. Pol, Nov 20 2009, Nov 21 2009

Keywords

Comments

The row-reversed version is A168016.
Also see A168020.

Examples

			Triangle begins:
==============================================
...... k: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10 11 12
==============================================
n=1 ..... 1,
n=2 ..... 2, 1,
n=3 ..... 3, 0, 1,
n=4 ..... 5, 2, 0, 1,
n=5 ..... 7, 0, 0, 0, 1,
n=6 .... 11, 3, 2, 0, 0, 1,
n=7 .... 15, 0, 0, 0, 0, 0, 1,
n=8 .... 22, 5, 0, 2, 0, 0, 0, 1,
n=9 .... 30, 0, 3, 0, 0, 0, 0, 0, 1,
n=10 ... 42, 7, 0, 0, 2, 0, 0, 0, 0, 1,
n=11 ... 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
n=12 ... 77,11, 5, 3, 0, 2, 0, 0, 0, 0, 0, 1,
...
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= If[IntegerQ[n/k], PartitionsP[n/k], 0];
    Table[T[n, k], {n,15}, {k,n}]//Flatten (* G. C. Greubel, Jan 12 2023 *)
  • SageMath
    def A168021(n,k): return number_of_partitions(n/k) if (n%k)==0 else 0
    flatten([[A168021(n,k) for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Jan 12 2023

Formula

T(n,k) = A000041(n/k) if k|n, else T(n,k)=0.
Sum_{k=1..n} T(n, k) = A047968(n).
From G. C. Greubel, Jan 12 2023: (Start)
T(2*n, n) = 2*A000012(n).
T(2*n-1, n+1) = A000007(n-2). (End)

Extensions

Edited by Charles R Greathouse IV, Mar 23 2010

A168020 Square array read by antidiagonals in which row n lists the number of partitions of n into parts divisible by k.

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 5, 0, 0, 0, 7, 2, 1, 0, 0, 11, 0, 0, 0, 0, 0, 15, 3, 0, 1, 0, 0, 0, 22, 0, 2, 0, 0, 0, 0, 0, 30, 5, 0, 0, 1, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 7, 3, 2, 0, 1, 0, 0, 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Omar E. Pol, Nov 20 2009

Keywords

Comments

In the square array, note that the column k starts with k-1 zeros. Then list each partition number of positive integers followed by k-1 zeros. See A000041, which is the main entry for this sequence.

Examples

			The array, A(n, k), begins:
   n | k = 1   2   3   4   5   6   7   8   9  10  11  12
  ---+--------------------------------------------------
   1 |     1   0   0   0   0   0   0   0   0   0   0   0
   2 |     2   1   0   0   0   0   0   0   0   0   0   0
   3 |     3   0   1   0   0   0   0   0   0   0   0   0
   4 |     5   2   0   1   0   0   0   0   0   0   0   0
   5 |     7   0   0   0   1   0   0   0   0   0   0   0
   6 |    11   3   2   0   0   1   0   0   0   0   0   0
   7 |    15   0   0   0   0   0   1   0   0   0   0   0
   8 |    22   5   0   2   0   0   0   1   0   0   0   0
   9 |    30   0   3   0   0   0   0   0   1   0   0   0
  10 |    42   7   0   0   2   0   0   0   0   1   0   0
  11 |    56   0   0   0   0   0   0   0   0   0   1   0
  12 |    77  11   5   3   0   2   0   0   0   0   0   1
  ...
Antidiagonal triangle, T(n,k), begins as:
   1;
   2, 0;
   3, 1, 0;
   5, 0, 0, 0;
   7, 2, 1, 0, 0;
  11, 0, 0, 0, 0, 0;
  15, 3, 0, 1, 0, 0, 0;
  22, 0, 2, 0, 0, 0, 0, 0;
  30, 5, 0, 0, 1, 0, 0, 0, 0;
  42, 0, 0, 0, 0, 0, 0, 0, 0, 0;
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= If[IntegerQ[(n-k+1)/k], PartitionsP[(n-k+1)/k], 0];
    Table[T[n, k], {n,15}, {k,n}]//Flatten (* G. C. Greubel, Jan 12 2023 *)
  • SageMath
    def A168020(n,k): return number_of_partitions((n-k+1)/k) if ((n-k+1)%k)==0 else 0
    flatten([[A168020(n,k) for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Jan 12 2023

Formula

A(n, k) = A000041(n/k) if k divides n, otherwise A(n, k) = 0 (array).
A(n, 1) = A(n*k, k) = A000041(n).
From G. C. Greubel, Jan 12 2023: (Start)
T(n, k) = A000041((n-k+1)/k) if k divides (n-k+1), otherwise T(n, k) = 0 (triangle).
T(n, 1) = A000041(n).
T(2*n, n) = 2*A000007(n-1), n >= 1. (End)

Extensions

Edited by Omar E. Pol, Nov 21 2009
Edited by Charles R Greathouse IV, Mar 23 2010
Edited by Max Alekseyev, May 07 2010

A168017 Triangle read by rows in which row n lists the number of partitions of n into parts divisible by d, where d is a divisor of n listed in decreasing order.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 2, 5, 1, 7, 1, 2, 3, 11, 1, 15, 1, 2, 5, 22, 1, 3, 30, 1, 2, 7, 42, 1, 56, 1, 2, 3, 5, 11, 77, 1, 101, 1, 2, 15, 135, 1, 3, 7, 176, 1, 2, 5, 22, 231, 1, 297, 1, 2, 3, 11, 30, 385, 1, 490, 1, 2, 5, 7, 42, 627, 1, 3, 15, 792, 1, 2, 56, 1002
Offset: 1

Views

Author

Omar E. Pol, Nov 22 2009

Keywords

Comments

Positive values of triangle A168016.
The number of terms of row n is equal to the number of divisors of n: A000005(n).
Note that the last term of each row is the number of partitions of n: A000041(n).
Also, it appears that row n lists the partition numbers of the divisors of n. [Omar E. Pol, Nov 23 2009]

Examples

			Consider row n=8: (1, 2, 5, 22). The divisors of 8 listed in decreasing order are 8, 4, 2, 1 (see A056538). There is 1 partition of 8 into parts divisible by 8. Also, there are 2 partitions of 8 into parts divisible by 4: {(8), (4+4)}; 5 partitions of 8 into parts divisible by 2: {(8), (6+2), (4+4), (4+2+2), (2+2+2+2)}; and 22 partitions of 8 into parts divisible by 1, because A000041(8)=22. Then row 8 is formed by 1, 2, 5, 22.
Triangle begins:
1;
1,  2;
1,  3;
1,  2,  5;
1,  7;
1,  2,  3, 11;
1, 15;
1,  2,  5, 22;
1,  3, 30;
1,  2,  7, 42;
1, 56;
1,  2,  3,  5, 11, 77;
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, i, d) option remember;
          if n<0 then 0
        elif n=0 then 1
        elif i<1 then 0
        else b(n, i-d, d) +b(n-i, i, d)
          fi
        end:
    T:= proc(n) local l;
          l:= sort([divisors(n)[]],`>`);
          seq(b(n, n, l[i]), i=1..nops(l))
        end:
    seq(T(n), n=1..30); # Alois P. Heinz, Oct 21 2011
  • Mathematica
    b[n_, i_, d_] := b[n, i, d] = Which[n<0, 0, n==0, 1, i<1, 0, True, b[n, i - d, d] + b[n-i, i, d]]; T[n_] := Module[{l = Divisors[n] // Reverse}, Table[b[n, n, l[[i]]], {i, 1, Length[l]}]]; Table[T[n], {n, 1, 30}] // Flatten (* Jean-François Alcover, Dec 03 2015, after Alois P. Heinz *)

A168018 Triangle read by rows in which row n lists the number of partitions of n into parts divisible by d, where d is a divisor of n.

Original entry on oeis.org

1, 2, 1, 3, 1, 5, 2, 1, 7, 1, 11, 3, 2, 1, 15, 1, 22, 5, 2, 1, 30, 3, 1, 42, 7, 2, 1, 56, 1, 77, 11, 5, 3, 2, 1, 101, 1, 135, 15, 2, 1, 176, 7, 3, 1, 231, 22, 5, 2, 1, 297, 1, 385, 30, 11, 3, 2, 1, 490, 1, 627, 42, 7, 5, 2, 1, 792, 15, 3, 1, 1002, 56, 2, 1, 1255, 1, 1575, 77, 22, 11, 5, 3, 2
Offset: 1

Views

Author

Omar E. Pol, Nov 22 2009

Keywords

Comments

Positive values of triangle A168021.
Note that column 1 lists the numbers of partitions A000041(n).
Row n has A000005(n) terms.
Also, it appears that row n lists the partition numbers of the divisors of n, in decreasing order. [Omar E. Pol, Nov 23 2009]

Examples

			For example:
Consider row 8: (22, 5, 2, 1). The divisors of 8 are 1, 2, 4, 8 (see A027750). Also, there are 22 partitions of 8 into parts divisible by 1 (A000041(8)=22); 5 partitions of 8 into parts divisible by 2: {(8),(6+2),(4+4),(4+2+2),(2+2+2+2)}; 2 partitions of 8 into parts divisible by 4: {(8),(4+4)}; and 1 partition of 8 into parts divisible by 8. Then row 8 is formed by 22, 5, 2, 1.
Triangle begins:
1;
2, 1;
3, 1;
5, 2, 1;
7, 1;
11, 3, 2, 1;
15, 1;
22, 5, 2, 1;
30, 3, 1;
42, 7, 2, 1;
56, 1;
77, 11, 5, 3, 2, 1;
		

Crossrefs

Programs

  • Maple
    A168018 := proc(n) local dvs,p,i,d,a,pp,divs,par; dvs := sort(convert(numtheory[divisors](n),list)) ; p := combinat[partition](n) ; for i from 1 to nops(dvs) do d := op(i,dvs) ; a := 0 ; for pp in p do divs := true; for par in pp do if par mod d <> 0 then divs := false; end if; end do ; if divs then a := a+1 ; end if; end do ; printf("%d,",a) ; end do ; end proc: for n from 1 to 40 do A168018(n) ; end do : # R. J. Mathar, Feb 05 2010

Extensions

Terms beyond row 12 from R. J. Mathar, Feb 05 2010

A168120 Square array T(n,k) read by antidiagonals in which column k lists each number A000009 followed by k-1 zeros, for k>0.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 2, 1, 0, 1, 2, 0, 0, 0, 1, 3, 1, 1, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 5, 2, 0, 1, 0, 0, 0, 1, 6, 0, 1, 0, 0, 0, 0, 0, 1, 8, 2, 0, 0, 1, 0, 0, 0, 0, 1, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 3, 2, 1, 0, 1, 0, 0, 0, 0, 0, 1, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Omar E. Pol, Nov 26 2009

Keywords

Comments

The same structure of the square array in A168019, but using the numbers A000009.

Examples

			The array begins:
==================================================
... Column k: 1. 2. 3. 4. 5. 6. 7. 8. 9 10 11 12
. Row ...........................................
...n ............................................
==================================================
.. 0 ........ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
.. 1 ........ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
.. 2 ........ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
.. 3 ........ 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
.. 4 ........ 2, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
.. 5 ........ 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
.. 6 ........ 4, 2, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0,
.. 7 ........ 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
.. 8 ........ 6, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
.. 9 ........ 8, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0,
. 10 ....... 10, 3, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
. 11 ....... 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
. 12 ....... 15, 4, 2, 2, 0, 1, 0, 0, 0, 0, 0, 1,
...
		

Crossrefs

Extensions

Edited by Charles R Greathouse IV, Mar 23 2010
Showing 1-5 of 5 results.