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

A212120 Triangle read by rows T(n,k), n>=1, k>=1, where T(n,k) is the sum of the divisors d of n with min(d, n/d) = k.

Original entry on oeis.org

1, 3, 5, 7, 1, 9, 1, 11, 3, 13, 3, 15, 5, 17, 5, 1, 19, 7, 1, 21, 7, 1, 23, 9, 3, 25, 9, 3, 27, 11, 3, 29, 11, 5, 31, 13, 5, 1, 33, 13, 5, 1, 35, 15, 7, 1, 37, 15, 7, 1, 39, 17, 7, 3, 41, 17, 9, 3, 43, 19, 9, 3, 45, 19, 9, 3, 47, 21, 11, 5, 49, 21, 11, 5, 1
Offset: 1

Views

Author

Omar E. Pol, Jul 02 2012

Keywords

Comments

Column k lists the odd numbers repeated k times starting in row k^2.
1 together with the first differences of the row sums give the divisor function A000005.
T(n,k) is also the total number of divisors of all positive integers <= n on the edges of k-th triangle in the diagram of divisors (see link section). See also A212119.

Examples

			Written as an irregular triangle the sequence begins:
1;
3;
5;
7,   1;
9,   1;
11,  3;
13,  3;
15,  5;
17,  5,  1;
19,  7,  1;
21,  7,  1;
23,  9,  3;
25,  9,  3;
27, 11,  3;
29, 11,  5;
31, 13,  5,  1;
33, 13,  5,  1;
35, 15,  7,  1;
37, 15,  7,  1;
39, 17,  7,  3;
41, 17,  9,  3;
43, 19,  9,  3;
45, 19,  9,  3;
47, 21, 11,  5;
49, 21, 11,  5,  1;
		

Crossrefs

Row sums give A006218, n >= 1.
Columns (1-5): A005408, A109613, A130823, A129756, A130497.

Formula

T(n,k) = Sum_{j=1..n} A212119(j,k).

Extensions

Definition changed by Franklin T. Adams-Watters, Jul 12 2012

A166107 A sequence related to the Madhava-Gregory-Leibniz formula for Pi.

Original entry on oeis.org

2, -10, 46, -334, 982, -10942, 140986, -425730, 7201374, -137366646, 410787198, -9473047614, 236302407090, -710245778490, 20563663645710, -638377099140510, 1912749274005030, -67020067316087550, 2477305680740159850
Offset: 0

Views

Author

Johannes W. Meijer, Oct 06 2009, Feb 26 2013, Mar 02 2013

Keywords

Comments

The EG1 matrix is defined in A162005. The first column of this matrix leads to the function PLS(z) = sum(2*eta(2*m-1)*z^(2*m-2), m=1..infinity) = 2*log(2) - Psi(z) - Psi(-z) + Psi(z/2) + Psi(-z/2). The values of this function for z=n+1/2 are related to Pi in a curious way.
Gauss's digamma theorem leads to PLS(z=n+1/2) = (-1)^n*4*sum((-1)^(k+1)/(2*k-1), k=1..n) + 2/(2*n+1). Now we define PLS(z=n+1/2) = a(n)/p(n) with a(n) the sequence given above and for p(n) we choose the esthetically nice p(n) = (2*n-1)!!/(floor((n-2)/3)*2+1)!!, n=>0. For even values of n the limit(a(2*n)/p(2*n), n=infinity) = Pi and for odd values of n the limit(a(2*n+1)/p(2*n+1), n=infinity) = - Pi. We observe that the a(n)/p(n) formulas resemble the partial sums of the Madhava-Gregory-Leibniz series for Pi = 4*(1-1/3+1/5-1/7+ ...), see the examples. The 'extra term' that appears in the a(n)/p(n) formulas, i.e., 2/(2*n+1), speeds up the convergence of abs(a(n)/p(n)) significantly. The first appearance of a digit in the decimal expansion of Pi occurs here for n: 1, 3, 9, 30, 74, 261, 876, 3056, .., cf. A126809. [Comment modified by the author, Oct 09 2009]

Examples

			The first few values of a(n)/p(n) are: a(0)/p(0) = 2/1; a(1)/p(1) = - 4*(1) + 2/3 = -10/3; a(2)/p(2) = 4*(1-1/3) + 2/5 = 46/15; a(3)/p(3) = - 4*(1-1/3+1/5) + 2/7 = - 334/105; a(4)/p(4)= 4*(1-1/3+1/5-1/7) + 2/9 = 982/315; a(5)/p(5) = - 4*(1-1/3+1/5-1/7+1/9) + 2/11 = -10942/3465; a(6)/p(6) = 4*(1-1/3+1/5-1/7+1/9-1/11) + 2/13 = 140986/45045; a(7)/p(7) = - 4*(1-1/3+1/5-1/7+1/9-1/11+1/13) + 2/15 = - 425730/135135.
		

Crossrefs

Programs

  • Maple
    A166107 := n -> A220747 (n)*((-1)^n*4*sum((-1)^(k+1)/(2*k-1), k=1..n) + 2/(2*n+1)): A130823 := n -> floor((n-1)/3)*2+1: A220747 := n -> doublefactorial(2*n+1) / doublefactorial(A130823(n)): seq(A166107(n), n=0..20);

Formula

a(n) = p(n)*(-1)^n*4*sum((-1)^(k+1)/(2*k-1), k=1..n) + 2/(2*n+1) with
p(n) = doublefactorial(2*n+1)/doublefactorial(floor((n-1)/3)*2+1) = A220747(n)
PLS(z) = 2*log(2) - Psi(z) - Psi(-z) + Psi(z/2) + Psi(-z/2)
PLS(z=n+1/2) = a(n)/p(n) = (-1)^n*4*sum((-1)^(k+1)/(2*k-1), k=1..n) + 2/(2*n+1)
PLS(z=2*n+5/2) - PLS(z=2*n+1/2) = 2/(4*n+5) - 4/(4*n+3) + 2/(4*n+1) which leads to:
Pi = 2 + 16 * sum(1/((4*n+5)*(4*n+3)*(4*n+1)), n=0 .. infinity).
PLS (z=2*n +7/2) - PLS(z=2*n+3/2) = 2/(4*n+7) - 4/(4*n+5) + 2/(4*n+3) which leads to:
Pi = 10/3 - 16*sum(1/((4*n+7)*(4*n+5)*(4*n+3)), n=0 .. infinity).
The combination of these two formulas leads to:
Pi = 8/3 + 48* sum(1/((4*n+7)*(4*n+5)*(4*n+3)*(4*n+1)), n=0 .. infinity).

A215495 a(4*n) = a(4*n+2) = a(2*n+1) = 2*n + 1.

Original entry on oeis.org

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

Views

Author

Paul Curtz, Aug 13 2012

Keywords

Comments

A214282(n) and -A214283(n) are companions. Separately or together, they have many links with the Catalan's numbers A000108(n). Examples:
A214282(n+1) - 2*A214282(n) = -1, -1, 1, 0, -2, -5, 5, 0, -14, -42, 42, 0, -132, ....
2*A214283(n) - A214283(n+1) = 1, 0, -1, -2, 2, 0, -5, -14, 14, 0, -42, -132, 132, ....
A214282(n) + A214283(n) = 1, 0, -1, 0, 2, 0, -5, 0, 14, 0, -42,... (A126120).
The companion to a(n) is b(n) = -A214283(n)/(1,1,1,1,2,2,5,5,...) = 0, 1, 2, 3, 2, 5, 4, 7, 4, 9, 6, ....
a(n) - b(n) = A056594(n).
Discovered as a(n) = A214282(n+1)/A000108([n/2]). See abs(A129996(n-2)).

Crossrefs

Programs

  • Magma
    I:=[1,1,1,3,3,5]; [n le 6 select I[n] else Self(n-2) +Self(n-4) -Self(n-6): n in [1..30]]; // G. C. Greubel, Apr 23 2018
  • Mathematica
    a[n_?EvenQ] := n/2 + Boole[Mod[n, 4] == 0]; a[n_?OddQ] := n; Table[a[n], {n, 0, 86}] (* Jean-François Alcover, Aug 14 2012 *)
    LinearRecurrence[{0,1,0,1,0,-1}, {1,1,1,3,3,5}, 50] (* G. C. Greubel, Apr 23 2018 *)
  • PARI
    x='x+O('x^30); Vec(( 1+x+2*x^3+x^4+x^5 )/( (x^2+1)*(x-1)^2*(1+x)^2 )) \\ G. C. Greubel, Apr 23 2018
    

Formula

a(n+3) = (A185048(n+3)=2,2,4,2,... ) + 1.
a(n+2) - a(n) = 0, 2, 2, 2. (Period 4).
a(n) = 2*a(n-4) - a(n-8).
a(2*n) = A109613(n).
a(n+1) - a(n) = 2* (-1)^n * A059169(n).
G.f. : ( 1+x+2*x^3+x^4+x^5 ) / ( (x^2+1)*(x-1)^2*(1+x)^2 ). - Jean-François Alcover, Aug 14 2012

A226023 A142705 (numerators of 1/4-1/(4n^2)) sorted to natural order.

Original entry on oeis.org

0, 2, 3, 6, 12, 15, 20, 30, 35, 42, 56, 63, 72, 90, 99, 110, 132, 143, 156, 182, 195, 210, 240, 255, 272, 306, 323, 342, 380, 399, 420, 462, 483, 506, 552, 575, 600, 650, 675, 702, 756, 783, 812, 870, 899
Offset: 0

Views

Author

Paul Curtz, May 23 2013

Keywords

Comments

A198442(n) without indices 4*n+2.
a(n)/A130823(n+1) = 0, 2,3,2, 4,5,4, 6,7,6, 8,9,8, ... (equal to A133310+1, after 0; see also A008611).
-1, 0, 2, 3, is divisible by 1 (for a(-1)=-1),
3, 6, 12, 15, 3,
15, 20, 30, 35 5,
35, 42, 56, 63 7,
63, 72, 90, 99 9,
99, 110, 132, 143, 11, etc.
First column: A000466(n),
second column: A002943(n),
third column: A002939(n+1),
fourth column: A000466(n+1).
a(n) is also the numerator of 1/4-1/(4*n+2)^2: 0/1, 2/9, 3/16, 6/25, 12/49, 15/64, 20/81, 30/121, 35/144, 42/169, 56/225,...
The n-th denominator is equal to 4*a(n) + A146325(n+2).
Note that the differences of a(n-1): 1, 2, 1, 3, 6, 3, 5, 10, 5, 7, 14, 7, 9, 18, 9, 11, 22,... (from A043547 by pairs and 2*n+1) has the same recurrence.
(Of course every sequence which obeys a linear recurrence with constant coefficients has first differences that obey the same linear recurrence. - R. J. Mathar, Jun 14 2013)

Crossrefs

Trisections: A002939, A000466, A002943.

Programs

  • Maple
    A226023 := proc(n)
        option remember;
        if n <=6 then
            op(n+1,[0,2,3,6,12,15,20]) ;
        else
            procname(n-1)+2*procname(n-3)-2*procname(n-4)-procname(n-6)+procname(n-7) ;
        end if;
    end proc: # R. J. Mathar, Jun 28 2013
  • Mathematica
    A226023[n_]:=Floor[(2n+1)/3]Floor[(2n+5)/3];
    Array[A226023,100,0] (* Paolo Xausa, Dec 05 2023 *)

Formula

a(n) = floor( (2*n + 1)/3 ) * floor( (2*n + 5)/3 ) = A004396(n) * A004396(n+2).
Recurrences: a(n) = 3*a(n-3) -3*a(n-6) +a(n-9) = a(n-1) +2*a(n-3) -2*a(n-4) -a(n-6) +a(n-7).
a(n+15) - a(n) = 10*A042968(n+8).
a(n+1) - a(n-2) = 2*A042968(n) with a(-2)=0, a(-1)=-1.
G.f.: x*(2+x+3*x^2+2*x^3+x^4-x^5)/((1-x)^3 * (1+x+x^2)^2). [Ralf Stephan, May 24 2013]

A133310 a(3n) = 2n+1, a(3n+1) = 2n+2, a(3n+2) = 2n+1.

Original entry on oeis.org

1, 2, 1, 3, 4, 3, 5, 6, 5, 7, 8, 7, 9, 10, 9, 11, 12, 11, 13, 14, 13, 15, 16, 15, 17, 18, 17, 19, 20, 19, 21, 22, 21, 23, 24, 23, 25, 26, 25, 27, 28, 27, 29, 30, 29, 31, 32, 31, 33, 34, 33, 35, 36, 35, 37, 38, 37, 39, 40, 39, 41, 42, 41, 43, 44, 43, 45, 46, 45, 47, 48, 47, 49, 50
Offset: 0

Views

Author

Paul Curtz, Oct 18 2007

Keywords

Crossrefs

Cf. A130823 (1, 1, 1, 3, 3, 3).

Programs

  • Magma
    Q:=Rationals(); R:=PowerSeriesRing(Q, 70); Coefficients(R!((1+x-x^2+x^3)/((1+x+x^2)*(x-1)^2))) // G. C. Greubel, Feb 10 2018
  • Mathematica
    CoefficientList[Series[(1+x-x^2+x^3)/((1+x+x^2)*(x-1)^2), {x, 0, 50}], x] (* G. C. Greubel, Feb 10 2018 *)
    LinearRecurrence[{1, 0, 1, -1}, {1, 2, 1, 3}, 74] (* Robert G. Wilson v, Feb 10 2018 *)
  • PARI
    my(x='x+O('x^70)); Vec((1+x-x^2+x^3)/((1+x+x^2)*(x-1)^2)) \\ G. C. Greubel, Feb 10 2018
    

Formula

G.f.: ( 1+x-x^2+x^3 ) / ( (1+x+x^2)*(x-1)^2 ). - R. J. Mathar, May 23 2014
a(n) = (2/9)*(3*n+3+3*cos(2*(n-1)*Pi/3)-2*sqrt(3)*sin(2*(n-1)*Pi/3)). - Wesley Ivan Hurt, Sep 30 2017

A220747 a(n) = (2*n+1)!! / ((floor((n-1)/3)*2+1))!!

Original entry on oeis.org

1, 3, 15, 105, 315, 3465, 45045, 135135, 2297295, 43648605, 130945815, 3011753745, 75293843625, 225881530875, 6550564395375, 203067496256625, 609202488769875, 21322087106945625, 788917222956988125
Offset: 0

Views

Author

Johannes W. Meijer, Feb 26 2013

Keywords

Comments

The a(n) appear in the analysis of a sequence that is related to the Madhava-Gregory-Leibniz formula for Pi, see A166107.

Crossrefs

Programs

  • Maple
    A220747 := n -> doublefactorial(2*n+1)/doublefactorial(A130823(n)): A130823 := n -> floor((n-1)/3)*2+1: seq(A220747(n), n=0..20);
  • Mathematica
    Table[(2*n + 1)!!/((Floor[(n - 1)/3]*2 + 1))!!, {n, 0, 20}] (* T. D. Noe, Feb 26 2013 *)
    CoefficientList[Series[HypergeometricPFQ[{5/6, 7/6}, {1/3, 2/3}, 4 x^3] + 3/2 x (2 HypergeometricPFQ[{5/6, 7/6}, {2/3, 4/3}, 4 x^3] + 5x HypergeometricPFQ[{7/6, 11/6}, {4/3, 5/3}, 4 x^3]), {x, 0, 20}], x]*Range[0, 20]! (* Benedict W. J. Irwin, Oct 19 2016 *)

Formula

Limit_{n -> infinity} A166107(2*n)/a(2*n) = Pi.
Limit_{n -> infinity} A166107(2*n+1)/a(2*n+1) = -Pi.
E.g.f.: 2F2(5/6,7/6; 1/3,2/3; 4*x^3) + 3*x*(2F2(5/6,7/6; 2/3,4/3; 4*x^3) + 5*x*2F2(7/6,11/6; 4/3,5/3; 4*x^3)/2). - Benedict W. J. Irwin, Oct 19 2016

A329583 Numerators of 1 + n^2/4 + period 3: repeat [-1, 1, 1].

Original entry on oeis.org

0, 6, 3, 12, 6, 30, 9, 54, 18, 84, 27, 126, 36, 174, 51, 228, 66, 294, 81, 366, 102, 444, 123, 534, 144, 630, 171, 732, 198, 846, 225, 966, 258, 1092, 291, 1230, 324, 1374, 363, 1524, 402, 1686, 441, 1854, 486, 2028, 531, 2214, 576, 2406, 627
Offset: 0

Views

Author

Paul Curtz, Nov 17 2019

Keywords

Comments

First bisection is 3*A008810.

Crossrefs

Programs

  • Mathematica
    MapIndexed[#1 - 2 Boole[Mod[First@ #2, 3] == 1] + 1 &, CoefficientList[Series[(1 + 5 x - x^2 - 2 x^3 + 2 x^4 + 5 x^5)/(1 - x^2)^3, {x, 0, 44}], x]] (* Michael De Vlieger, Nov 18 2019 *)
  • PARI
    concat(0, Vec(3*x*(2 + 3*x + x^2 - 2*x^3 + x^4 + 3*x^5 + 2*x^6) / ((1 - x)^3*(1 + x)^3*(1 + x + x^2)) + O(x^40))) \\ Colin Barker, Nov 24 2019

Formula

a(n) = A261327(n) + A131561(n+2) = (n^2 + 4)*(5 - 3*(-1)^n)/8 + (-1)^((n+1) mod 3).
From Colin Barker, Nov 24 2019: (Start)
G.f.: 3*x*(2 + 3*x + x^2 - 2*x^3 + x^4 + 3*x^5 + 2*x^6) / ((1 - x)^3*(1 + x)^3*(1 + x + x^2)).
a(n) = -a(n-1) + 2*a(n-2) + 3*a(n-3) - 3*a(n-5) - 2*a(n-6) + a(n-7) + a(n-8) for n>8. (End)

Extensions

Incorrect 129 replaced with 123 by Colin Barker, Nov 24 2019

A226122 Expansion of (1+2*x+x^2+x^3+2*x^4+x^5)/(1-2*x^3+x^6).

Original entry on oeis.org

1, 2, 1, 3, 6, 3, 5, 10, 5, 7, 14, 7, 9, 18, 9, 11, 22, 11, 13, 26, 13, 15, 30, 15, 17, 34, 17, 19, 38, 19, 21, 42, 21, 23, 46, 23, 25, 50, 25, 27, 54, 27, 29, 58, 29, 31, 62, 31, 33, 66, 33, 35, 70, 35, 37, 74, 37, 39, 78, 39
Offset: 0

Views

Author

Paul Curtz, May 27 2013

Keywords

Comments

A226023 (starting from A226023(-2)=0) and successive differences:
0, -1, 0, 2, 3, 6, 12, 15, 20, 30,...
-1, 1, 2, 1, 3, 6, 3, 5, 10, 5,... = a(n-1)
2, 1, -1, 2, 3, -3, 2, 5, -5, 2,...
-1, -2, 3, 1, -6, 5, 3, -10, 7, 5,...
-1, 5, -2, -7, 11, -2, -13, 17, -2, -19,...
6, -7, -5, 18, -13, -11, 30, -19, -17, 42,...
-13, 2, 23, -31, 2, 41, -49, 2, 59, 67,...
15, 21, -54, 33, 39, -90, 51, 57, -126, 69,... multiples of 3
6, -75, 87, 6, -129, 141, 6, -183, 195, 6,... multiples of 3
-81, 162, -81, -135, 270, -135, -189, 378, -189, -243,... multiples of 27
The last line is -27*a(n+3)*A131561(n+1).
The recurrences in the Formula field hold for the array.

Examples

			Given A130823 = 1,1,1,3,3,3,5,5,5,7,7,7,... and A131534 = 1,2,1,1,2,1,1,2,1,1,2,1,..., then a(0)=1*1=1, a(1)=1*2=2, a(2)=1*1=1, a(3)=3*1=3, a(4)=3*2=6, etc.
Given A226023(n) from A226023(-1)=-1, then a(0)=0-(-1)=1, a(1)=2-0=2, a(2)=3-2=1, a(3)=6-3=3, a(4)=12-6=6, etc.
		

Crossrefs

Programs

  • Mathematica
    repeat=20; Table[{1, 2, 1}, {repeat}]*(2*Range[repeat]-1) // Flatten
    (* or *) Table[Floor[(2*n+1)/3]*Floor[(2*n+5)/3], {n, -1, 59}] // Differences (* Jean-François Alcover, May 29 2013 *)

Formula

a(n) = A130823(n-1) * A131534(n).
a(n) = A226023(n) - A226023(n-1) with A226023(-1)=-1.
a(n) = 3*a(n-3) -3*a(n-6) +a(n-9) = a(n-1) +2*a(n-3) -2*a(n-4) -a(n-6) +a(n-7). [Ralf Stephan]
From Bruno Berselli, May 29 2013: (Start)
G.f.: (1+x)^3*(1-x+x^2)/((1-x)^2*(1+x+x^2)^2).
a(n) = 2*a(n-3)-a(n-6).
a(3n)*a(3n-1)-a(3n-2) = A016754(n-1), n>0. (End)
Showing 1-8 of 8 results.