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-4 of 4 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)

A260002 Sudan Numbers: a(n)= f(n,n,n) where f is the Sudan function.

Original entry on oeis.org

0, 3, 15569256417
Offset: 0

Views

Author

Natan Arie Consigli, Jul 12 2015

Keywords

Comments

The Sudan function is the first discovered not primitive recursive function that is still totally recursive like the well-known three-argument (or two-argument) Ackermann function ack(a,b,c) (or ack(a,b)).
The Sudan function is defined as follows:
f(0,x,y) = x+y;
f(z,x,0) = x;
f(z,x,y) = f(z-1, f(z,x,y-1), f(z,x,y-1)+y).
Just as the three-argument (or two-argument) Ackermann numbers A189896 (or A046859) are defined to be the numbers that are the answer of ack(n,n,n) (or ack(n,n)) for some natural number n, the Sudan numbers are: a(n) = f(n,n,n).
a(3)> 2^(76*2^(76*2^(76*2^(76*2^76)))) so is too big to be included.

Examples

			a(1) = f(1,1,1) = f(0, f(1,1,0), f(1,1,0)+1) = f(0, 1, 2) = 1+2 = 3.
		

Crossrefs

Programs

  • Mathematica
    f[z_, x_, y_] := f[z, x, y] =
    Piecewise[{{x + y, z == 0}, {x,
        z > 0 && y == 0}, {f[z - 1, f[z, x, y - 1], f[z, x, y - 1] + y],
        z > 0 && y > 0} }];
    a[n_] := f[n,n,n]
  • PARI
    f(z,x,y)=if(z,if(y,my(t=f(z,x,y-1)); f(z-1, t, t+y),x),x+y)
    a(n)=f(n,n,n) \\ Charles R Greathouse IV, Jul 28 2015

A260003 Values f(1,x,y) with x>=0, y>0, in increasing order, where f is the Sudan function defined in A260002.

Original entry on oeis.org

1, 3, 4, 5, 7, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, 21, 24, 25, 26, 27, 28, 29, 31, 32, 33, 35, 36, 37, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 69, 71, 72, 73, 74, 75
Offset: 1

Views

Author

Natan Arie Consigli, Jul 23 2015

Keywords

Comments

Equivalently, numbers of the form 2^y(x+2)-y-2.
Using f(1,x,y) = f(0, f(1,x,y-1), f(1,x,y-1)+y) = 2*f(1,x,y-1) + y
f(1,x,y) + y + 2 = 2*(f(1,x,y-1)+y-1+2) let g(y) = f(1,x,y) + y + 2 then g(y) = 2*g(y-1). This means g(y)=2^y*g(0) and f(1,x,y) + y + 2 = 2^y(f(1,x,0)+2) but f(1,x,0) = x so f(1,x,y) = 2^y(x+2) - y - 2.
In this list we suppose that y>0. If we include y=0, every natural number would be in the sequence.

Examples

			19 is listed because f(1,1,3) = 2^3*(1+2) - 3 - 2 = 19.
		

Crossrefs

Cf. A000325 (f(1,2,n)), A005408 (f(1,n,1)=2n+1), A048493 (f(1,n,2)), A079583 (f(1,1,n)), A123720 (f(1,4,n)), A133124(f(1,3,n)), A260002, A260004, A260005 (f(2,n,2)), A260006.

A260004 Values of f(2,x,y) in increasing order, for x>=0, y>0 where f is the Sudan function defined in A260002.

Original entry on oeis.org

1, 8, 19, 27, 74, 185, 440, 1015, 2294, 5109, 10228, 11252, 24563, 53234, 114673, 245744, 524271, 1114094, 2359277, 4980716, 10485739, 22020074, 46137321, 88080360, 96468968, 201326567, 419430374, 872415205, 1811939300, 15569256417
Offset: 1

Views

Author

Natan Arie Consigli, Jul 23 2015

Keywords

Comments

This is a subsequence of A260003 since f(2,x,y)= f(1, f(2,x,y-1), f(2,x,y-1)+y).
In this list we suppose that y>0. If we take y=0, all the natural numbers would be in the sequence.
To evaluate the Sudan function see A260002-A260003.

Examples

			f(2,0,1) = f(1, f(2,0,0), f(2,0,0)+1) = f(1,0,1) = 2^1(0+2)-1-2 = 1;
f(2,0,2) = f(1, [f(2,0,1)], [f(2,0,1)+1+1]) = f(1,1,3) = 2^3(1+2)-3-2 = 19;
		

Crossrefs

Cf. A048493 (f(2,n,1)), A260002, A260003, A260005 (f(2,n,2)), A260006.
Showing 1-4 of 4 results.