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 41-50 of 54 results. Next

A024172 Integer part of ((3rd elementary symmetric function of 1,2,..,n)/(2nd elementary symmetric function of 1,2,...,n)).

Original entry on oeis.org

0, 0, 1, 2, 4, 6, 8, 10, 13, 16, 20, 24, 28, 33, 38, 43, 48, 54, 60, 67, 74, 81, 89, 97, 105, 113, 122, 131, 141, 151, 161, 172, 183, 194, 205, 217, 229, 242, 255, 268, 282, 296, 310, 324
Offset: 2

Views

Author

Keywords

Examples

			a(3) = floor(6/11) = 0; a(4) = floor(50/35) = 1. - _R. J. Mathar_, Sep 15 2009
		

Programs

  • GAP
    List([2..50],n->Int((1/2)*n*(n-2)*(n+1)/(3*n+2))); # Muniru A Asiru, May 19 2018
  • Maple
    seq(floor((1/2)*n*(n-2)*(n+1)/(3*n+2)),n=2..50); # Muniru A Asiru, May 19 2018
  • Mathematica
    Table[Floor[1/2 (n - 2) n (n + 1)/ (3 n + 2)], {n, 2, 45}] (* Ivan Neretin, May 19 2018 *)

Formula

a(n) = floor( A001303(n-2)/A000914(n-1) ). - R. J. Mathar, Sep 15 2009
Empirical g.f.: x^4*(x^4-x^3+x^2-x+1)*(x^5-x^3-x^2-x-1) / ((x-1)^3*(x^2+x+1)*(x^6+x^3+1)). - Colin Barker, Aug 16 2014
a(n) = floor((1/2)*(n - 2)*n*(n + 1)/(3*n + 2)).

Extensions

Offset set to 2 by R. J. Mathar, Sep 15 2009

A024173 Integer part of ((4th elementary symmetric function of 1,2,..,n)/(2nd elementary symmetric function of 1,2,...,n)).

Original entry on oeis.org

0, 0, 0, 3, 9, 21, 41, 72, 119, 185, 275, 395, 549, 744, 987, 1285, 1645, 2076, 2586, 3185, 3882, 4688, 5612, 6667, 7863, 9213, 10731, 12428, 14318, 16416, 18737, 21295, 24106, 27187, 30553, 34223, 38214, 42543, 47231, 52295, 57756, 63633, 69948, 76721
Offset: 2

Views

Author

Keywords

Examples

			a(4) = floor(24/35) = 0; a(5) = floor(274/85) = 3. - _R. J. Mathar_, Sep 15 2009
		

Programs

  • GAP
    List([2..50],n->Int((1/240)*(n-3)*(n-2)*(15*n^3+15*n^2-10*n-8)/(3*n+2))); # Muniru A Asiru, May 19 2018
  • Maple
    seq(floor((1/240)*(n-3)*(n-2)*(15*n^3+15*n^2-10*n-8)/(3*n+2)),n=2..50); # Muniru A Asiru, May 19 2018
  • Mathematica
    Table[Floor[1/240 (n - 3) (n - 2) (15 n^3 + 15 n^2 - 10 n - 8)/ (2 + 3 n)], {n, 2, 45}] (* Ivan Neretin, May 19 2018 *)

Formula

a(n)= floor(A000915(n-3)/A000914(n-1)). - R. J. Mathar, Sep 15 2009
a(n) = floor((1/240) * (n-3) * (n-2) * (15*n^3 + 15*n^2 - 10*n - 8) / (2 + 3*n)). - Ivan Neretin, May 19 2018

Extensions

Offset changed to 2 by R. J. Mathar, Sep 15 2009

A027916 Least k such that 1+2+...+k >= E{1,2,...,n}, where E = 2nd elementary symmetric function.

Original entry on oeis.org

2, 5, 8, 13, 19, 25, 33, 42, 51, 62, 74, 86, 100, 115, 130, 147, 165, 183, 203, 224, 245, 268, 292, 316, 342, 369, 396, 425, 455, 485, 517, 550, 583, 618, 654, 690, 728, 767, 806, 847, 889, 931, 975, 1020, 1065, 1112, 1160, 1208, 1258, 1309, 1360, 1413, 1467
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Total[Table[IntegerExponent[2^(n - k) 4^k, 8], {k, 0, n}]], {n, 2, 100}] (* Fred Daniel Kline, Jun 05 2012 *)

Formula

G.f.: x^2 * (x+2) / ((1-x^3)*(1-x)^2).
a(n) = A000217(n+1) + (A049347(n) - 4*(n+1))/3. - R. J. Mathar, Aug 18 2008
Conjecture: a(n) = n + (n^2 mod 3) + a(n-1). - Jon Maiga, Aug 02 2019
a(n) = ceiling((1/2)*(sqrt(3*n^4 + 2*n^3 - 3*n^2 - 2*n + 3)/sqrt(3) - 1)) = (3*n+4)*(n-1)/6 + ((n+2) mod 3)/3. - Rick Mabry, Jul 01 2023

Extensions

Extended according to the g.f. by R. J. Mathar, Aug 18 2008

A027919 a(n) = least k such that 2nd elementary symmetric function of {1,2,...,k+1} >= 3rd elementary symmetric function of {1,2,...,n}.

Original entry on oeis.org

2, 4, 6, 8, 11, 13, 16, 19, 22, 25, 29, 32, 36, 39, 43, 47, 51, 56, 60, 64, 69, 74, 78, 83, 88, 93, 98, 103, 109, 114, 119, 125, 131, 136, 142, 148, 154, 160, 166, 172, 178, 185, 191, 198, 204, 211, 217, 224, 231, 238, 245, 252, 259, 266
Offset: 3

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    SymmPolyn := proc(L::list,n::integer)
        local c,a,sel;
        a :=0 ;
        sel := combinat[choose](nops(L),n) ;
        for c in sel do
            a := a+mul(L[e],e=c) ;
        end do:
        a;
    end proc:
    A027919 := proc(n)
         local k,i;
         [seq(i,i=1..n)] ;
        e3 := SymmPolyn(%,3) ;
        for k from 1 do
            [seq(i,i=1..k+1)] ;
            if SymmPolyn(%,2) >= e3 then
                return k;
            end if;
        end do:
    end proc: # R. J. Mathar, Sep 23 2016

Formula

a(n) = min{k: A000914(k) >= A001303(n-2)}. - Sean A. Irvine, Dec 10 2019

Extensions

Definition modified by R. J. Mathar, Sep 23 2016

A067057 Let A(n) = {1,2,3,...n}. Let B(r) and C(n-r) be two subsets of A(n) having r and n-r elements respectively, such that B(r) U C(n-r) = A(n) and B and C are disjoint; then a(n) = sum of the products of all combination sums of elements of B and C for r =1 to n-1.

Original entry on oeis.org

0, 2, 22, 140, 680, 2800, 10304, 34944, 111360, 337920, 985600, 2782208, 7641088, 20500480, 53903360, 139264000, 354287616, 889061376, 2203975680, 5404098560, 13120307200, 31569477632, 75342282752, 178467635200, 419849830400
Offset: 1

Views

Author

Amarnath Murthy, Jan 02 2002, May 31 2003

Keywords

Comments

In other words, consider the set N = {1,2,3,...,n}; let S and S' be subsets of N such that S union S' is N. Define prod(S) = ( sum of members of S)*( sum of members of S'); then a(n) = sum of all possible prod(S).

Examples

			For n = 4, N = {1,2,3,4}, the 5 columns below give S sum(S) S' sum(S') prod(S):
  { } 0 {1,2,3,4} 10 0
  {1} 1 {2,3,4} 9 9
  {2} 2 {1,3,4} 8 16
  {3} 3 {1,2,4} 7 21
  {4} 4 {1,2,3} 6 24
  {1,2} 3 {3,4} 7 21
  {1,3} 4 {2,4} 6 24
  {1,4} 5 {2,3} 5 25
Hence a(4) = 1*(2 + 3 + 4) + 2*(1 + 3 + 4) + 3*(1 + 2 + 4) + 4*(1 + 2 + 3) + (1 + 2)*(3 + 4) + (1 + 3)*(2 + 4) + (1 + 4)*(2 + 3) = 140.
		

Crossrefs

Cf. A000914.

Programs

  • PARI
    print1(0, ", "); LIMIT = 40; V = vector(LIMIT*(LIMIT + 1)/2); V[1] = 1; for (i = 2, LIMIT, forstep (j = i*(i - 1)/2, 1, -1, V[i + j] += V[j]); V[i]++; k = i*(i + 1)/2; s = sum(j = 1, (k - 1)\2, j*(k - j)*V[j]); if (!(k%2), s += k*k*V[k\2]/8); print1(s, ", ")); \\ David Wasserman, Dec 22 2004

Formula

For n>1, all listed values are given by a(n)=(2^(n-2))*s(n+1, n-1), where the s(n+1, n-1) are Stirling numbers of the first kind (A000914). - John W. Layman, Jan 05 2002
Conjecture: G.f.: (-2*x^2*(x+1))/(2*x-1)^5. [From Maksym Voznyy (voznyy(AT)mail.ru), Jul 26 2009]

Extensions

More terms and formula from John W. Layman, Jan 05 2002
Further terms from David Wasserman, Dec 22 2004
Edited by N. J. A. Sloane, Nov 01 2008 at the suggestion of R. J. Mathar

A134449 Sum of even products minus sum of odd products of different pairs of numbers from 1 to n.

Original entry on oeis.org

0, 2, 5, 29, 39, 129, 150, 374, 410, 860, 915, 1707, 1785, 3059, 3164, 5084, 5220, 7974, 8145, 11945, 12155, 17237, 17490, 24114, 24414, 32864, 33215, 43799, 44205, 57255, 57720, 73592, 74120, 93194, 93789, 116469, 117135, 143849, 144590, 175790
Offset: 1

Views

Author

Keywords

Examples

			{1,2,3} -> 1*2-1*3+2*3 = 5.
{1,2,3,4} -> 1*2-1*3+1*4+2*3+2*4+3*4 = 29.
{1,2,3,4,5} -> 1*2-1*3+1*4-1*5+2*3+2*4+2*5+3*4-3*5+4*5 = 39.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local a,i,j,k,w; for i from 1 by 1 to n do a:=0; for j from 1 by 1 to i do w:=j; k:=i; while k>w do a:=a+w*k*(-1)^(w*k); k:=k-1; od; od; print(a); od; end: P(100);
  • Mathematica
    epop[n_]:=Module[{f=Times@@@Subsets[n,{2}]},Total[Select[f,EvenQ]]-Total[ Select[ f,OddQ]]]; Table[epop[Range[n]],{n,40}] (* Harvey P. Dale, Sep 17 2017 *)
  • PARI
    a(n) = {s = 0; for (i=1, n, for (j=i+1, n, p = i*j; if (p % 2, s -= p, s += p););); s;} \\ Michel Marcus, Mar 20 2015

Formula

Empirical g.f.: x^2*(x^5-6*x^4+2*x^3-16*x^2-3*x-2) / ((x-1)^5*(x+1)^4). - Colin Barker, Sep 03 2013
Conjectures from Colin Barker, Mar 20 2015: (Start)
a(n) = (n^4+4*n^3-2*n^2-4*n)/16 for n even.
a(n) = (n^4-1)/16 for n odd. (End)
The above conjectures are true. - Sela Fried, Dec 08 2024
E.g.f.: (x*(1 + 17*x + 6*x^2 + x^3)*cosh(x) - (1 + x - 7*x^2 - 10*x^3 - x^4)*sinh(x))/16. - Stefano Spezia, Dec 09 2024

A253207 a(n) = number of permutations of (1,2,...,n) producible by an ordered quadruple of distinct transpositions.

Original entry on oeis.org

11, 59, 359, 1799, 7091, 22995, 64143, 159093, 359348, 752180, 1478204, 2754752, 4906202, 8402522, 13907394, 22337388, 34933761, 53348561, 79746821, 116926733, 168459797, 238853045, 333735545, 460071495, 626402322, 843120306, 1122776354
Offset: 4

Views

Author

Andrew Woods, Dec 28 2014

Keywords

Crossrefs

Cf. A000914, for two transpositions, and A253171, for three.

Programs

  • PARI
    Vec(-x^4*(2*x^8-18*x^7+72*x^6-168*x^5+254*x^4-232*x^3+224*x^2-40*x+11)/(x-1)^9 + O(x^100)) \\ Colin Barker, Dec 30 2014

Formula

a(n) = n!*(1/(384*(n-8)!)+1/(24*(n-7)!)+13/(72*(n-6)!)+1/(5*(n-5)!)+1/(8*(n-4)!)+1/(3*(n-3)!)) for n>=8.

A349645 Triangular array read by rows: T(n,k) is the number of square n-permutations possessing exactly k cycles; n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 11, 0, 1, 0, 24, 0, 35, 0, 1, 0, 0, 184, 0, 85, 0, 1, 0, 720, 0, 994, 0, 175, 0, 1, 0, 0, 9708, 0, 4249, 0, 322, 0, 1, 0, 40320, 0, 72764, 0, 14889, 0, 546, 0, 1, 0, 0, 648576, 0, 402380, 0, 44373, 0, 870, 0, 1
Offset: 0

Views

Author

Steven Finch, Nov 23 2021

Keywords

Comments

A permutation p in S_n is a square if there exists q in S_n with q^2=p.
For such a p, the number of cycles of any even length in its disjoint cycle decomposition must be even.

Examples

			The three square 3-permutations are (1, 2, 3) with three cycles (fixed points) and (3, 1, 2) & (2, 3, 1), each with one cycle.
Among the twelve square 4-permutations are {1, 4, 2, 3} & {1, 3, 4, 2} and {3, 4, 1, 2} & {4, 3, 2, 1}, all with two cycles but differing types.
Triangle begins:
[0]   1;
[1]   0,   1;
[2]   0,   0,    1;
[3]   0,   2,    0,   1;
[4]   0,   0,   11,   0,    1;
[5]   0,  24,    0,  35,    0,   1;
[6]   0,   0,  184,   0,   85,   0,   1;
[7]   0, 720,    0, 994,    0, 175,   0,   1;
[8]   0,   0, 9708,   0, 4249,   0, 322,   0,   1;
...
		

Crossrefs

Columns k=0-1 give: A000007, A005359(n-1).
Row sums give A003483.
T(n+2,n) gives A000914.

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(i<1, 0,
          add(`if`(irem(i, 2)=0 and irem(j, 2)=1, 0, (i-1)!^j*
          multinomial(n, n-i*j, i$j)/j!*b(n-i*j, i-1))*x^j, j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Nov 23 2021
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i < 1, 0,
         Sum[If[Mod[i, 2] == 0 && Mod[j, 2] == 1, 0, (i-1)!^j*multinomial[n,
         Join[{n-i*j}, Table[i, {j}]]]/j!*b[n-i*j, i-1]]*x^j, {j, 0, n/i}]]]];
    T[n_] := With[{p = b[n, n]}, Table[Coefficient[p, x, i], {i, 0, n}]];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)

A351760 a(n) = Sum_{1 <= i < j <= n} (i*j)^4.

Original entry on oeis.org

0, 0, 16, 1393, 26481, 247731, 1516515, 6978790, 26131686, 83684778, 237014778, 607915231, 1436816095, 3170754405, 6600189141, 13064343516, 24750198748, 45116627556, 79482515700, 135826148445, 225852708445, 366397514791, 581244702423, 903454469346, 1378306878690, 2066986566190
Offset: 0

Views

Author

Roudy El Haddad, Feb 18 2022

Keywords

Comments

a(n) is the sum of all products of two distinct elements from the set {1^4, ..., n^4}.

Crossrefs

Cf. A000217 (for power 0), A000914 (for power 1), A000596 (for squares), A347107 (for cubes).
Cf. A000583 (fourth powers), A000538 (sum of fourth powers).

Programs

  • PARI
    {a(n) = n*(n-1)*(n+1)*(2*n-1)*(2*n+1)*(9*n^5+20*n^4-15*n^3-50*n^2+n+30)/1800};
    
  • PARI
    a(n) = sum(j=2, n, sum(i=1, j-1, i^4*j^4));
    
  • Python
    def A351760(n): return n*(n*(n*(n*(n*(n*(n*(n*(n*(9*n+20<<2)-105)-300)+88)+390)-20)-200)+1)+30)//1800 # Chai Wah Wu, Oct 03 2024

Formula

a(n) = Sum_{j=2..n} Sum_{i=1..j-1} j^4*i^4.
a(n) = n*(n - 1)*(n + 1)*(2*n - 1)*(2*n + 1)*(9*n^5 + 20*n^4 - 15*n^3 - 50*n^2 + n + 30)/1800.
a(n) = binomial(2*n+2, 5)*(9*n^5 + 20*n^4 - 15*n^3 - 50*n^2 + n + 30)/5!.
G.f.: x^2*(16 + 1217*x + 12038*x^2 + 30415*x^3 + 23364*x^4 + 5263*x^5 + 262*x^6 + x^7)/(1 - x)^11. - Stefano Spezia, Feb 18 2022

A027920 Least k such that 2nd elementary symmetric function of {1,2,...,k} >= 4th elementary symmetric function of {1,2,...,n}.

Original entry on oeis.org

3, 6, 10, 15, 20, 26, 33, 40, 49, 58, 68, 78, 90, 102, 115, 129, 143, 158, 174, 191, 208, 227, 246, 265, 286, 307, 329, 352, 376, 400, 425, 451, 477, 505, 533, 562, 591, 622, 653, 685, 717, 751, 785, 820, 856, 892, 929, 967, 1006, 1046, 1086, 1127, 1169, 1211
Offset: 4

Views

Author

Keywords

Crossrefs

Formula

a(n) = min{k: A000914(k) >= A000915(n-3)}. - Sean A. Irvine, Dec 10 2019

Extensions

More terms from Sean A. Irvine, Dec 10 2019
Previous Showing 41-50 of 54 results. Next