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 11-20 of 26 results. Next

A191822 Number of solutions to the Diophantine equation x1*x2 + x2*x3 + x3*x4 + x4*x5 = n, with all xi >= 1.

Original entry on oeis.org

0, 0, 0, 1, 2, 6, 8, 16, 20, 32, 36, 58, 58, 86, 92, 125, 122, 178, 164, 228, 224, 286, 268, 382, 330, 436, 424, 534, 474, 660, 556, 740, 692, 840, 752, 1043, 846, 1094, 1032, 1276, 1078, 1476, 1204, 1582, 1458, 1710, 1480, 2070, 1628, 2096, 1924, 2332, 1946, 2652, 2148, 2770, 2480, 2908, 2480, 3512
Offset: 1

Views

Author

N. J. A. Sloane, Jun 17 2011

Keywords

Comments

Related to "Liouville's Last Theorem".

Examples

			G.f.: x^4 + 2 x^5 + 6 x^6 + 8 x^7 + 16 x^8 + 20 x^9 + 32 x^10 + ...
		

Crossrefs

Programs

  • Maple
    with(numtheory);
    D00:=n->add(tau(j)*tau(n-j),j=1..n-1);
    L4:=n->sigma[2](n)-n*sigma[0](n)-D00(n);
    [seq(L4(n),n=1..60)];
  • Mathematica
    a[ n_] := Length @ FindInstance[{x1 > 0, x2 > 0, x3 > 0, x4 > 0, x5 > 0, n == x1 x2 + x2 x3 + x3 x4 + x4 x5}, {x1, x2, x3, x4, x5}, Integers, 10^9]; (* Michael Somos, Nov 12 2016 *)

Formula

a(n) = sigma_2(n) - n*sigma_0(n) - A055507(n-1).

A212151 Number of 2 X 2 matrices M of positive integers such that permanent(M) < n.

Original entry on oeis.org

0, 0, 0, 1, 5, 13, 27, 47, 75, 112, 156, 214, 278, 358, 444, 552, 660, 796, 930, 1099, 1259, 1457, 1649, 1885, 2101, 2377, 2623, 2933, 3221, 3569, 3879, 4279, 4623, 5056, 5452, 5926, 6334, 6878, 7328, 7892, 8404, 9018, 9540, 10228, 10788, 11504, 12142, 12898
Offset: 0

Views

Author

Clark Kimberling, May 07 2012

Keywords

Comments

For a guide to related sequences, see A211795.

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(0)..a(N)
    g:= z*(1-z)^(-1)*add(z^i/(1-z^i),i=1..N-2)^2:
    S:=series(g,z,N+1):
    seq(coeff(S,z,n),n=0..N); # Robert Israel, Nov 16 2017
  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[w*x + y*z < n, s = s + 1],
    {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
    Map[t[#] &, Range[0, 40]]  (* A212151 *)
    (* Peter J. C. Moses, Apr 13 2012 *)
  • Python
    from sympy import divisor_count
    def A212151(n): return  sum((sum(divisor_count(i+1)*divisor_count(j-i) for i in range(j>>1))<<1)+(divisor_count(j+1>>1)**2 if j&1 else 0) for j in range(1,n-1)) # Chai Wah Wu, Jul 26 2024

Formula

a(n) + A212240(n) = n^4.
a(n) = Sum_{k=1..n-1} Sum_{i=1..n-1} d(k) * floor((n-k-1)/i), where d(k) is the number of divisors of k (A000005). - Wesley Ivan Hurt, Nov 16 2017
G.f.: (x/(1-x))*(Sum_{i>=1} x^i/(1-x^i))^2. - Robert Israel, Nov 16 2017
from Ridouane Oudra, Oct 10 2023: (Start)
a(n) = Sum_{i=1..n-1} Sum_{j=1..n-1} tau(i*j)*floor((n-1)/(i+j)) ;
a(n) = Sum_{i=1..n-1} Sum_{j=1..i-1} tau(j)*tau(i-j) ;
a(n+2) = Sum_{i=1..n} A055507(i). (End)

A191832 Number of solutions to the Diophantine equation x1*x2 + x2*x3 + x3*x4 + x4*x5 + x5*x6 = n, with all xi >= 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 7, 10, 22, 29, 51, 61, 99, 115, 163, 192, 262, 287, 385, 428, 528, 600, 730, 780, 963, 1054, 1202, 1337, 1545, 1646, 1908, 2059, 2269, 2516, 2770, 2933, 3298, 3568, 3792, 4142, 4493, 4786, 5183, 5562, 5831, 6423, 6745, 7140, 7639, 8231, 8479, 9216, 9603, 10260, 10663, 11488, 11752, 12838, 13100, 13887
Offset: 1

Views

Author

N. J. A. Sloane, Jun 17 2011

Keywords

Comments

Related to "Liouville's Last Theorem".

Crossrefs

Programs

  • Maple
    with(numtheory);
    D00:=n->add(tau(j)*tau(n-j),j=1..n-1);
    D01:=n->add(tau(j)*sigma(n-j),j=1..n-1);
    D000:=proc(n) local t1,i,j;
    t1:=0;
    for i from 1 to n-1 do
    for j from 1 to n-1 do
    if (i+j < n) then t1 := t1+numtheory:-tau(i)*numtheory:-tau(j)*numtheory:-tau(n-i-j); fi;
    od; od;
    t1;
    end;
    L5:=n->D000(n)/6+D00(n)+D01(n)/2+(2*n-1/6)*tau(n)-11*sigma[2](n)/6;
    [seq(L5(n),n=1..60)];
    # Alternate:
    g:= proc(n,k,j) option remember;
         if n < k-1 then 0
         elif k = 2 then
            if n mod j = 0 then 1 else 0 fi
         else
            add(procname(n-j*x,k-1,x), x=1 .. floor((n-k+2)/j))
         fi
    end proc:
    f:= n -> add(g(n,6,j),j=1..n-4);
    seq(f(n),n=1..100); # Robert Israel, Dec 02 2015
  • Mathematica
    g[n_, k_, j_] := g[n, k, j] = If[n < k - 1, 0, If[k == 2, If[ Mod[n, j] == 0, 1, 0], Sum[g[n - j x, k - 1, x], {x, 1, Floor[(n - k + 2)/j]}]]];
    f[n_] := Sum[g[n, 6, j], {j, 1, n - 4}];
    Array[f, 100] (* Jean-François Alcover, Sep 25 2020, after Robert Israel *)

A320019 Coefficients of polynomials related to the number of divisors, triangle read by rows, T(n,k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 2, 4, 1, 0, 3, 8, 6, 1, 0, 2, 14, 18, 8, 1, 0, 4, 20, 41, 32, 10, 1, 0, 2, 28, 78, 92, 50, 12, 1, 0, 4, 37, 132, 216, 175, 72, 14, 1, 0, 3, 44, 209, 440, 490, 298, 98, 16, 1, 0, 4, 58, 306, 814, 1172, 972, 469, 128, 18, 1
Offset: 0

Views

Author

Peter Luschny, Oct 03 2018

Keywords

Comments

Column k is the k-fold self-convolution of tau (A000005). - Alois P. Heinz, Feb 01 2021

Examples

			Triangle starts:
[0] 1
[1] 0, 1
[2] 0, 2,  1
[3] 0, 2,  4,   1
[4] 0, 3,  8,   6,   1
[5] 0, 2, 14,  18,   8,   1
[6] 0, 4, 20,  41,  32,  10,   1
[7] 0, 2, 28,  78,  92,  50,  12,  1
[8] 0, 4, 37, 132, 216, 175,  72, 14,  1
[9] 0, 3, 44, 209, 440, 490, 298, 98, 16, 1
		

Crossrefs

Columns k=0-4 give: A000007, A000005, A055507, A191829, A375002.
Row sums are A129921.
T(2n,n) gives A340992.
Cf. A319083.

Programs

  • Maple
    P := proc(n, x) option remember; if n = 0 then 1 else
    x*add(numtheory:-tau(n-k)*P(k,x), k=0..n-1) fi end:
    Trow := n -> seq(coeff(P(n, x), x, k), k=0..n):
    seq(lprint([n], Trow(n)), n=0..9);
    # second Maple program:
    T:= proc(n, k) option remember; `if`(k=0, `if`(n=0, 1, 0),
          `if`(k=1, `if`(n=0, 0, numtheory[tau](n)), (q->
           add(T(j, q)*T(n-j, k-q), j=0..n))(iquo(k, 2))))
        end:
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Feb 01 2021
    # Uses function PMatrix from A357368.
    PMatrix(10, NumberTheory:-tau); # Peter Luschny, Oct 19 2022
  • Mathematica
    T[n_, k_] := T[n, k] = If[k == 0, If[n == 0, 1, 0],
         If[k == 1, If[n == 0, 0, DivisorSigma[0, n]],
         With[{q = Quotient[k, 2]}, Sum[T[j, q]*T[n-j, k-q], {j, 0, n}]]]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Feb 11 2021, after Alois P. Heinz *)

Formula

The polynomials are defined by recurrence: p(0,x) = 1 and for n > 0 by
p(n, x) = x*Sum_{k=0..n-1} tau(n-k)*p(k, x).
Sigma[k](n) computes the sum of the k-th power of positive divisors of n. The recurrence applied with k = 0 gives this triangle, with k = 1 gives A319083.
T(n,k) = [x^n] (Sum_{j>=1} tau(j)*x^j)^k. - Alois P. Heinz, Feb 14 2021

A307305 Self-composition of the number of divisors function (A000005).

Original entry on oeis.org

1, 4, 12, 34, 92, 246, 640, 1660, 4264, 10914, 27732, 70247, 177466, 447570, 1126344, 2828465, 7089391, 17746456, 44384884, 110927184, 276993616, 691007612, 1722214602, 4289021667, 10675557184, 26561494820, 66063726382, 164248795485, 408168287028, 1013819012498
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 01 2019

Keywords

Crossrefs

Programs

  • Mathematica
    g[x_] := g[x] = Sum[x^k/(1 - x^k), {k, 1, 30}]; a[n_] := a[n] = SeriesCoefficient[g[g[x]], {x, 0, n}]; Table[a[n], {n, 30}]

Formula

G.f.: g(g(x)), where g(x) = Sum_{k>=1} x^k/(1 - x^k) is the g.f. of A000005.

A328681 a(n) = Sum_{k=1..n} binomial(n,k) * tau(k) * tau(n - k + 1), where tau = A000005.

Original entry on oeis.org

1, 6, 20, 55, 142, 322, 779, 1608, 3894, 7370, 18372, 33137, 81512, 149694, 353224, 641461, 1570836, 2684928, 6642915, 11795178, 28133846, 46768200, 125433400, 197654545, 485749918, 893864394, 2066417482, 3385115393, 8975476976, 14384181908, 35478028091, 61940000322
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 03 2019

Keywords

Crossrefs

Programs

  • Magma
    [&+[Binomial(n,k)*DivisorSigma(0,k)*DivisorSigma(0,n-k+1):k in [1..n]]:n in [1..32]]; // Marius A. Burtea, Dec 03 2019
    
  • Mathematica
    Table[Sum[Binomial[n, k] DivisorSigma[0, k] DivisorSigma[0, n - k + 1], {k, 1, n}], {n, 1, 32}]
    nmax = 32; CoefficientList[Series[(1/2) D[Sum[DivisorSigma[0, k] x^k/k!, {k, 1, nmax}]^2, x], {x, 0, nmax}], x] Range[0, nmax]! // Rest
  • PARI
    a(n) = sum(k=1, n, binomial(n,k)*numdiv(k)*numdiv(n-k+1)); \\ Michel Marcus, Dec 05 2019

Formula

E.g.f.: (1/2) * d/dx (Sum_{k>=1} tau(k) * x^k / k!)^2.

A330572 a(n) = Sum_{k = 1..n} [u_2(k)*u_2(n+1-k)], where u_2(k) is the number of unordered factorizations k = i*j (A038548).

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 10, 12, 14, 19, 20, 24, 28, 31, 32, 40, 40, 48, 48, 56, 56, 67, 60, 77, 72, 85, 80, 98, 88, 108, 98, 117, 110, 131, 110, 147, 128, 149, 140, 169, 144, 182, 154, 192, 174, 205, 168, 228, 188, 226, 208, 250, 204, 268, 218, 273, 246, 285, 234, 324
Offset: 0

Views

Author

N. J. A. Sloane, Jan 08 2020

Keywords

Comments

An analog of A055507 for unordered factorizations.
For background references see A330570.

Crossrefs

See A330573 for another version.

Programs

  • Maple
    u2:= proc(n) option remember; if issqr(n) then (numtheory:-tau(n)+1)/2 else numtheory:-tau(n)/2 fi end proc:
    f:= proc(n) local k; add(u2(k)*u2(n+1-k),k=1..n) end proc:
    map(f, [$0..100]); # Robert Israel, Dec 05 2022
  • Mathematica
    s[n_] := s[n] = Ceiling[DivisorSigma[0, n] / 2]; a[n_] := Sum[s[k] * s[n+1-k], {k, 1, n}]; Array[a, 100, 0] (* Amiram Eldar, Apr 19 2024 *)

Extensions

Offset corrected by Robert Israel, Dec 05 2022

A330573 a(n) = Sum_{k = 1..ceiling(n/2)} [u_2(k)*u_2(n+1-k)], where u_2(k) is number of unordered factorization k = i*j (A038548).

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 5, 8, 7, 10, 10, 14, 14, 16, 16, 22, 20, 26, 24, 30, 28, 34, 30, 43, 36, 43, 40, 51, 44, 56, 49, 63, 55, 66, 55, 78, 64, 75, 70, 89, 72, 93, 77, 98, 87, 103, 84, 122, 94, 115, 104, 127, 102, 136, 109, 141, 123, 143, 117, 170, 128, 153, 138, 174, 138, 183, 143, 183, 161, 189, 152, 224, 163, 200, 180
Offset: 0

Views

Author

N. J. A. Sloane, Jan 08 2020

Keywords

Comments

An analog of A055507 for unordered factorizations.
For background references see A330570.

Crossrefs

See A330572 for another version.

Programs

  • Mathematica
    s[n_] := s[n] = Ceiling[DivisorSigma[0, n]/2]; a[n_] := Sum[s[k]*s[n + 1 - k], {k, 1, Ceiling[n/2]}]; Array[a, 100, 0] (* Amiram Eldar, Apr 19 2024*)

Extensions

Offset and name corrected by Amiram Eldar, Apr 19 2024

A338664 a(n) is the number of ways that n square tiles can be formed into two rectangles, such that those rectangles fit orthogonally into the minimal bounding square that can contain n such tiles, without overlap.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 2, 1, 1, 4, 2, 4, 2, 2, 1, 2, 4, 4, 4, 4, 3, 2, 2, 1, 2, 6, 5, 6, 2, 7, 2, 3, 2, 2, 1, 3, 6, 6, 6, 5, 4, 6, 4, 2, 3, 2, 2, 1, 3, 8, 4, 10, 4, 6, 3, 9, 2, 4, 2, 3, 2, 2, 1, 4, 5, 10, 6, 6, 8, 4, 4, 9, 4, 2
Offset: 1

Views

Author

Thomas Oléron Evans, Apr 22 2021

Keywords

Comments

Note that rectangles of size 0 are not accepted (i.e., the tiles may not be formed into a single rectangle).
Finding a(n) is equivalent to counting the positive integer solutions (x,y,z,w) of n = xy + zw such that:
i) x,y,z,w <= ceiling(sqrt(n))
ii) min(x,y) + min(w,z) <= ceiling(sqrt(n))
iii) x >= y,z,w
iv) z >= w
v) if x = z then y >= w
Note that ceiling(sqrt(n)) is the side length of the minimal bounding square into which n unit square tiles can be orthogonally placed, without overlap.
Therefore, i) states that neither rectangle should be longer than the bounding square, while ii) states that the two rectangles must fit side by side within this square.
iii)-v) ensure that rectangles are not double counted through permuting the values of the variables.

Examples

			a(18) = 4.
18 unit square tiles fit orthogonally into a square of side length 5 (the minimum) without overlap. There are four possible pairs of rectangles that can be formed with the 18 tiles that can then be fit orthogonally into such a square without overlap:
1) 4 X 3  and  3 X 2
2) 4 X 4  and  2 X 1
3) 5 X 2  and  4 X 2
4) 5 X 3  and  3 X 1
Case 1      Case 2      Case 3      Case 4
1 1 1 - -   1 1 1 1 -   1 1 1 1 1   1 1 1 - -
1 1 1 - -   1 1 1 1 -   1 1 1 1 1   1 1 1 - 2
1 1 1 2 2   1 1 1 1 2   - 2 2 2 2   1 1 1 - 2
1 1 1 2 2   1 1 1 1 2   - 2 2 2 2   1 1 1 - 2
- - - 2 2   - - - - -   - - - - -   1 1 1 - -
Note that other pairs of rectangles with total area 18, e.g., 3 X 3 and 3 X 3, or 6 X 2 and 3 X 2 are not counted, since they could not fit together into the minimal (5 X 5) bounding square.
		

Crossrefs

Cf. A338671, A055507 (where a(n) is the number of ordered ways to express n+1 as a*b+c*d with 1 <= a,b,c,d <= n).

Programs

  • Python
    import numpy as np
    # This sets the number of terms:
    nits = 20
    # This list will contain the complete sequence:
    seq_entries = []
    # i is the index of the term to be calculated:
    for i in range(1, nits + 1):
        # This variable counts the rectangle pairs:
        count = 0
        # Calculate the side length of the minimal bounding square:
        bd_sq_side = np.ceil(np.sqrt(i))
        # Looking for pairs of rectangles of sizes a x b and c x d (all integers)
        # such that both can fit orthogonally into the minimal bounding square (integer side length)
        # WLOG suppose that:
        # a is the greatest of a, b, c, d...
        # c >= d
        # if a = c then b >= d
        # a rectangle of size 0 X 0 is not acceptable
        # The longest side length of either rectangle:
        for a in np.arange(1,bd_sq_side + 1):
            # The other side length of the same rectangle:
            for b in np.arange(1,1 + min(a,np.floor(i/a))):
                # Find the remaining area for the other rectangle:
                area_1   = a*b
                rem_area = i - area_1
                # If there is no remaining area, the first rectangle is not valid:
                if rem_area == 0:
                    continue
                # The shorter side of the second rectangle:
                for d in np.arange(1,1 + min(a,np.floor(np.sqrt(rem_area)))):
                    # The longer side of the second rectangle:
                    c = rem_area / d
                    # Check that the solution is valid:
                    if b + d <= bd_sq_side and c == int(c) and c <= bd_sq_side and c <= a and ((a != c) or (b >= d)):
                        count += 1
        # Add the entry calculated to the list
        seq_entries.append(count)
    for an in seq_entries:
        print(an)

A338864 Triangle T(n,k) defined by Sum_{k=1..n} T(n,k)*u^k*x^n/n! = Product_{j>0} ( exp(x^j/(1 - x^j)) )^u.

Original entry on oeis.org

1, 4, 1, 12, 12, 1, 72, 96, 24, 1, 240, 840, 360, 40, 1, 2880, 7200, 4920, 960, 60, 1, 10080, 70560, 65520, 19320, 2100, 84, 1, 161280, 745920, 887040, 362880, 58800, 4032, 112, 1, 1088640, 7983360, 12640320, 6652800, 1481760, 150192, 7056, 144, 1
Offset: 1

Views

Author

Seiichi Manyama, Nov 13 2020

Keywords

Comments

Also the Bell transform of A323295.

Examples

			exp(Sum_{n>0} u*d(n)*x^n) = 1 + u*x + (4*u+u^2)*x^2/2! + (12*u+12*u^2+u^3)*x^3/3! + ... .
Triangle begins:
       1;
       4,      1;
      12,     12,      1;
      72,     96,     24,      1;
     240,    840,    360,     40,     1;
    2880,   7200,   4920,    960,    60,    1;
   10080,  70560,  65520,  19320,  2100,   84,   1;
  161280, 745920, 887040, 362880, 58800, 4032, 112, 1;
  ...
		

Crossrefs

Column k=1..2 give A323295, (n!/2) * A055507(n-1).
Rows sum give A294363.

Programs

  • Mathematica
    T[n_, 0] := Boole[n == 0]; T[n_, k_] := T[n, k] = Sum[Boole[j > 0] * Binomial[n - 1, j - 1] * j! * DivisorSigma[0, j] * T[n - j, k - 1], {j, 0, n - k + 1}]; Table[T[n, k], {n, 1, 9}, {k, 1, n}] // Flatten (* Amiram Eldar, Nov 13 2020 *)
  • PARI
    {T(n, k) = my(u='u); n!*polcoef(polcoef(prod(j=1, n, exp(x^j/(1-x^j+x*O(x^n)))^u), n), k)}
    
  • PARI
    a(n) = if(n<1, 0, n!*numdiv(n));
    T(n, k) = if(k==0, 0^n, sum(j=0, n-k+1, binomial(n-1, j-1)*a(j)*T(n-j, k-1)))

Formula

E.g.f.: exp(Sum_{n>0} u*d(n)*x^n), where d(n) is the number of divisors of n.
T(n; u) = Sum_{k=1..n} T(n,k)*u^k is given by T(n; u) = u * (n-1)! * Sum_{k=1..n} k*d(k)*T(n-k; u)/(n-k)!, T(0; u) = 1.
T(n,k) = (n!/k!) * Sum_{i_1,i_2,...,i_k > 0 and i_1+i_2+...+i_k=n} Product_{j=1..k} d(i_j).
Previous Showing 11-20 of 26 results. Next