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.

A227316 a(n) = n(n+1) if n == 0 or 1 (mod 4), otherwise a(n) = n(n+1)/2.

Original entry on oeis.org

0, 2, 3, 6, 20, 30, 21, 28, 72, 90, 55, 66, 156, 182, 105, 120, 272, 306, 171, 190, 420, 462, 253, 276, 600, 650, 351, 378, 812, 870, 465, 496, 1056, 1122, 595, 630, 1332, 1406, 741, 780, 1640, 1722, 903, 946, 1980, 2070, 1081, 1128
Offset: 0

Views

Author

Paul Curtz, Jul 06 2013

Keywords

Examples

			a(0) = 2*0 = 0, a(1) = 2*1 = 2, a(2) = 1*3 = 3, a(3) = 1*6 = 6, a(4) = 2*10 = 20.
		

Crossrefs

Cf. A000217, A002378, A130658, A169642 (first bisection), A176743, A109043, A227380.

Programs

  • Magma
    [(3+(-1)^Floor(n/2))*n*(n+1)/4: n in [0..50]]; // Bruno Berselli, Jul 10 2013
  • Mathematica
    a[n_] := n*(n+1)/4*GCD[n-1, 4]*GCD[n, 4]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 10 2013 *)
    Table[If[Mod[n,4]<2,n(n+1),(n(n+1))/2],{n,0,50}] (* or *) LinearRecurrence[ {3,-6,10,-12,12,-10,6,-3,1},{0,2,3,6,20,30,21,28,72},50] (* Harvey P. Dale, Aug 26 2016 *)

Formula

a(n) = A130658(n+2)*A000217(n), a(-n-1) = A130658(n)*A000217(n).
a(2n) = A169642(n), a(2n+1) = 2*(2*n+1)*A026741(n+1).
a(n) = A176743(n-2)*A176743(n-1).
a(n) = A177002(n+2)*A064038(n+1).
a(n) = 3*a(n-1) -6*a(n-2) +10*a(n-3) -12*a(n-4) +12*a(n-5) -10*(n-6) +6*(n-7) -3*a(n-8) +a(n-9) = 3*a(n-4) -3*a(n-8) +a(n-12).
G.f.: x*(2-3*x+9*x^2+3*x^5+x^6)/((1-x)^3*(1+x^2)^3). - Bruno Berselli, Jul 10 2013
a(n) = (3+(-1)^floor(n/2))*n*(n+1)/4. - Bruno Berselli, Jul 10 2013
Sum_{n>=1} 1/a(n) = 1 + log(2)/2. - Amiram Eldar, Aug 12 2022

A266491 a(n) = n*A130658(n).

Original entry on oeis.org

0, 1, 4, 6, 4, 5, 12, 14, 8, 9, 20, 22, 12, 13, 28, 30, 16, 17, 36, 38, 20, 21, 44, 46, 24, 25, 52, 54, 28, 29, 60, 62, 32, 33, 68, 70, 36, 37, 76, 78, 40, 41, 84, 86, 44, 45, 92, 94, 48, 49, 100, 102, 52, 53, 108, 110, 56, 57, 116, 118, 60, 61, 124, 126, 64
Offset: 0

Views

Author

Paul Curtz, Dec 30 2015

Keywords

Comments

Successive differences:
r(0): 0, 1, 4, 6, 4, 5, 12, 14, ...
r(1): 1, 3, 2, -2, 1, 7, 2, -6, ...
r(2): 2, -1, -4, 3, 6, -5, -8, 7, ... (see A103889)
r(3): -3, -3, 7, 3, -11, -3, 15, 3, ...
r(4): 0, 10, -4, -14, 8, 18, -12, -22, ...
r(5): 10, -14, -10, 22, 10, -30, -10, 38, ...
r(6): -24, 4, 32, -12, -40, 20, 48, -28, ...
r(7): 28, 28, -44, -28, 60, 28, -76, -28, ...
r(8): 0, -72, 16, 88, -32, -104, 48, 120, ...
r(9): -72, 88, 72, -120, -72, 152, 72, -184, ...
r(10): 160, -16, -192, 48, 224, -80, -256, 112, ...
etc.
Let b(n) = 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 16, 16, ..., with n>=0, which is formed from the terms of A011782 repeated twice.
Conjecture: all terms of the row r(i) are divisible by b(i).
Conjecture: the terms of the first column divided by b(n) provide 0, 1, 2, -3, 0, 5, -6, 7, 0, -9, 10, -11, ..., the absolute values of which are listed in A190621.

Crossrefs

Programs

  • Magma
    [n*(3-(-1)^((n-1)*n div 2))/2: n in [0..70]]; // Vincenzo Librandi, Jan 08 2016
  • Mathematica
    Table[n (3 - (-1)^((n - 1) n/2))/2, {n, 0, 55}]
    Table[n (Boole@ OddQ@ Floor[n/2] + 1), {n, 0, 55}] (* or *) Table[SeriesCoefficient[x (3/(1 - x)^2 + 2 x/(1 + x^2)^2 - (1 - x^2)/(1 + x^2)^2)/2, {x, 0, n}], {n, 0, 55}] (* Michael De Vlieger, Jan 04 2016 *)
  • PARI
    vector(60, n, n--; n*(3-(-1)^((n-1)*n/2))/2) \\ Altug Alkan, Jan 04 2016
    

Formula

a(n) = n*(3 - (-1)^((n-1)*n/2))/2.
a(n) = a(n-4) + 4*A130658(n) for n>3.
a(n) = 2*a(n-1) -3*a(n-2) +4*a(n-3) -3*(n-4) +2*a(n-5) -a(n-6) for n>5.
G.f.: x*(3/(1 - x)^2 + 2*x/(1 + x^2)^2 - (1 - x^2)/(1 + x^2)^2)/2. - Michael De Vlieger, Jan 04 2016

Extensions

Edited by Bruno Berselli, Jan 07 2016
Showing 1-2 of 2 results.