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 45 results. Next

A038125 a(n) = Sum_{k=0..n} (k-n)^k.

Original entry on oeis.org

1, 1, 0, 0, 1, -1, 0, 6, -19, 29, 48, -524, 2057, -3901, -9632, 129034, -664363, 1837905, 2388688, -67004696, 478198545, -1994889945, 1669470784, 56929813934, -615188040195, 3794477505573, -12028579019536, -50780206473220
Offset: 0

Views

Author

Jim Ferry (jferry(AT)alum.mit.edu)

Keywords

Examples

			0^0 = 1,
1^0 - 0^1 = 1,
2^0 - 1^1 + 0^2 = 0,
3^0 - 2^1 + 1^2 - 0^3 = 0,
...
		

Crossrefs

Programs

  • Mathematica
    Prepend[ Table[ Sum[ (k-n)^k, {k, 0, n} ], {n, 30} ], 1 ]
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=0, N, x^k/(1+k*x))) \\ Seiichi Manyama, Dec 02 2021
    
  • PARI
    a(n) = sum(k=0, n, (k-n)^k); \\ Michel Marcus, Dec 03 2021

Formula

G.f.: 1+ sum(k>=0, x^(k+1)/(1+x^(k+1)) ) = 1/Q(0), where Q(k) = 1 - x + x^2*(k+1)/(1 + (k+1)*x/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Jan 10 2014

A104872 Diagonal sums of A004248.

Original entry on oeis.org

1, 0, 1, 1, 2, 3, 6, 12, 27, 64, 163, 441, 1268, 3855, 12344, 41464, 145653, 533736, 2036149, 8071785, 33192790, 141351715, 622384730, 2829417276, 13263528351, 64038928728, 318121600695, 1624347614737, 8517247764136, 45822087138879
Offset: 0

Views

Author

Paul Barry, Mar 28 2005

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n\2, k^(n-2*k)); \\ Seiichi Manyama, Apr 09 2022
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=0, N, x^(2*k)/(1-k*x))) \\ Seiichi Manyama, Apr 09 2022

Formula

a(n) = Sum_{k=0..floor(n/2)} k^(n-2*k).
G.f.: Sum_{k>=0} x^(2*k) / (1 - k * x). - Seiichi Manyama, Apr 09 2022
a(n) ~ sqrt(Pi) * (n/(2*LambertW(exp(1)*n/2)))^(n + 1/2 - n/LambertW(exp(1)*n/2)) / sqrt(1 + LambertW(exp(1)*n/2)). - Vaclav Kotesovec, Apr 14 2022

A234568 Sum_{k=0..n} (n-k)^(2*k).

Original entry on oeis.org

1, 1, 2, 6, 27, 163, 1268, 12344, 145653, 2036149, 33192790, 622384730, 13263528351, 318121600695, 8517247764136, 252725694989612, 8258153081400857, 295515712276222953, 11523986940937975402, 487562536078882116718, 22291094729329088403299, 1097336766599161926448779
Offset: 0

Views

Author

Paul D. Hanna, Dec 28 2013

Keywords

Examples

			O.g.f.: A(x) = 1 + x + 2*x^2 + 6*x^3 + 27*x^4 + 163*x^5 + 1268*x^6 +...
O.g.f.: A(x) = 1 + x/(1-x) + x^2/(1-4*x) + x^3/(1-9*x) + x^4/(1-16*x) +...
E.g.f.: E(x) = 1 + x + 2*x^2/2! + 6*x^3/3! + 27*x^4/4! + 163*x^5/5! +...
where the e.g.f. is a series involving iterated integration:
E(x) = 1 + Integral exp(x) dx + Integral^2 exp(4*x) dx^2 + Integral^3 exp(9*x) dx^3 + Integral^4 exp(16*x) dx^4 +...
		

Crossrefs

Programs

  • Mathematica
    Flatten[{1,Table[Sum[(n-k)^(2*k),{k,0,n}],{n,1,20}]}] (* Vaclav Kotesovec, Feb 23 2014 *)
  • PARI
    a(n)=sum(k=0, n, (n-k)^(2*k))
    for(n=0, 20, print1(a(n), ", "))
    
  • PARI
    /* From o.g.f. Sum_{n>=0} x^n/(1-n^2*x): */
    {a(n)=polcoeff(sum(m=0, n, x^m/(1-m^2*x+x*O(x^n))), n)}
    for(n=0, 20, print1(a(n), ", "))
    
  • PARI
    /* From e.g.f. involving iterated integration: */
    INTEGRATE(n,F)=local(G=F);for(i=1,n,G=intformal(G));G
    a(n)=my(A=1+x);A=1+sum(k=1,n,INTEGRATE(k,exp(k^2*x+x*O(x^n))));n!*polcoeff(A,n)
    for(n=0,20,print1(a(n),", ")) \\ Paul D. Hanna, Dec 28 2013

Formula

O.g.f.: Sum_{n>=0} x^n / (1 - n^2*x).
E.g.f.: Sum_{n>=0} Integral^n exp(n^2*x) dx^n, where integral^n F(x) dx^n is the n-th integration of F(x) with no constant of integration.
a(n) ~ sqrt(Pi) * (n/LambertW(exp(1)*n))^(1/2 + 2*n - 2*n/LambertW(exp(1)*n)) / sqrt(1 + LambertW(exp(1)*n)). - Vaclav Kotesovec, Dec 04 2021

A105795 Shallow diagonal sums of the triangle k!*Stirling2(n,k): a(n) = Sum_{k=0..floor(n/2)} T(n-k,k) where T is A019538.

Original entry on oeis.org

1, 0, 1, 1, 3, 7, 21, 67, 237, 907, 3741, 16507, 77517, 385627, 2024301, 11174587, 64673997, 391392667, 2470864941, 16237279867, 110858862477, 784987938907, 5755734591981, 43636725010747, 341615028340557, 2758165832945947, 22940755633301421, 196354180631212027
Offset: 0

Views

Author

Paul Barry, Apr 20 2005

Keywords

Comments

From Gus Wiseman, Jan 08 2019: (Start)
Also the number of set partitions of {1,...,n} into blocks of sizes > 1 whose minima form an initial interval of positive integers. For example, the a(5) = 7 set partitions are:
{{1,2,3,4,5}}
{{1,3},{2,4,5}}
{{1,4},{2,3,5}}
{{1,5},{2,3,4}}
{{1,3,4},{2,5}}
{{1,3,5},{2,4}}
{{1,4,5},{2,3}}
Also the number of ordered set partitions of {1,...,n-k} of length k, for any 0 <= k <= n. For example, the a(5) = 7 ordered set partitions are:
{{1,2,3,4}}
{{1},{2,3}}
{{2},{1,3}}
{{3},{1,2}}
{{1,2},{3}}
{{1,3},{2}}
{{2,3},{1}}
(End)

Examples

			a(8) = 1!*Stirling2(7,1) + 2!*Stirling2(6,2) + 3!*Stirling2(5,3) + 4!*Stirling2(4,4) = 1 + 62 + 150 + 24 = 237. - _Peter Bala_, Jul 09 2014
		

Crossrefs

Programs

  • Maple
    a:= n-> add(Stirling2(n-k, k)*k!, k=0..n/2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jul 09 2014
  • Mathematica
    Table[Sum[StirlingS2[n-k, k]*k!, {k,0,n/2}],{n,0,20}] (* Vaclav Kotesovec, Jul 16 2014 *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Sum[Length[Join@@Permutations/@Select[sps[Range[n-k]],Length[#]==k&]],{k,0,n}],{n,0,10}] (* Gus Wiseman, Jan 08 2019 *)
  • PARI
    /* From Paul Barry's formula: */
    {a(n)=sum(k=0,floor(n/2), sum(i=0,k,(-1)^i*binomial(k, i)*(k-i)^(n-k)))} \\ Paul D. Hanna, Dec 28 2013
    for(n=0,30,print1(a(n),", "))
    
  • PARI
    /* From e.g.f. series involving iterated integration: */
    {INTEGRATE(n,F)=local(G=F);for(i=1,n,G=intformal(G));G}
    {a(n)=local(A=1+x);A=1+sum(k=1,n,INTEGRATE(k,(exp(x+x*O(x^n))-1)^k ));n!*polcoeff(A,n)} \\ Paul D. Hanna, Dec 28 2013

Formula

a(n) = sum{k=0..floor(n/2), sum{(-1)^i*binomial(k, i)*(k-i)^(n-k)}}.
E.g.f.: Sum_{n>=0} Integral^n (exp(x) - 1)^n dx^n, where integral^n F(x) dx^n is the n-th integration of F(x) with no constant of integration. - Paul D. Hanna, Dec 28 2013
Formal o.g.f.: 1/(1 + x)*sum {n >= 0} 1/(1 - n*x)*(x/(1 + x))^n = 1 + x^2 + x^3 + 3*x^4 + 7*x^5 + .... Cf. A229046. - Peter Bala, Jul 09 2014

A349880 Expansion of Sum_{k>=0} x^k/(1 - k^3 * x).

Original entry on oeis.org

1, 1, 2, 10, 93, 1307, 28002, 842196, 33388393, 1717595949, 111931584098, 8979468552886, 872315432217509, 101425775048588759, 13924209725224120770, 2229705716369149960592, 412760812611799202662609, 87644186710319273062637625, 21180850892383599137766296770
Offset: 0

Views

Author

Seiichi Manyama, Dec 03 2021

Keywords

Crossrefs

Programs

  • PARI
    a(n, s=0, t=3) = sum(k=0, n, k^(t*(n-k)+s));
    
  • PARI
    my(N=20, x='x+O('x^N)); Vec(sum(k=0, N, x^k/(1-k^3*x)))

Formula

a(n) = Sum_{k=0..n} k^(3*(n-k)).
a(n) ~ sqrt(2*Pi/3) * (n/LambertW(exp(1)*n))^(1/2 + 3*n - 3*n/LambertW(exp(1)*n)) / sqrt(1 + LambertW(exp(1)*n)). - Vaclav Kotesovec, Dec 04 2021

A062810 a(n) = Sum_{i=1..n} i^(n - i) + (n - i)^i.

Original entry on oeis.org

1, 3, 7, 17, 45, 131, 419, 1465, 5561, 22755, 99727, 465537, 2303829, 12037571, 66174411, 381560425, 2301307841, 14483421859, 94909491607, 646309392369, 4565559980989, 33401808977411, 252713264780595, 1974606909857945
Offset: 1

Views

Author

Olivier Gérard, Jun 23 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Sum[i^(n - i) + (n - i)^i, {i, 1, n}]
  • PARI
    a(n) = sum(i=1, n, i^(n-i) + (n-i)^i); \\ Michel Marcus, Mar 24 2019

Formula

a(n) = 2 * A026898(n-1) - 1.
a(n) = 2 * A003101(n-1) + 1.

A103439 a(n) = Sum_{i=0..n-1} Sum_{j=0..i} (i-j+1)^j.

Original entry on oeis.org

0, 1, 3, 7, 16, 39, 105, 315, 1048, 3829, 15207, 65071, 297840, 1449755, 7468541, 40555747, 231335960, 1381989881, 8623700811, 56078446615, 379233142800, 2662013133295, 19362917622001, 145719550012299, 1133023004941272, 9090156910550109, 75161929739797519
Offset: 0

Views

Author

Ralf Stephan, Feb 11 2005

Keywords

Comments

Partial sums of A026898.
Antidiagonal sums of array A103438.
Row sums of A123490. - Paul Barry, Oct 01 2006

Crossrefs

Programs

  • Magma
    [0] cat [(&+[ (&+[ (k-j+1)^j : j in [0..k]]) : k in [0..n-1]]): n in [1..30]]; // G. C. Greubel, Jun 15 2021
    
  • Maple
    b:= proc(i) option remember; add((i-j+1)^j, j=0..i) end:
    a:= proc(n) option remember; add(b(i), i=0..n-1) end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Dec 02 2019
  • Mathematica
    Join[{0},Table[Sum[Sum[(i-j+1)^j,{j,0,i}],{i,0,n}],{n,0,30}]] (* Harvey P. Dale, Dec 03 2018 *)
  • PARI
    a(n) = sum(i=0, n-1, sum(j=0, i, (i-j+1)^j)); \\ Michel Marcus, Jun 15 2021
  • Sage
    [sum(sum((k-j+1)^j for j in (0..k)) for k in (0..n-1)) for n in (0..30)] # G. C. Greubel, Jun 15 2021
    

Formula

a(n+1) = Sum_{k=0..n} ((k+2)^(n-k) + k)/(k+1). - Paul Barry, Oct 01 2006
G.f.: (G(0)-1)/(1-x) where G(k) = 1 + x*(2*k*x-1)/(2*k*x+x-1 - x*(2*k*x+x-1)^2/(x*(2*k*x+x-1) + (2*k*x+2*x-1)/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 26 2013

Extensions

Name edited by Alois P. Heinz, Dec 02 2019

A352944 a(n) = Sum_{k=0..floor(n/2)} (n-2*k)^k.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 9, 16, 31, 61, 125, 266, 579, 1305, 3009, 7120, 17255, 42697, 108005, 278466, 731883, 1958589, 5331625, 14758720, 41501135, 118507301, 343405709, 1009313322, 3007557523, 9081204849, 27775308049, 86014412384, 269603741111, 855012176081
Offset: 0

Views

Author

Seiichi Manyama, Apr 09 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{1},Table[Sum[(n-2k)^k,{k,0,Floor[n/2]}],{n,40}]] (* Harvey P. Dale, Dec 12 2022 *)
  • PARI
    a(n) = sum(k=0, n\2, (n-2*k)^k);
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=0, N, x^k/(1-k*x^2)))

Formula

G.f.: Sum_{k>=0} x^k / (1 - k * x^2).
a(n) ~ sqrt(Pi) * (n/LambertW(exp(1)*n))^((n + 1 - n/LambertW(exp(1)*n))/2) / sqrt(1 + LambertW(exp(1)*n)). - Vaclav Kotesovec, Apr 14 2022

A104879 Row sums of a sum-of-powers triangle.

Original entry on oeis.org

1, 2, 4, 8, 17, 40, 106, 316, 1049, 3830, 15208, 65072, 297841, 1449756, 7468542, 40555748, 231335961, 1381989882, 8623700812, 56078446616, 379233142801, 2662013133296, 19362917622002, 145719550012300, 1133023004941273, 9090156910550110, 75161929739797520
Offset: 0

Views

Author

Paul Barry, Mar 28 2005

Keywords

Crossrefs

Row sums of A104878.
Cf. A103439 (terms differ by 1), A026898 (first differences).

Formula

a(n) = 1 + n + Sum_{k=2..n+1} (k^(n-k+1)-1)/(k-1).
a(n) = 1 + A103439(n). - Mathew Englander, Dec 19 2020

A327712 Sum of multinomials M(n-k; p_1-1, ..., p_k-1), where p = (p_1, ..., p_k) ranges over all compositions of n into distinct parts (k is a composition length).

Original entry on oeis.org

1, 1, 1, 3, 3, 9, 29, 57, 135, 615, 2635, 6273, 25151, 82623, 525281, 2941047, 9100709, 38766777, 205155713, 902705793, 7714938567, 52987356783, 204844103977, 1042657233471, 5520661314689, 38159472253821, 211945677298567, 2404720648663335, 19773733727088813
Offset: 0

Views

Author

Alois P. Heinz, Sep 22 2019

Keywords

Comments

Number of partitions of [n] with distinct block sizes such that each block contains exactly one block size as an element. a(5) = 9: 12345, 1235|4, 124|35, 125|34, 12|345, 134|25, 135|24, 13|245, 1|2345.

Crossrefs

Programs

  • Maple
    with(combinat):
    a:= n-> add(multinomial(n-nops(p), map(x-> x-1, p)[], 0), p=map(h->
        permute(h)[], select(l-> nops(l)=nops({l[]}), partition(n)))):
    seq(a(n), n=0..28);
    # second Maple program:
    a:= proc(m) option remember; local b; b:=
          proc(n, i, j) option remember; `if`(i*(i+1)/2>=n,
           `if`(n=0, (m-j)!*j!, b(n, i-1, j)+
            b(n-i, min(n-i, i-1), j+1)/(i-1)!), 0)
          end: b(m$2, 0):
        end:
    seq(a(n), n=0..28);
  • Mathematica
    a[m_] := a[m] = Module[{b}, b[n_, i_, j_] := b[n, i, j] = If[i(i + 1)/2 >= n, If[n == 0, (m - j)! j!, b[n, i - 1, j] + b[n - i, Min[n - i, i - 1], j + 1]/(i - 1)!], 0]; b[m, m, 0]];
    a /@ Range[0, 28] (* Jean-François Alcover, May 10 2020, after 2nd Maple program *)
Previous Showing 11-20 of 45 results. Next