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

A260006 a(n) = f(1,n,n), where f is the Sudan function defined in A260002.

Original entry on oeis.org

0, 3, 12, 35, 90, 217, 504, 1143, 2550, 5621, 12276, 26611, 57330, 122865, 262128, 557039, 1179630, 2490349, 5242860, 11010027, 23068650, 48234473, 100663272, 209715175, 436207590, 905969637, 1879048164, 3892314083, 8053063650, 16642998241, 34359738336
Offset: 0

Views

Author

Natan Arie Consigli, Jul 23 2015

Keywords

Comments

f(1,n,n) = 2^n*(n+2) - (n+2) = (2^n - 1)*(n+2).
To evaluate the Sudan function see A260002 and A260003.
The numbers are alternately even and odd because for even n (2^n-1)*(n+2) is even and (2^(n+1)-1)*(n+1+2) is odd.
From Enrique Navarrete, Oct 02 2021: (Start)
a(n-2) is the number of ways we can write [n] as the union of 2 sets of sizes i, j which intersect in exactly 1 element (1 < i, j < n; i = j allowed), n>=2.
For n = 4, a(n-2) = 12 since [4] can be written as the unions:
{1,2} U {1,3,4}; {2,3} U {1,2,4}; {1,2} U {2,3,4}; {2,3} U {1,3,4};
{1,3} U {1,2,4}; {2,4} U {1,2,3}; {1,3} U {2,3,4}; {2,4} U {1,3,4};
{1,4} U {1,2,3}; {3,4} U {1,2,3}; {1,4} U {2,3,4}; {3,4} U {1,2,4}. (End)

Examples

			a(4) = (2^4 - 1)*(4 + 2) = 90.
		

Crossrefs

Cf. A000295 (f(1,0,n)), A000325 (f(1,2,n)), A005408 (f(1,n,1) = 2n+1), A001787 (n*2^(n-1)), A079583 (f(1,1,n)), A123720 (f(1,4,n)), A133124 (f(1,3,n)).

Programs

  • Magma
    [(2^n-1)*(n+2): n in [0..30]]; // Vincenzo Librandi, Aug 22 2015
    
  • Mathematica
    Table[(2^n -1)(n+2), {n, 0, 30}] (* Michael De Vlieger, Aug 22 2015 *)
    CoefficientList[Series[x(3 -6x +2x^2)/((1-x)^2 (1-2x)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 22 2015 *)
    LinearRecurrence[{6,-13,12,-4},{0,3,12,35},40] (* Harvey P. Dale, Mar 04 2023 *)
  • PARI
    vector(40, n, n--; (2^n-1)*(n+2)) \\ Michel Marcus, Jul 29 2015
    
  • PARI
    concat(0, Vec(x*(3-6*x+2*x^2)/((1-x)^2*(1-2*x)^2) + O(x^40))) \\ Colin Barker, Jul 29 2015
    
  • Sage
    [(n+2)*(2^n -1) for n in (0..30)] # G. C. Greubel, Dec 30 2021

Formula

a(n) = (2^n -1)*(n+2).
a(n) = 6*a(n-1) - 13*a(n-2) + 12*a(n-3) - 4*a(n-4) for n>3. - Colin Barker, Jul 29 2015
G.f.: x*(3 - 6*x + 2*x^2) / ((1-x)^2*(1-2*x)^2). - Colin Barker, Jul 29 2015
E.g.f.: 2*(x+1)*exp(2*x) - (x+2)*exp(x). - Robert Israel, Aug 23 2015
From Enrique Navarrete, Oct 02 2021: (Start)
a(n-2) = Sum_{j=2..n/2} binomial(n,j)*j, n even > 2.
a(n-2) = (Sum_{j=2..floor(n/2)} binomial(n,j)*j) + (1/2)*binomial(n, ceiling(n/2))*ceiling(n/2), n odd > 1. (End)
From Wolfdieter Lang, Nov 12 2021: (Start)
The previous bisection becomes for a(n):
a(2*k) = 2*(A002697(k+1) - (k+1)), and a(2*k+1) = A303602(k+1) - (2*k+3)*(2 - A000984(k+1))/2 = (2*k+3)*(4^(k+1) - 2)/2, for k >= 0. (End)

A130783 Maximum value of the n-th difference of a permutation of 0..n.

Original entry on oeis.org

0, 1, 3, 10, 25, 66, 154, 372, 837, 1930, 4246, 9516, 20618, 45332, 97140, 210664, 447661, 960858, 2028478, 4319100, 9070110, 19188796, 40122028, 84438360, 175913250, 368603716, 765561564, 1598231992, 3310623412, 6889682280, 14238676712, 29551095248
Offset: 0

Views

Author

R. H. Hardin, Aug 19 2007

Keywords

Comments

For n>1, a(n) is also the maximum value of the n-th difference of a permutation of 1..n. - Michel Marcus, Apr 15 2017

Examples

			a(1)=1 because 0 1 has a first difference of 1;
a(2)=3 because 2 0 1 has a second difference of 3.
		

Crossrefs

Programs

Formula

a(n) = (n+1)*(2^(n-1)-binomial(n-1,n/2)) if n is even else ((n+1)/2)*(2^n-binomial(n,(n+1)/2)). - Vladeta Jovovic, Aug 23 2007
a(n) = (n+1)*(2^n-binomial(n,[n/2]))/2, where [x] is floor. - Graeme McRae, Jan 30 2012
G.f.: (1-sqrt((1-2*x)/(1+2*x)))/(2*(1-2*x)^2). - Vladeta Jovovic, Aug 24 2007
Asymptotics: a(n) ~ 2^(n-1)*(n+1-sqrt(2*n/Pi)). - Fung Lam, Mar 28 2014
D-finite with recurrence (n-1)*n*a(n) = 2*(n-1)*(n+1)*a(n-1) + 4*(n-2)*n*a(n-2) - 8*(n-1)*n*a(n-3). - Vaclav Kotesovec, Mar 28 2014
a(2n) = A303602(n). a(2n+1) = A033504(n). - R. J. Mathar, Nov 20 2020
Showing 1-2 of 2 results.