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

A093178 If n is even then 1, otherwise n.

Original entry on oeis.org

1, 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 11, 1, 13, 1, 15, 1, 17, 1, 19, 1, 21, 1, 23, 1, 25, 1, 27, 1, 29, 1, 31, 1, 33, 1, 35, 1, 37, 1, 39, 1, 41, 1, 43, 1, 45, 1, 47, 1, 49, 1, 51, 1, 53, 1, 55, 1, 57, 1, 59, 1, 61, 1, 63, 1, 65, 1, 67, 1, 69, 1, 71, 1, 73, 1, 75, 1, 77, 1, 79, 1, 81, 1, 83, 1, 85
Offset: 0

Views

Author

Michael Somos, Mar 27 2004

Keywords

Comments

Continued fraction expansion for tan(1).
1 followed by run lengths of A062557 = 2n-1 1's followed by a 2. - Jeremy Gardiner, Aug 12 2012
Greatest common divisor of n and (n+1) mod 2. - Bruno Berselli, Mar 07 2017

Examples

			1.557407724654902230506974807... = 1 + 1/(1 + 1/(1 + 1/(3 + 1/(1 + ...))))
G.f. = 1 + x + x^2 + 3*x^3 + x^4 + 5*x^5 + x^6 + 7*x^7 + x^8 + 9*x^9 + x^10 + ...
		

Crossrefs

Equals |A009001(n)|.
Cf. A133080, A049471 (decimal expansion), A009001, A161738, A062557, A124625.

Programs

  • Maple
    A093178:=n->(n+1+(1-n)*(-1)^n)/2; seq(A093178(k), k=0..100); # Wesley Ivan Hurt, Oct 19 2013
  • Mathematica
    Join[{1},Riffle[Range[1,85,2],1]] (* or *) Array[If[EvenQ[#],1,#]&,87,0] (* Harvey P. Dale, Nov 23 2011 *)
  • PARI
    {a(n) = if( n%2, n, 1)};

Formula

G.f.: (1+x-x^2+x^3)/(1-x^2)^2.
a(n) = (-1)^n * a(-n) for all n in Z.
a(n) = (1/2) * [ 1 + n + (1-n)*(-1)^n ]. - Ralf Stephan, Dec 02 2004
a(n) = n^n mod (n+1) for n > 0. - Amarnath Murthy, Apr 18 2004
Satisfies a(0) = 1, a(n+1) = a(n) + n if a(n) < n else a(n+1) = a(n)/n. - Amarnath Murthy, Oct 29 2002
a(n) = ((n+1)+(1-n)(-1)^n)/2 and have e.g.f. (1+x)cosh(x). - Paul Barry, Apr 09 2003
a(n) = binomial(n, 2*floor(n/2)). - Paul Barry, Dec 28 2006
Starting (1, 1, 3, 1, 5, 1, 7, ...) = A133080^(-1) * [1,2,3,...]. - Gary W. Adamson, Sep 08 2007
a(n) = denom(b(n+2)/b(n+1)) with b(n) = product((2*n-3-2*k), k=0..floor(n/2-1)). - Johannes W. Meijer, Jun 18 2009
a(n) = 2*floor(n/2) - n*(n-1 mod 2) + 1. - Wesley Ivan Hurt, Oct 19 2013
a(n) = n^(n mod 2). - Wesley Ivan Hurt, Apr 16 2014

A161736 Denominators of the column sums of the BG2 matrix.

Original entry on oeis.org

1, 9, 75, 1225, 19845, 160083, 1288287, 41409225, 1329696225, 10667118605, 85530896451, 1371086188563, 21972535073125, 176021737014375, 1409850293610375, 90324408810638025, 5786075364399106425, 46326420401234675625, 370882277949065911875, 5938020471163465810125
Offset: 2

Views

Author

Johannes W. Meijer, Jun 18 2009

Keywords

Comments

The BG2 matrix coefficients, see also A008956, are defined by BG2[2m,1] = 2*beta(2m+1) and the recurrence relation BG2[2m,n] = BG2[2m,n-1] - BG2[2m-2,n-1]/(2*n-3)^2 for m = -2, -1, 0, 1, 2, .. and n = 2, 3, .. , with beta(m) = sum((-1)^k/(1+2*k)^m, k=0..infinity). We observe that beta(2m+1) = 0 for m = -1, -2, -3, .. .
A different way to define the matrix coefficients is BG2[2*m,n] = (1/m)*sum(LAMBDA(2*m-2*k,n-1)*BG2[2*k,n], k=0..m-1) with LAMBDA(2*m,n-1) = (1-2^(-2*m))*zeta(2*m)-sum((2*k-1)^(-2*m), k=1..n-1) and BG2[0,n] = Pi/2 for m = 0, 1, 2, .. , and n = 1, 2, 3 .. , with zeta(m) the Riemann zeta function.
The columns sums of the BG2 matrix are defined by sb(n) = sum(BG2[2*m,n], m=0..infinity) for n = 2, 3, .. . For large values of n the value of sb(n) approaches Pi/2.
It is remarkable that if we assume that BG2[2m,1] = 2 for m = 0, 1, .. the columns sums of the modified matrix converge to the original sb(n) values. The first Maple program makes use of this phenomenon and links the sb(n) with the central factorial numbers A008956.
The column sums sb(n) can be linked to other sequences, see the second Maple program.
We observe that the column sums sb(n) of the BG2(n) matrix are related to the column sums sl(n) of the LG2(n) matrix, see A008956, by sb(n) = (-1)^(n+1)*(2*n-1)*sl(n).
a(n+2), for n >= 0, seems to coincide with the numerators belonging to A278145. - Wolfdieter Lang, Nov 16 2016
Suppose that, given values f(x-2*n+1), f(x-2*n+3), ..., f(x-1), f(x+1), ..., f(x+2*n-3), f(x+2*n-1), we approximate f(x) using the first 2*n terms of its Taylor series. Then 1/sb(n+1) is the coefficient of f(x-1) and f(x+1). - Matthew House, Dec 03 2024

Examples

			sb(2) = 2; sb(3) = 16/9; sb(4) = 128/75; sb(5) = 2048/1225; etc..
		

Crossrefs

Programs

  • Magma
    [Denominator((2^(4*n-5)*(Factorial(n-1))^4)/((n-1)*(Factorial(2*n-2))^2)): n in [2..20]]; // G. C. Greubel, Sep 26 2018
  • Maple
    nmax := 18; for n from 0 to nmax do A001818(n) := (doublefactorial(2*n-1))^2 od: for n from 0 to nmax do A008956(n, 0):=1 od: for n from 0 to nmax do A008956(n, n) := A001818(n) od: for n from 1 to nmax do for m from 1 to n-1 do A008956(n, m) := (2*n-1)^2*A008956(n-1, m-1) + A008956(n-1, m) od: od: for n from 1 to nmax do for m from 0 to n do s(n, m):=0; s(n, m) := s(n, m)+ sum((-1)^k1*A008956(n, n-k1), k1=0..n-m): od: sb1(n+1) := sum(s(n, k1), k1=1..n) * 2/A001818(n); od: seq(sb1(n), n=2..nmax); # End program 1
    nmax1 := nmax; for n from 0 to nmax1 do A001147(n):= doublefactorial(2*n-1) od: for n from 0 to nmax1/2 do A133221(2*n+1) := A001147(n); A133221(2*n) := A001147(n) od: for n from 0 to nmax1 do A002474(n) := 2^(2*n+1)*n!*(n+1)! od: for n from 1 to nmax1 do A161738(n) := ((product((2*n-3-2*k1), k1=0..floor(n/2-1)))) od: for n from 2 to nmax1 do sb2(n) := A002474(n-2) / (A161738(n)*A133221(n-1))^2 od: seq(sb2(n), n=2..nmax1); # End program 2
    # Above Maple programs edited by Johannes W. Meijer, Sep 25 2012
    r := n -> (1/Pi)*(2*n - 2)*((n - 3/2)!/(n - 1)!)^2: a := n -> numer(simplify(r(n))):
    seq(a(n), n = 1..21);  # Peter Luschny, Feb 12 2025
  • Mathematica
    sb[2]=2; sb[n_] := sb[n] = sb[n-1]*4*(n-1)*(n-2)/(2n-3)^2; Table[sb[n] // Denominator, {n, 2, 20}] (* Jean-François Alcover, Aug 14 2017 *)
  • PARI
    {a(n) = if( n<2, 0, n--; numerator( binomial( 2*n, n)^2 * n / 2^(n+1) ))}; /* Michael Somos, May 09 2011 */
    

Formula

a(n) = denom(sb(n)) with sb(n) = (2^(4*n-5)*(n-1)!^4)/((n-1)*(2*n-2)!^2) and A161737(n) = numer(sb(n)).
a(n+1) = numerator of C(2*n,n)^2 * n / 2^(n+1). - Michael Somos, May 09 2011
a(n) = A001902(2*n-3). - Mats Granvik, Nov 25 2018
a(n) = numerator((1/Pi)*(2*n - 2)*((n - 3/2)!/(n - 1)!)^2). - Peter Luschny, Feb 13 2025

A161737 Numerators of the column sums of the BG2 matrix.

Original entry on oeis.org

1, 2, 16, 128, 2048, 32768, 262144, 2097152, 67108864, 2147483648, 17179869184, 137438953472, 2199023255552, 35184372088832, 281474976710656, 2251799813685248, 144115188075855872, 9223372036854775808, 73786976294838206464, 590295810358705651712, 9444732965739290427392
Offset: 1

Views

Author

Johannes W. Meijer, Jun 18 2009

Keywords

Comments

For the definition of the BG2 matrix coefficients see A161736.

Examples

			sb(1) = 1; sb(2) = 2; sb(3) = 16/9; sb(4) = 128/75; sb(5) = 2048/1225; etc..
		

Crossrefs

Programs

  • Magma
    [Numerator((2^(4*n-5)*(Factorial(n-1))^4)/((n-1)*(Factorial(2*n-2))^2)): n in [2..20]]; // G. C. Greubel, Sep 26 2018
  • Maple
    nmax := 18; x(1):=0: x(2):=1: for n from 2 to nmax-1 do x(n+1) := A050605(n-2) + x(n) + 3 od: for n from 1 to nmax do a(n) := 2^x(n) od: seq(a(n), n=1..nmax); # End program 1
    nmax1 := 20; for n from 0 to nmax1 do y(2*n+1) := A090739(n); y(2*n) := A090739(n) od: z(1) := 0: z(2) := 1: for n from 3 to nmax1 do z(n) := z(n-1) + y(n-1) od: for n from 1 to nmax1 do a(n) := 2^z(n) od: seq(a(n), n=1..nmax1); # End program 2
    # Above Maple programs edited by Johannes W. Meijer, Sep 25 2012 and by Peter Luschny, Feb 13 2025
    r := n -> Pi*(2*n - 2)*((n - 3/2)!/(n - 1)!)^2: a := n -> denom(simplify(r(n))):
    seq(a(n), n = 1..20);  # Peter Luschny, Feb 12 2025
  • Mathematica
    sb[1] = 1; sb[2] = 2; sb[n_] := sb[n] = sb[n-1]*4*(n-1)*(n-2)/(2n-3)^2;
    Table[sb[n] // Numerator, {n, 2, 20}] (* Jean-François Alcover, Aug 14 2017 *)
  • PARI
    vector(20, n, n++; numerator((2^(4*n-5)*(n-1)!^4)/((n-1)*(2*n-2)!^2))) \\ G. C. Greubel, Sep 26 2018
    

Formula

a(n) = numer(sb(n)) with sb(n) = (2^(4*n-5)*(n-1)!^4)/((n-1)*(2*n-2)!^2) and A161736(n) = denom(sb(n)).
a(n) = denominator(Pi*(2*n - 2)*((n - 3/2)!/(n - 1)!)^2). - Peter Luschny, Feb 12 2025

Extensions

Offset set to 1 and a(1) = 1 prepended by Peter Luschny, Feb 13 2025
Showing 1-3 of 3 results.