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.

Previous Showing 21-25 of 25 results.

A152722 Triangle read by rows: T(n,0) = prime(n+2), T(n,1) = 1 - T(n,0), T(n,k) = T(n-1,k-1), T(1,0) = 1 T(n,n) = -1.

Original entry on oeis.org

-1, 1, -1, 7, -6, -1, 11, -10, -6, -1, 13, -12, -10, -6, -1, 17, -16, -12, -10, -6, -1, 19, -18, -16, -12, -10, -6, -1, 23, -22, -18, -16, -12, -10, -6, -1, 29, -28, -22, -18, -16, -12, -10, -6, -1, 31, -30, -28, -22, -18, -16, -12, -10, -6, -1, 37, -36, -30, -28, -22, -18, -16, -12, -10, -6, -1
Offset: 0

Views

Author

Keywords

Examples

			Triangle begins as:
  -1;
   1,  -1;
   7,  -6,  -1;
  11, -10,  -6,  -1;
  13, -12, -10,  -6,  -1;
  17, -16, -12, -10,  -6,  -1;
  19, -18, -16, -12, -10,  -6,  -1;
  23, -22, -18, -16, -12, -10,  -6, -1;
  29, -28, -22, -18, -16, -12, -10, -6, -1;
		

Crossrefs

Programs

  • Mathematica
    T[n_, n_]:= -1; T[1, 0]:= 1; T[n_, 0]:= Prime[n+2]; T[n_, 1]:= 1 - Prime[n+2]; T[n_, k_]:= T[n-1, k-1]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* G. C. Greubel, Apr 07 2019 *)
  • PARI
    {T(n,k) = if(k==n, -1, if(n==1 && k==0, 1, if(k==0, prime(n+2), if(k==1, 1-prime(n+2), T(n-1,k-1) ))))}; \\ G. C. Greubel, Apr 07 2019
    
  • Sage
    @CachedFunction
    def T(n,k):
       if k==n: return -1
       elif n==1 and k==0: return 1
       elif k==0: return nth_prime(n+2)
       elif k==1: return 1 - nth_prime(n+2)
       else: return T(n-1,k-1)
    [[T(n,k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Apr 07 2019

Formula

T(n,n) = -1, T(1,0) = 1, T(n,0) = prime(n+2), T(n,1) = 1 - prime(n+2), T(n,k) = T(n-1,k-1). - G. C. Greubel, Apr 07 2019

Extensions

Edited by G. C. Greubel, Apr 07 2019

A194711 Triangle read by rows: T(n,k) = number of partitions or zones in the last section of the set of partitions of n that contains k as a part.

Original entry on oeis.org

1, 1, 1, 2, 0, 1, 3, 1, 0, 1, 5, 1, 1, 0, 1, 7, 2, 1, 1, 0, 1, 11, 2, 2, 1, 1, 0, 1, 15, 4, 2, 1, 1, 1, 0, 1
Offset: 1

Views

Author

Omar E. Pol, Feb 10 2012

Keywords

Comments

It appears that row n lists A000041(n)-1 together with the row n-2 of the triangle A116598, if n >= 2.

Examples

			Triangle begins:
1,
1, 1,
2, 0, 1,
3, 1, 0, 1,
5, 1, 1, 0, 1,
7, 2, 1, 1, 0, 1,
11, 2, 2, 1, 1, 0, 1,
15, 4, 2, 1, 1, 1, 0, 1,
		

Crossrefs

Column 1 is A000041. Columns >= 2 are A002865.

A228823 Triangle read by rows: T(n,k) = total number of parts in all partitions of n that contain k as a part, n>=1, 1<=k<=n.

Original entry on oeis.org

1, 2, 1, 5, 2, 1, 9, 5, 2, 1, 17, 9, 5, 2, 1, 27, 17, 9, 5, 2, 1, 46, 27, 17, 9, 5, 2, 1, 69, 46, 27, 17, 9, 5, 2, 1, 108, 69, 46, 27, 17, 9, 5, 2, 1, 158, 108, 69, 46, 27, 17, 9, 5, 2, 1, 234, 158, 108, 69, 46, 27, 17, 9, 5, 2, 1, 331, 234, 158, 108, 69
Offset: 1

Views

Author

Omar E. Pol, Sep 25 2013

Keywords

Comments

Row n lists the first n elements of A093694 in decreasing order.

Examples

			Triangle begins:
1;
2,     1;
5,     2,   1;
9,     5,   2,   1;
17,    9,   5,   2,  1;
27,   17,   9,   5,  2,  1;
46,   27,  17,   9,  5,  2,  1;
69,   46,  27,  17,  9,  5,  2,  1;
108,  69,  46,  27, 17,  9,  5,  2,  1;
158, 108,  69,  46, 27, 17,  9,  5,  2,  1;
234, 158, 108,  69, 46, 27, 17,  9,  5,  2,  1;
331, 234, 158, 108, 69, 46, 27, 17,  9,  5,  2,  1;
		

Crossrefs

Formula

T(n,k) = A000041(n-k) + A006128(n-k) = A093694(n-k).

A300185 Irregular triangle read by rows: T(n, {j,k}) is the number of partitions of n that have exactly j parts equal to k; 1 <= j <= n, 1 <= k <= n.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 1, 1, 0, 1, 2, 1, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 2, 1, 1, 0, 1, 3, 1, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 4, 2, 2, 1, 1, 0, 1, 4, 2, 1, 0, 0, 0, 0, 4, 1, 0, 0, 0, 0, 0, 3, 0
Offset: 1

Views

Author

J. Stauduhar, Feb 27 2018

Keywords

Comments

Row sums = A027293.
If superfluous zeros are removed from the right side of each row, the row lengths = 1,2,1,3,1,1,4,2,... = A010766.
Sum of each N X N block of rows = 1,2,4,7,12,19,... = A000070.
The sum of the partitions of n that are over-counted in each block of N x N rows = A000070(n) - A000041(n) = A058884(n), n >= 1.
Concatenation of first row from each N X N block = A116598.
As noted by Joerg Arndt in A116598, the first row from each N X N block in reverse converges to A002865. Two sequences emerge from alternating second rows in reverse: for 2n, converges to even-indexed terms in A027336, and for 2n+1, converges to odd-indexed terms in A027336.
Counting the rows in each N X N block where columns j=2 > 0 and j=3 through j=n are all zeros produces A008615(n), n > 0.

Examples

			      \ j  1 2 3 4 5
     k
n
1:   1     1
2:   1     0 1
     2     1 0
3:   1     1 0 1
     2     1 0 0
     3     1 0 0
4:   1     1 1 0 1
     2     1 1 0 0
     3     1 0 0 0
     4     1 0 0 0
5:   1     2 1 1 0 1
     2     2 1 0 0 0
     3     2 0 0 0 0
     4     1 0 0 0 0
     5     1 0 0 0 0
.
.
.
		

Crossrefs

Programs

  • Mathematica
    Array[With[{s = IntegerPartitions[#]}, Table[Count[Map[Count[#, k] &, s], j], {k, #}, {j, #}]] &, 7] // Flatten (* Michael De Vlieger, Feb 28 2018 *)
  • Python
    # See Stauduhar link.

A152721 A prime based vector recursion: a(n)={Prime[n+1],Prime[n],Prime[n-1],-Prime[n-2],...,-1,-1}.

Original entry on oeis.org

-1, 1, -1, 5, -1, -1, 7, -5, -1, -1, 11, -7, -5, -1, -1, 13, -11, -7, -5, -1, -1, 17, -13, -11, -7, -5, -1, -1, 19, -17, -13, -11, -7, -5, -1, -1, 23, -19, -17, -13, -11, -7, -5, -1, -1, 29, -23, -19, -17, -13, -11, -7, -5, -1, -1, 31, -29, -23, -19, -17, -13, -11, -7, -5
Offset: 0

Views

Author

Roger L. Bagula, Dec 11 2008

Keywords

Comments

Row sums are:
{-1, 0, 3, 0, -3, -12, -21, -36, -51, -68, -95,...}

Examples

			{-1},
{1, -1},
{5, -1, -1},
{7, -5, -1, -1},
{11, -7, -5, -1, -1},
{13, -11, -7, -5, -1, -1},
{17, -13, -11, -7, -5, -1, -1},
{19, -17, -13, -11, -7, -5, -1, -1},
{23, -19, -17, -13, -11, -7, -5, -1, -1},
{29, -23, -19, -17, -13, -11, -7, -5, -1, -1},
{31, -29, -23, -19, -17, -13, -11, -7, -5, -1, -1}
		

Crossrefs

Programs

  • Mathematica
    b[0] = {-1}; b[1] = {1, -1};
    b[n_] := b[n] = Join[{Prime[n + 1 ]}, {-b[n - 1][[1]]}, Table[b[n - 1][[i]], {i, 2, Length[b[n - 1]]}]];
    Table[b[n], {n, 0, 10}]; Flatten[%]

Formula

a(n)={Prime[n+1],Prime[n],Prime[n-1],-Prime[n-2],...,-1,-1}.
Previous Showing 21-25 of 25 results.