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.

A227380 Doubling the first two of every four nonnegative numbers.

Original entry on oeis.org

0, 2, 2, 3, 8, 10, 6, 7, 16, 18, 10, 11, 24, 26, 14, 15, 32, 34, 18, 19, 40, 42, 22, 23, 48, 50, 26, 27, 56, 58, 30, 31, 64, 66, 34, 35, 72, 74, 38, 39, 80, 82, 42, 43, 88, 90, 46, 47, 96, 98, 50, 51, 104, 106, 54, 55, 112, 114
Offset: 0

Views

Author

Paul Curtz, Jul 09 2013

Keywords

Comments

a(n) and its differences:
0, 2, 2, 3, 8, 10, 6, 7, 16,...
2, 0, 1, 5, 2, -4, 1, 9, 2,...
-2, 1, 4, -3, -6, 5, 8, -7, -10,... see A103889(n)
3, 3, -7, -3, 11, 3, -15, -3, 19,...
0, -10, 4, 14, -8, -18, 12, 22, -16,...
-10, 14, 10,- 22, -10, 30, 10, -38, -10,... .
The inverse binomial transform is
b(n)=0, 2, -2, 3, 0, -10, 24, -28, 0, 72, -160, 176, 0,...
=(0, 1, -1, 1, 0, -1, 4, -4, 0, 4, -16, 16, 0,...) * a(n).

Crossrefs

Cf. A001477.

Programs

  • Mathematica
    {2#[[1]],2#[[2]],#[[3]],#[[4]]}&/@Partition[Range[0,60],4]//Flatten (* or *) LinearRecurrence[{2,-3,4,-3,2,-1},{0,2,2,3,8,10},60] (* Harvey P. Dale, Dec 14 2021 *)

Formula

a(n) = n*A130658(n+2) = 2*A227316(n)/(n+1).
a(n) - a(n-4) = period 4:repeat 8, 8, 4, 4 = 4*A130658(n+2).
G.f.: (x^5 + 5*x^3 - 2*x^2 + 2*x)/((1-x)^2 * (1+x^2)^2). - Ralf Stephan, Jul 13 2013

A288994 a(n) = n*(n+3) when n is congruent to 0 or 3 (mod 4), and n*(n+3)/2 otherwise.

Original entry on oeis.org

0, 2, 5, 18, 28, 20, 27, 70, 88, 54, 65, 154, 180, 104, 119, 270, 304, 170, 189, 418, 460, 252, 275, 598, 648, 350, 377, 810, 868, 464, 495, 1054, 1120, 594, 629, 1330, 1404, 740, 779, 1638, 1720, 902, 945, 1978, 2068, 1080, 1127, 2350, 2448, 1274, 1325
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := n (n+3) Switch[Mod[n, 4], 0|3, 1, _, 1/2]; Table[a[n], {n, 0, 50}]
    Table[If[MemberQ[{0,3},Mod[n,4]],n(n+3),(n(n+3))/2],{n,0,50}] (* or *) LinearRecurrence[{3,-6,10,-12,12,-10,6,-3,1},{0,2,5,18,28,20,27,70,88},60] (* Harvey P. Dale, Jun 05 2021 *)
  • PARI
    concat(0, Vec(x*(2 - x + 15*x^2 - 16*x^3 + 18*x^4 - 9*x^5 + 5*x^6 - 2*x^7) / ((1 - x)^3*(1 + x^2)^3) + O(x^60))) \\ Colin Barker, Jun 21 2017
    
  • PARI
    i=I; a(n) = (1/8 + i/8)*(((3 - 3*i) - i*(-i)^n + i^n)*n*(3 + n)) \\ Colin Barker, Jun 21 2017

Formula

a(n) = n*(n+3)/2 * (2 - floor((n+1)/2) mod 2), where n*(n+3)/2 is A000096(n).
a(n) = A060819(n+3)*A145979(n-2).
a(n) = (2*n*(n+3))/(GCD(4, n+2)*GCD(4, n+3)).
a(n) = A227316(n+1) - (period 4 repeat 2,1,1,2).
From Colin Barker, Jun 21 2017: (Start)
G.f.: x*(2 - x + 15*x^2 - 16*x^3 + 18*x^4 - 9*x^5 + 5*x^6 - 2*x^7) / ((1 - x)^3*(1 + x^2)^3).
a(n) = (1/8 + i/8)*(((3 - 3*i) - i*(-i)^n + i^n)*n*(3 + n)), where i=sqrt(-1). (End)
Sum_{n>=1} 1/a(n) = 17/18 + log(2)/6. - Amiram Eldar, Aug 12 2022
Showing 1-2 of 2 results.