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 91-98 of 98 results.

A375764 a(n) is the sum of distinct sums of all subsets with two or more elements of {1, 2, ..., n}.

Original entry on oeis.org

0, 0, 3, 18, 52, 117, 228, 403, 663, 1032, 1537, 2208, 3078, 4183, 5562, 7257, 9313, 11778, 14703, 18142, 22152, 26793, 32128, 38223, 45147, 52972, 61773, 71628, 82618, 94827, 108342, 123253, 139653, 157638, 177307, 198762, 222108, 247453, 274908, 304587
Offset: 0

Views

Author

Darío Clavijo, Aug 26 2024

Keywords

Comments

The cardinality of the set for n is A034856(n-1).

Examples

			For n = 3 the starting set is {1,2,3} and there are subsets {1,2}{1,3}{2,3}{1,2,3} that sum to 3,4,5 and 6 and the sum of distinct sums (3+4+5+6) is 18.
		

Crossrefs

Programs

  • Mathematica
    Join[{0, 0}, Nest[PolygonalNumber, Range[2, 50], 2] - 3] (* Paolo Xausa, Sep 13 2024 *)
  • Python
    a = lambda n: max(0,(n**4+2*n**3+3*n**2+2*n-24)//8)
    print([a(n) for n in range(1,40)])
    
  • Python
    def A375764(n): return (m:=n*(n+1)-4)*(m+10)>>3 if n>1 else 0 # Chai Wah Wu, Aug 30 2024

Formula

a(n) = A002817(n) - 3 for n > 1.
From Alois P. Heinz, Aug 27 2024: (Start)
G.f.: x^2*(2*x^4-7*x^3+8*x^2-3*x-3)/(x-1)^5.
a(n) = max(0,(n^4+2*n^3+3*n^2+2*n-24)/8). (End)
E.g.f.: exp(x)*(x^4/8 + x^3 + 2*x^2 + x - 3) + 2*x + 3. - Stefano Spezia, Aug 28 2024

Extensions

More terms from Alois P. Heinz, Aug 27 2024

A376205 Prime indices of triangular numbers k such that k + 1 and k - 2 are not prime.

Original entry on oeis.org

2, 31, 59, 67, 79, 83, 101, 103, 109, 113, 127, 137, 139, 151, 173, 181, 191, 199, 227, 229, 239, 241, 263, 283, 293, 311, 317, 331, 347, 349, 353, 367, 373, 379, 383, 397, 421, 433, 449, 461, 463, 479, 487, 491, 499, 523, 547, 557, 563, 569, 577, 587, 593, 599
Offset: 1

Views

Author

Stefano Spezia, Sep 15 2024

Keywords

Examples

			31 is a term since it is prime and both A000217(31) + 1 = 497 and A000217(31) - 2 = 494 are not prime.
		

References

  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See entry 496 at p. 155.

Crossrefs

Cf. A000040 (supersequence), A000124, A000217, A034856.
Complement of A376206 in A000040.

Programs

  • Mathematica
    Select[Range[600], PrimeQ[#]&&!PrimeQ[t=#(#+1)/2+1]&&!PrimeQ[t-3] &]

A376206 Prime indices of triangular numbers k such that either k + 1 or k - 2 is prime.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 41, 43, 47, 53, 61, 71, 73, 89, 97, 107, 131, 149, 157, 163, 167, 179, 193, 197, 211, 223, 233, 251, 257, 269, 271, 277, 281, 307, 313, 337, 359, 389, 401, 409, 419, 431, 439, 443, 457, 467, 503, 509, 521, 541, 571, 613, 641, 673, 691
Offset: 1

Views

Author

Stefano Spezia, Sep 15 2024

Keywords

Examples

			29 is a term since it is prime and A000217(29) - 2 = 433 is prime.
		

References

  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See entry 496 at p. 155.

Crossrefs

Cf. A000040 (supersequence), A000124, A000217, A034856.
Complement of A376205 in A000040.

Programs

  • Mathematica
    Select[Range[700], PrimeQ[#]&&(PrimeQ[t=#(#+1)/2+1]||PrimeQ[t-3]) &]

A131783 A000012 * (A004736 + A002260 - I).

Original entry on oeis.org

1, 4, 2, 8, 6, 3, 13, 11, 8, 4, 19, 17, 14, 10, 5, 26, 24, 21, 17, 12, 6, 34, 32, 29, 25, 20, 14, 7, 43, 41, 38, 34, 29, 23, 16, 8, 53, 51, 48, 44, 39, 33, 26, 18, 9, 64, 62, 59, 55, 50, 44, 37, 29, 20, 10
Offset: 1

Views

Author

Gary W. Adamson, Jul 14 2007

Keywords

Comments

Left column = A034856: (1, 4, 8, 13, 19, ...).
Row sums = A084990: (1, 6, 17, 36, 65, 106, ...).

Examples

			First few rows of the triangle:
   1;
   4,  2;
   8,  6,  3;
  13, 11,  8,  4;
  19, 17, 14, 10,  5;
  26, 24, 21, 17, 12,  6;
  34, 32, 29, 25, 20, 14,  7;
  ...
		

Crossrefs

Formula

A000012 * (A004736 + A002260 - I), I = Identity matrix; A004736 = (1; 2,1; 3,2,1; ...); A002260 = (1; 1,2; 1,2,3; ...).

A246982 Triangle read by rows: T(n,k) = maximal number of inversions among all k-sorted permutations on n letters (n>=2, 1<=k<=n-1).

Original entry on oeis.org

1, 1, 3, 2, 4, 6, 2, 4, 8, 10, 3, 6, 9, 13, 15, 3, 7, 9, 15, 19, 21, 4, 8, 12, 16, 22, 26, 28, 4, 9, 14, 16, 24, 30, 34, 36, 5, 10, 16, 20, 25, 33, 39, 43, 45, 5, 11, 17, 23, 25, 35, 43, 49, 53, 55, 6, 12, 18, 26, 30, 36, 46, 54, 60, 64, 66, 6, 13, 20
Offset: 2

Views

Author

N. J. A. Sloane, Sep 14 2014

Keywords

Examples

			Triangle begins:
1,
1,3,
2,4,6,
2,4,8,10,
3,6,9,13,15,
3,7,9,15,19,21,
4,8,12,16,22,26,28,
4,9,14,16,24,30,34,36,
5,10,16,20,25,33,39,43,45,
5,11,17,23,25,35,43,49,53,55,
...
		

Crossrefs

A034856 is a diagonal.

A341768 a(n) = n * (binomial(n,2) - 2).

Original entry on oeis.org

0, -2, -2, 3, 16, 40, 78, 133, 208, 306, 430, 583, 768, 988, 1246, 1545, 1888, 2278, 2718, 3211, 3760, 4368, 5038, 5773, 6576, 7450, 8398, 9423, 10528, 11716, 12990, 14353, 15808, 17358, 19006, 20755, 22608, 24568, 26638, 28821, 31120, 33538, 36078, 38743, 41536, 44460
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 19 2021

Keywords

Comments

The n-th second n-gonal number.

Examples

			a(7) = A147875(7) = A000566(-7) = 133.
		

Crossrefs

Programs

  • Mathematica
    Table[n (Binomial[n, 2] - 2), {n, 0, 45}]
    LinearRecurrence[{4, -6, 4, -1}, {0, -2, -2, 3}, 46]
    CoefficientList[Series[-x (2 - 6 x + x^2)/(1 - x)^4, {x, 0, 45}], x]

Formula

G.f.: -x*(2 - 6*x + x^2)/(1 - x)^4.
E.g.f.: -exp(x)*x*(4 - 2*x - x^2)/2.
a(n) = n^2*(n - 1)/2 - 2*n.

A347976 Triangle T(n,k) read by rows: the rows list volumes of rank 2 Schubert matroid polytopes.

Original entry on oeis.org

1, 2, 4, 3, 8, 11, 4, 13, 22, 26, 5, 19, 38, 52, 57, 6, 26, 60, 94, 114, 120, 7, 34, 89, 158, 213, 240, 247, 8, 43, 126, 251, 376, 459, 494, 502, 9, 53, 172, 381, 632, 841, 960, 1004, 1013, 10, 64, 228, 557, 1018, 1479, 1808, 1972, 2026, 2036, 11, 76, 295, 789, 1580, 2503, 3294, 3788, 4007, 4072, 4083
Offset: 3

Views

Author

Keywords

Comments

T(n,k) is the volume of the base polytope of the Lattice Path Matroid bounded by the paths L = (n-2)*[0]+[1,1] and U = [1]+(n-k-2)*[0]+[1]+(k)*[0].

Examples

			The triangle T(n,k) starts as follows:
[n\k] [1] [2]  [3]   [4]   [5]   [6]   [7]   [8]   [9]  [10]  [11]  [12]
[3]    1;
[4]    2,  4;
[5]    3,  8,  11;
[6]    4, 13,  22,   26;
[7]    5, 19,  38,   52,   57;
[8]    6, 26,  60,   94,  114,  120;
[9]    7, 34,  89,  158,  213,  240,  247;
[10]   8, 43, 126,  251,  376,  459,  494,  502;
[11]   9, 53, 172,  381,  632,  841,  960, 1004, 1013;
[12]  10, 64, 228,  557, 1018, 1479, 1808, 1972, 2026, 2036;
[13]  11, 76, 295,  789, 1580, 2503, 3294, 3788, 4007, 4072, 4083;
[14]  12, 89, 374, 1088, 2374, 4089, 5804, 7090, 7804, 8089, 8166, 8178;
...
		

Crossrefs

Columns: A000027 (k=1), A034856 (k=2).
Diagonals: A000295 (k=n-2), A005803 (k=n-3), A277411 (k=n-4).

Formula

T(n,k-1) + T(n,k) + k = T(n+1,k).
For a fixed k, the column T(n,k) is given by a polynomial in n.
For any 1 <= k <= n-3, T(n,k) + T(n,n-k-2) = T(n,n-2).

A384993 Triangle read by rows: T(n,k) is the number of compositions (p_0,p_1,...,p_m) of n such that max(i + p_i) = k for 0 <= i <= m.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 0, 0, 1, 3, 0, 0, 0, 4, 4, 0, 0, 0, 3, 8, 5, 0, 0, 0, 1, 12, 13, 6, 0, 0, 0, 0, 12, 26, 19, 7, 0, 0, 0, 0, 8, 40, 46, 26, 8, 0, 0, 0, 0, 4, 48, 88, 73, 34, 9, 0, 0, 0, 0, 1, 47, 140, 163, 108, 43, 10, 0, 0, 0, 0, 0, 38, 190, 307, 273, 152, 53, 11
Offset: 0

Views

Author

John Tyler Rascoe, Sep 01 2025

Keywords

Examples

			Triangle begins:
    k=0  1  2  3   4   5   6   7  8
 n=0 [1]
 n=1 [0, 1]
 n=2 [0, 0, 2]
 n=3 [0, 0, 1, 3]
 n=4 [0, 0, 0, 4,  4]
 n=5 [0, 0, 0, 3,  8,  5]
 n=6 [0, 0, 0, 1, 12, 13,  6]
 n=7 [0, 0, 0, 0, 12, 26, 19,  7]
 n=8 [0, 0, 0, 0,  8, 40, 46, 26, 8]
...
The composition of n = 8, (2,1,3,1,1) has values of i + p_i : 2,2,5,4,5 that have a maximum value of 5 so this composition is counted under T(8,5) = 40.
T(4,3) = 4 counts: (1,2,1), (2,1,1), (2,2), (3,1).
T(4,4) = 4 counts: (1,1,1,1), (1,1,2), (1,3), (4).
		

Crossrefs

Row sums A011782, empirical column sums A001339, empirical second diagonal A034856.

Programs

  • PARI
    r(i) = {sum(k=1,i, x^k)}
    P(n) = {1 + sum(i=1,n, prod(j=0,i-1, r(n-j)))}
    C(k) = {sum(i=1,k, x^k * P(k-i) * prod(j=0,i-2, 1 + r(k-j-2)))}
    T_rowlist(max_row) = {my(N = max_row+1, h = 1 + sum(k=1,N, y^k * C(k))); vector(N, n, Vecrev(polcoeff(h, n-1)))}
Previous Showing 91-98 of 98 results.