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

A360693 Number T(n,k) of sets of n words of length n over binary alphabet where the first letter occurs k times; triangle T(n,k), n>=0, n-signum(n)<=k<=n*(n-1)+signum(n), read by rows.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 10, 15, 15, 10, 3, 4, 37, 108, 228, 336, 394, 336, 228, 108, 37, 4, 5, 101, 600, 2150, 5645, 11680, 19752, 27820, 32935, 32935, 27820, 19752, 11680, 5645, 2150, 600, 101, 5, 6, 226, 2490, 14745, 61770, 200529, 535674, 1211485, 2368200
Offset: 0

Views

Author

Alois P. Heinz, Feb 16 2023

Keywords

Comments

T(n,k) is defined for all n >= 0 and k >= 0. The triangle contains only the positive elements.

Examples

			T(2,3) = 2: {aa,ab}, {aa,ba}.
T(3,3) = 10: {aab,abb,bbb}, {aab,bab,bbb}, {aab,bba,bbb}, {aba,abb,bbb}, {aba,bab,bbb}, {aba,bba,bbb}, {abb,baa,bbb}, {abb,bab,bba}, {baa,bab,bbb}, {baa,bba,bbb}.
T(4,3) = 4: {abbb,babb,bbab,bbbb}, {abbb,babb,bbba,bbbb}, {abbb,bbab,bbba,bbbb}, {babb,bbab,bbba,bbbb}.
Triangle T(n,k) begins:
  1;
  1, 1;
  .  2, 2,  2;
  .  .  3, 10, 15,  15,  10,    3;
  .  .  .   4, 37, 108, 228,  336,  394,   336,   228,   108,    37,     4;
  .  .  .   .   5, 101, 600, 2150, 5645, 11680, 19752, 27820, 32935, 32935, ...;
  ...
		

Crossrefs

Row sums give A014070.
Column sums give A360695.
Main diagonal T(n,n) gives A154323(n-1) for n>=1.
T(n,n-1) gives A000027(n) for n>=1.
T(2n,2n^2) gives A360702.
Cf. A000290, A057427, A220886 (similar triangle for multisets).

Programs

  • Maple
    g:= proc(n, i, j) option remember; expand(`if`(j=0, 1, `if`(i<0, 0, add(
          g(n, i-1, j-k)*x^(i*k)*binomial(binomial(n, i), k), k=0..j))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=n-signum(n)..n*(n-1)+signum(n)))(g(n$3)):
    seq(T(n), n=0..6);
  • Mathematica
    g[n_, i_, j_] := g[n, i, j] = Expand[If[j == 0, 1, If[i < 0, 0, Sum[g[n, i - 1, j - k]*x^(i*k)*Binomial[Binomial[n, i], k], {k, 0, j}]]]];
    T[n_] := Table[Coefficient[#, x, i], {i, n - Sign[n], n(n - 1) + Sign[n]}]&[g[n, n, n]];
    Table[T[n], {n, 0, 6}] // Flatten (* Jean-François Alcover, May 26 2023, after Alois P. Heinz *)

Formula

T(n,k) = T(n,n^2-k).

A113582 Triangle T(n,m) read by rows: T(n,m) = (n - m)*(n - m + 1)*m*(m + 1)/4 + 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 4, 1, 1, 7, 10, 7, 1, 1, 11, 19, 19, 11, 1, 1, 16, 31, 37, 31, 16, 1, 1, 22, 46, 61, 61, 46, 22, 1, 1, 29, 64, 91, 101, 91, 64, 29, 1, 1, 37, 85, 127, 151, 151, 127, 85, 37, 1, 1, 46, 109, 169, 211, 226, 211, 169, 109, 46, 1
Offset: 1

Views

Author

Roger L. Bagula, Aug 25 2008

Keywords

Comments

From Paul Barry, Jan 07 2009: (Start)
This triangle follows a general construction method as follows: Let a(n) be an integer sequence with a(0)=1, a(1)=1. Then T(n,k,r) := [k<=n](1+r*a(k)*a(n-k)) defines a symmetrical triangle.
Row sums are n + 1 + r*Sum_{k=0..n} a(k)*a(n-k) and central coefficients are 1+r*a(n)^2.
Here a(n) = C(n+1,2) and r=1.
Row sums are A154322 and central coefficients are A154323. (End)

Examples

			{1},
{1, 1},
{1, 2, 1},
{1, 4, 4, 1},
{1, 7, 10, 7, 1},
{1, 11, 19, 19, 11, 1},
{1, 16, 31, 37, 31, 16, 1},
{1, 22, 46, 61, 61, 46, 22, 1},
{1, 29, 64, 91, 101, 91, 64, 29, 1},
{1, 37, 85, 127, 151, 151, 127, 85, 37, 1},
{1, 46, 109, 169, 211, 226, 211, 169, 109, 46, 1}
		

Programs

  • Magma
    /* As triangle: */ [[(n-m)*(n-m+1)*m*(m+1)/4+1: m in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Sep 12 2016
    
  • Mathematica
    t[n_, m_] = (n - m)*(n - m + 1)*m*(m + 1)/4 + 1; Table[Table[t[n, m], {m, 0, n}], {n, 0, 10}]//Flatten
  • PARI
    for(n=0,15, for(k=0,n, print1((n-k)*(n-k+1)*k*(k+1)/4 + 1, ", "))) \\ G. C. Greubel, Aug 31 2018

Formula

T(n,m) = (n - m)*(n - m + 1)*m*(m + 1)/4 + 1.

A360660 Number of inequivalent n X n {0,1} matrices modulo permutation of the rows, with exactly n 1's.

Original entry on oeis.org

1, 1, 4, 20, 133, 1027, 9259, 94033, 1062814, 13176444, 177427145, 2573224238, 39924120823, 658921572675, 11513293227271, 212109149134617, 4105637511110979, 83238756058333277, 1762856698153603049, 38905470655863251479, 892840913430059075405
Offset: 0

Views

Author

Alois P. Heinz, Feb 15 2023

Keywords

Comments

Also the number of multisets of n words of length n over binary alphabet where the first letter occurs n times. E.g., a(2) = 4: {aa,bb}, {ab,ab}, {ab,ba}, {ba,ba}.

Examples

			a(3) = 20: [111/000/000], [110/100/000], [110/010/000], [110/001/000], [101/100/000], [101/010/000], [101/001/000], [100/100/100], [100/100/010], [100/100/001], [100/011/000], [100/010/010], [100/010/001], [100/001/001], [011/010/000], [011/001/000], [010/010/010], [010/010/001], [010/001/001], [001/001/001].
		

Crossrefs

Programs

  • Maple
    g:= proc(n, i, j) option remember; expand(`if`(j=0, 1, `if`(i<0, 0, add(
          g(n, i-1, j-k)*x^(i*k)*binomial(binomial(n, i)+k-1, k), k=0..j))))
        end:
    a:= n-> coeff(g(n$3), x, n):
    seq(a(n), n=0..20);
  • Mathematica
    g[n_, i_, j_] := g[n, i, j] = Expand[If[j == 0, 1, If[i < 0, 0, Sum[g[n, i - 1, j - k]*x^(i*k)*Binomial[Binomial[n, i] + k - 1, k], {k, 0, j}]]]];
    a[n_] := SeriesCoefficient[g[n, n, n], {x, 0, n}];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, May 28 2023, after Alois P. Heinz *)
    Table[SeriesCoefficient[Product[1/(1 - x^k)^Binomial[n, k], {k, 1, n}], {x, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Apr 15 2025 *)

Formula

a(n) = A220886(n,n).
a(n) = [x^n] Product_{k=1..n} 1/(1 - x^k)^binomial(n,k). - Vaclav Kotesovec, Apr 15 2025

A262182 Prime numbers of the form (n*(n+1)/2)^2 + 1.

Original entry on oeis.org

2, 37, 101, 1297, 4357, 14401, 44101, 90001, 164837, 246017, 608401, 894917, 1382977, 4326401, 8122501, 8561477, 9985601, 10497601, 38638657, 46049797, 52707601, 84272401, 121572677, 146168101, 165894401, 201526417, 259532101, 289680401, 404010001, 428738437
Offset: 1

Views

Author

Jean C. Lambry, Oct 02 2015

Keywords

Comments

Sum_{n>=1} 1/a(n) = 0.538046187...

Crossrefs

Programs

  • Mathematica
    Select[Accumulate[Range[250]]^2+1,PrimeQ] (* Harvey P. Dale, Nov 14 2024 *)
  • PARI
    for(n=1, 1e3, if(isprime(k = (n*(n+1)/2)^2+1), print1(k", "))) \\ Altug Alkan, Oct 02 2015
  • Python
    def prime(n):
        if n == 1: return True
        d = n + 1
        c = n - 1
        while c > 0 and d % c:
            d += n
            c -= 1
        return bool(c == 1)
    n = 1
    i = 1
    while i <= 500:
        target = (i * (i + 1)) // 2
        if prime(target):
            print(n, target*target+1)
            n += 1
        i += 1
    # Jean C. Lambry, Oct 06 2015
    

Formula

a(n) = A154323(A217755(n)). - Michel Marcus, Oct 02 2015
a(n) = ((A217755(n)^2 + A217755(n))/2)^2 + 1. - Jean C. Lambry, Oct 07 2015

Extensions

More terms from Altug Alkan, Oct 02 2015

A263689 a(n) = (2*n^6 - 6*n^5 + 5*n^4 - n^2 + 12)/12.

Original entry on oeis.org

1, 1, 2, 34, 277, 1301, 4426, 12202, 29009, 61777, 120826, 220826, 381877, 630709, 1002002, 1539826, 2299201, 3347777, 4767634, 6657202, 9133301, 12333301, 16417402, 21571034, 28007377, 35970001, 45735626, 57617002, 71965909, 89176277, 109687426, 133987426, 162616577, 196171009, 235306402, 280741826
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 20 2015

Keywords

Examples

			a(0) = 1,
a(1) = 0^5 + 1 = 1,
a(2) = 1^5 + 1 = 2,
a(3) = 2^5 + 2 = 34,
a(4) = 3^5 + 34 = 227,
a(5) = 4^5 + 227 = 1301, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[(1/12) (12 + (-1 + n)^2 n^2 (-1 + 2 (-1 + n) n)), {n, 0, 35}]
  • PARI
    first(m)=vector(m,n,n--;(2*n^6 - 6*n^5 + 5*n^4 - n^2 + 12)/12) \\ Anders Hellström, Nov 20 2015

Formula

G.f.: (1 - 6*x + 16*x^2 + 6*x^3 + 81*x^4 + 20*x^5 + 2*x^6)/(1 - x)^7.
a(n + 1) = a(n) + n^5, a(0) = 1.
a(n + 1) - a(n) = A000584(n).
a(n + 1) = A000539(n) + 1.
Sum_{n>0} 1/(a(n + 1) - a(n)) = zeta(5) = 1.036927755...

A267691 a(n) = (n + 1)*(6*n^4 - 21*n^3 + 31*n^2 - 31*n + 30)/30.

Original entry on oeis.org

1, 1, 2, 18, 99, 355, 980, 2276, 4677, 8773, 15334, 25334, 39975, 60711, 89272, 127688, 178313, 243849, 327370, 432346, 562667, 722667, 917148, 1151404, 1431245, 1763021, 2153646, 2610622, 3142063, 3756719, 4464000, 5274000, 6197521, 7246097, 8432018, 9768354
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 19 2016

Keywords

Examples

			a(0) = 1,
a(1) = 1 + 0^4 = 1,
a(2) = 1 + 1^4 = 2,
a(3) = 2 + 2^4 = 18,
a(4) = 18+ 3^4 = 99, etc.
		

Crossrefs

Essentially the same as A000538.
Cf. A013662 (zeta(4)).

Programs

  • Magma
    [(n+1)*(6*n^4-21*n^3+31*n^2-31*n+30)/30: n in [0..35]]; // Vincenzo Librandi, Jan 20 2016
  • Mathematica
    Table[(n + 1) (6 n^4 - 21 n^3 + 31 n^2 - 31 n + 30)/30, {n, 0, 30}]
    LinearRecurrence[{6, -15, 20, -15, 6, -1}, {1, 1, 2, 18, 99, 355}, 40] (* Vincenzo Librandi, Jan 20 2016 *)
  • PARI
    a(n)=(n+1)*(6*n^4-21*n^3+31*n^2-31*n+30)/30 \\ Charles R Greathouse IV, Jan 19 2016
    
  • PARI
    Vec((1-5*x+11*x^2+x^3+16*x^4)/(x-1)^6 + O(x^100)) \\ Altug Alkan, Jan 19 2016
    

Formula

G.f.: (1 - 5*x + 11*x^2 + x^3 + 16*x^4)/(1 - x)^6.
a(n + 1) = a(n) + n^4.
a(n + 1) = A000538(n) + 1.
a(n + 2) - a(n) = A008514(n).
Sum_{n>=0} 1/a(n) = 2.570450909491318975...
Sum_{n>=1} 1/(a(n + 1) - a(n)) = zeta(4) = Pi^4/90.
Showing 1-6 of 6 results.