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.

A319150 a(n) = gcd(A275286(n), A001818(n+1)) / A025549(n+1)^2.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Tristan Cam, Nov 08 2018

Keywords

Comments

A(n) = a(n)*A025549(n+1)^2 = gcd(B(n), C(n)).
B(n) = A275286(n).
C(n) = A001818(n+1).
At first gcd(B(n), C(n)) = A025549(n+1)^2, but from n = 27 to n = 37, gcd(B(n), C(n)) = 11*A025549(n+1)^2, and then comes back to normal, then equals 19*A025549(n+1)^2, comes back to normal again, and so on ...
Let S(n) = Sum_{k=0..n} ((-1)^k)/(2*k+1)^2 (S(n) is NOT an integer sequence).
Notice that when n approaches +oo, D(n) converges to Catalan's constant (A006752).
A294970(n) is equal to the numerator of S(n) (when reduced).
Therefore B(n)/A(n) = A294970(n)
A294971(n) is equal to the denominator of S(n) (when reduced).
Therefore C(n)/A(n) = A294971(n).
This sequence was used to study the expression B(n)/C(n) (which equals S(n)) in an attempt to find out if Catalan's constant is irrational.

Examples

			For n = 5:
B(n) = A275286(5) = 98607816;
C(n) = A001818(5+1) = 108056025;
gcd(98607816,108056025) = A(5) = 9;
A025549(5+1)^2 = 3^2 = 9;
So a(5) = A(5)/A025549(5+1)^2 = 9/9 = 1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := GCD[(2n+1)!!^2 * Sum[(-1)^k/(2k+1)^2, {k, 0, n}], (2n+1)!!^2]*
    LCM @@ Range[1, 2n+1, 2]^2 / ((2n+1)!!)^2; Array[a, 100, 0] (* Amiram Eldar, Nov 16 2018 *)
  • PARI
    dfo(n) = (2*n)! / n! / 2^n;
    a6(n) = dfo(n+1)^2*sum(k=0, n, (-1)^k/(2*k+1)^2);
    a8(n) = ((2*n)!/(n!*2^n))^2;
    a9(n) = (((2*n)!/n!)/2^n)/lcm(vector(n, i, 2*i-1));
    a(n) = gcd(a6(n) , a8(n+1)) / a9(n+1)^2; \\ Michel Marcus, Nov 08 2018

Formula

Explicit formula:
a(n) = gcd( ((2*n+1)!!)^2 * (Sum_{i=0..n}((-1)^i)/(2*i+1)^2), ((2*n+1)!!)^2 ) / ( (((2*n+1)!!)^2) / ( lcm{1,3,5,...,2*n+1} ) )^2.
A few relations:
gcd(A275286(n), A001818(n+1)) = a(n)*A025549(n+1)^2 = A(n);
A275286(n)/A(n) = A294970(n);
A001818(n+1)/A(n) = A294971(n);
Limit_{n->+oo} A294970(n)/A294971(n) = G (Catalan's Constant, decimal expansion: A006752).

A161198 Triangle of polynomial coefficients related to the series expansions of (1-x)^((-1-2*n)/2).

Original entry on oeis.org

1, 1, 2, 3, 8, 4, 15, 46, 36, 8, 105, 352, 344, 128, 16, 945, 3378, 3800, 1840, 400, 32, 10395, 39048, 48556, 27840, 8080, 1152, 64, 135135, 528414, 709324, 459032, 160720, 31136, 3136, 128
Offset: 0

Views

Author

Johannes W. Meijer, Jun 08 2009, Jul 22 2011

Keywords

Comments

The series expansion of (1-x)^((-1-2*n)/2) = sum(b(p)*x^p, p=0..infinity) for n = 0, 1, 2, .. can be described with b(p) = (F(p,n)/ (2*n-1)!!)*(binomial(2*p,p)/4^(p)) with F(x,n) = 2^n * product( x+(2*k-1)/2, k=1..n). The roots of the F(x,n) polynomials can be found at p = (1-2*k)/2 with k from 1 to n for n = 0, 1, 2, .. . The coefficients of the F(x,n) polynomials lead to the triangle given above. The triangle row sums lead to A001147.
Quite surprisingly we discovered that sum(b(p)*x^p, p=0..infinity) = (1-x)^(-1-2*n)/2, for n = -1, -2, .. . We assume that if m = n+1 then the value returned for product(f(k), k = m..n) is 1 and if m> n+1 then 1/product(f(k), k=n+1..m-1) is the value returned. Furthermore (1-2*n)!! = (-1)^(n+1)/(2*n-3)!! for n = 1, 2, 3 .. . This leads to b(p) = ((-1-2*n)!!/ G(p,n))*(binomial(2*p,p) /4^(p)) for n = -1, -2, .. . For the G(p,n) polynomials we found that G(p,n) = F(-p,-n). The roots of the G(p,n) polynomials can be found at p=(2*k-1)/2 with k from 1 to (-n) for n = -1, -2, .. . The coefficients of the G(p,n) polynomials lead to a second triangle that stands with its head on top of the first one. It is remarkable that the row sums lead once again to A001147.
These two triangles together look like an hourglass so we propose to call the F(p,n) and the G(p,n) polynomials the hourglass polynomials.
Triangle T(n,k), read by rows, given by (1, 2, 3, 4, 5, 6, 7, 8, 9, ...) DELTA (2, 0, 2, 0, 2, 0, 2, 0, 2, ...) where DELTA is the operator defined in A084938. Philippe Deléham, May 14 2015.

Examples

			From _Gary W. Adamson_, Jul 19 2011: (Start)
The first few rows of matrix M are:
  1, 2,  0,  0, 0, ...
  1, 3,  2,  0, 0, ...
  1, 4,  5,  2, 0, ...
  1, 5,  9,  7, 2, ...
  1, 6, 14, 16, 9, ... (End)
The first few G(p,n) polynomials are:
  G(p,-3) = 15 - 46*p + 36*p^2 - 8*p^3
  G(p,-2) = 3 - 8*p + 4*p^2
  G(p,-1) = 1 - 2*p
The first few F(p,n) polynomials are:
  F(p,0) = 1
  F(p,1) = 1 + 2*p
  F(p,2) = 3 + 8*p + 4*p^2
  F(p,3) = 15 + 46*p + 36*p^2 + 8*p^3
The first few rows of the upper and lower hourglass triangles are:
  [15, -46, 36, -8]
  [3, -8, 4]
  [1, -2]
  [1]
  [1, 2]
  [3, 8, 4]
  [15, 46, 36, 8]
		

Crossrefs

Cf. A001790 [(1-x)^(-1/2)], A001803 [(1-x)^(-3/2)], A161199 [(1-x)^(-5/2)] and A161201 [(1-x)^(-7/2)].
Cf. A002596 [(1-x)^(1/2)], A161200 [(1-x)^(3/2)] and A161202 [(1-x)^(5/2)].
A046161 gives the denominators of the series expansions of all (1-x)^((-1-2*n)/2).
A028338 is a scaled triangle version, A039757 is a scaled signed triangle version and A109692 is a transposed scaled triangle version.
A001147 is the first left hand column and equals the row sums.
A004041 is the second left hand column divided by 2, A028339 is the third left hand column divided by 4, A028340 is the fourth left hand column divided by 8, A028341 is the fifth left hand column divided by 16.
A000012, A000290, A024196, A024197 and A024198 are the first (n-m=0), second (n-m=1), third (n-m=2), fourth (n-m=3) and fifth (n-m=4) right hand columns divided by 2^m.
A074599 * A025549 is not always equals the second left hand column.
Cf. A029635. [Gary W. Adamson, Jul 19 2011]

Programs

  • Maple
    nmax:=7; for n from 0 to nmax do a(n,n):=2^n: a(n,0):=doublefactorial(2*n-1) od: for n from 2 to nmax do for m from 1 to n-1 do a(n,m) := 2*a(n-1,m-1)+(2*n-1)*a(n-1,m) od: od: seq(seq(a(n,k), k=0..n), n=0..nmax);
    nmax:=7: M := Matrix(1..nmax+1,1..nmax+1): A029635 := proc(n,k): binomial(n,k) + binomial(n-1,k-1) end: for i from 1 to nmax do for j from 1 to i+1 do M[i,j] := A029635(i,j-1) od: od: for n from 0 to nmax do B := M^n: for m from 0 to n do a(n,m):= B[1,m+1] od: od: seq(seq(a(n,m), m=0..n), n=0..nmax);
    A161198 := proc(n,k) option remember; if k > n or k < 0 then 0 elif n = 0 and k = 0 then 1 else 2*A161198(n-1, k-1) + (2*n-1)*A161198(n-1, k) fi end:
    seq(print(seq(A161198(n,k), k = 0..n)), n = 0..6);  # Peter Luschny, May 09 2013
  • Mathematica
    nmax = 7; a[n_, 0] := (2*n-1)!!; a[n_, n_] := 2^n; a[n_, m_] := a[n, m] = 2*a[n-1, m-1]+(2*n-1)*a[n-1, m]; Table[a[n, m], {n, 0, nmax}, {m, 0, n}] // Flatten (* Jean-François Alcover, Feb 25 2014, after Maple *)
  • PARI
    for(n=0,9, print(Vec(Ser( 2^n*prod( k=1,n, x+(2*k-1)/2 ),,n+1))))  \\ M. F. Hasler, Jul 23 2011
    
  • Sage
    @CachedFunction
    def A161198(n,k):
        if k > n or k < 0 : return 0
        if n == 0 and k == 0: return 1
        return 2*A161198(n-1,k-1)+(2*n-1)*A161198(n-1,k)
    for n in (0..6): [A161198(n,k) for k in (0..n)]  # Peter Luschny, May 09 2013

Formula

a(n,m) := coeff(2^(n)*product((x+(2*k-1)/2),k=1..n), x, m) for n = 0, 1, .. ; m = 0, 1, .. .
a(n, m) = 2*a(n-1,m-1)+(2*n-1)*a(n-1,m) with a(n, n) = 2^n and a(n, 0) = (2*n-1)!!.
a(n,m) = the (m+1)-th term in the top row of M^n, where M is an infinite square production matrix; M[i,j] = A029635(i,j-1) = binomial(i, j-1) + binomial(i-1, j-2) with A029635 the (1.2)-Pascal triangle, see the examples and second Maple program. [Gary W. Adamson, Jul 19 2011]
T(n,k) = 2^k * A028338(n,k). - Philippe Deléham, May 14 2015

A074599 Numerator of 2 * H(n,2,1), a generalized harmonic number. See A075135. Also 2 * A350669.

Original entry on oeis.org

2, 8, 46, 352, 1126, 13016, 176138, 182144, 3186538, 62075752, 63461422, 1488711776, 7577414602, 23104065256, 680057071574, 21372905414144, 21646396991594, 21904260478904, 819482859775298, 828045249930848
Offset: 1

Views

Author

Robert G. Wilson v, Aug 27 2002

Keywords

Comments

2*(1 + 1/3 + ... + 1/(2*n-1))/Pi = a(n)/(A350670(n)*Pi) is the equivalent resistance between the points (0,0) and (n,n) on a 2-dimension infinite square grid of unit resistors. - Jianing Song, Apr 28 2025

Crossrefs

Cf. A350669. The denominators are in A350670.
Not always equal to the second left hand column of A161198 triangle divided by A025549. - Johannes W. Meijer, Jun 08 2009

Programs

  • Mathematica
    Table[ Numerator[ Sum[1/i, {i, 1/2, n}]], {n, 1, 20}]

A196274 Half of the gaps A067970 between odd nonprimes A014076.

Original entry on oeis.org

4, 3, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 1, 3, 1, 2, 3, 1, 2, 2, 1, 2, 1, 1, 2, 3, 3, 2, 1, 1, 1, 1, 1, 2, 2, 1, 3, 1, 1, 1, 3, 1, 2, 1, 2, 2, 1, 2, 1, 3, 1, 1, 1, 3, 3, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 2, 1, 3, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 3, 1, 1, 1, 2
Offset: 1

Views

Author

M. F. Hasler, Sep 30 2011

Keywords

Comments

a(n) < 4 for n > 1; a(A196276(n)) = 1; a(A196277(n)) > 1. - Reinhard Zumkeller, Sep 30 2011
Lengths of runs of equal terms in A025549. That sequence begins with: 1,1,1,1,3,3,3,45,45,45,..., that is 4 ones, 3 threes, 3 forty-fives, ... - Michel Marcus, Dec 02 2014

Examples

			The smallest odd numbers which are not prime are 1, 9, 15, 21, 25, 27,... (sequence A014076).
The gaps between these are: 8, 6, 6, 4, 2,... (sequence A067970), which are of course all even by construction, so it makes sense to divide all of them by 2, which yields this sequence: 4, 3, 3, 2, 1, ...
		

Crossrefs

Cf. A142723 for the decimal value of the associated continued fraction.

Programs

  • Mathematica
    With[{nn=401},Differences[Complement[Range[1,nn,2],Prime[Range[ PrimePi[ nn]]]]]/2] (* Harvey P. Dale, May 06 2012 *)
  • PARI
    L=1;forstep(n=3,299,2,isprime(n)&next;print1((n-L)/2",");L=n)
    
  • Python
    from sympy import primepi, isprime
    def A196274(n):
        if n == 1: return 4
        m, k = n-1, primepi(n) + n - 1 + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n - 1 + (k>>1)
        for d in range(1,4):
            if not isprime(m+(d<<1)):
                return d # Chai Wah Wu, Jul 31 2024

Formula

a(n) = (A014076(n+1)-A014076(n))/2 = A067970(n)/2.

Extensions

More terms from Harvey P. Dale, May 06 2012
Showing 1-4 of 4 results.