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.

A177704 Period 4: repeat [1, 1, 1, 2].

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1
Offset: 0

Views

Author

Klaus Brockhaus, May 11 2010

Keywords

Comments

Continued fraction expansion of (3 + 2*sqrt(6))/5.
Decimal expansion of 1112/9999.
a(n) = A164115(n + 1) = (-1)^(n + 1) * A164117(n + 1) = A138191(n + 3) = A107453(n + 5).

Crossrefs

Programs

  • Magma
    &cat[ [1, 1, 1, 2]: k in [1..27] ];
    
  • Maple
    A177704:=n->floor((n+1)*5/4) - floor(n*5/4): seq(A177704(n), n=0..100); # Wesley Ivan Hurt, Jun 15 2016
  • Mathematica
    Table[Floor[(n + 1)*5/4] - Floor[n*5/4], {n, 0, 100}] (* Wesley Ivan Hurt, Jun 15 2016 *)
    LinearRecurrence[{0, 0, 0, 1}, {1, 1, 1, 2}, 100] (* Vincenzo Librandi, Jun 16 2016 *)
  • PARI
    a(n) = if(n%4==3, 2, 1) \\ Felix Fröhlich, Jun 15 2016

Formula

a(n) = (5-(-1)^n + i*i^n-i*(-i)^n)/4 where i = sqrt(-1).
a(n) = a(n-4) for n > 3; a(0) = 1, a(1) = 1, a(2) = 1, a(3) = 2.
G.f.: (1+x+x^2+2*x^3)/(1-x^4).
a(n) = 1 + (1-(-1)^n) * (1+i^(n+1))/4 where i = sqrt(-1). - Bruno Berselli, Apr 05 2011
a(n) = 5/4 - sin(Pi*n/2)/2 - (-1)^n/4. - R. J. Mathar, Oct 08 2011
a(n) = floor((n+1)*5/4) - floor(n*5/4). - Hailey R. Olafson, Jul 23 2014
From Wesley Ivan Hurt, Jun 15 2016: (Start)
a(n+3) - a(n+2) = A219977(n).
Sum_{i=0..n-1} a(i) = A001068(n). (End)
E.g.f.: (-sin(x) + 3*sinh(x) + 2*cosh(x))/2. - Ilya Gutkovskiy, Jun 15 2016

A276670 Numerator of (n-1)*n*(n+1)/4.

Original entry on oeis.org

0, 0, 3, 6, 15, 30, 105, 84, 126, 180, 495, 330, 429, 546, 1365, 840, 1020, 1224, 2907, 1710, 1995, 2310, 5313, 3036, 3450, 3900, 8775, 4914, 5481, 6090, 13485, 7440, 8184, 8976, 19635, 10710, 11655, 12654, 27417, 14820, 15990, 17220, 37023, 19866, 21285
Offset: 0

Views

Author

Paul Curtz, Oct 05 2016

Keywords

Comments

Consider the sequence [2/(n+1), autosequence of the second kind] (see A003506), and its successive differences:
2, 1, 2/3, 1/2, 2/5, 1/3, 2/7, 1/4, 2/9, ... (see A026741)
-1, -1/3, -1/6, -1/10, -1/15, -1/21, -1/28, -1/36, -1/45, ... (see A000217)
2/3, 1/6, 1/15, 1/30, 2/105, 1/84, 1/126, 1/180, 2/495, ...
...
Each fraction in the third row is essentially the reciprocal of (n-1)*n*(n+1)/4 (3/2, 6, 15, 30, 105/2, ... ).
The numbers (= 3*A138190) are divisible by
1) -1, 1, 1, 1, 3, 2, 5, 3, 7, ... hence f(n) = 0, 0, 3, 6, 5, 15, 21, 28, 18, ...
2) 1, 1, 3, 3, 5, 5, 7, 7, 9, ... hence g(n) = 0, 0, 1, 2, 3, 6, 15, 12, 14, ...

Crossrefs

Programs

  • Maple
    seq(numer((n^3-n)/4), n=0..100); # Robert Israel, Oct 05 2016
  • Mathematica
    f[n_] := Numerator[(n - 1) n (n + 1)/4]; Array[f, 40, 0] (* Robert G. Wilson v, Oct 05 2016 *)
  • PARI
    concat(vector(2), Vec(3*x^2*(1 +2*x +5*x^2 +10*x^3 +31*x^4 +20*x^5 +22*x^6 +20*x^7 +31*x^8 +10*x^9 +5*x^10 +2*x^11 +x^12) / ((1 -x)^4*(1 +x)^4*(1 +x^2)^4) + O(x^30))) \\ Colin Barker, Oct 09 2016

Formula

a(n) = 3*A138190(n), for n>=1.
a(n) = 4*a(n-4) - 6*a(n-8) + 4*a(n-12) - a(n-16).
a(n) = A007531(n+1)/2 if n == 2 (mod 4), otherwise a(n) = A007531(n+1)/4. - Robert Israel, Oct 05 2016
G.f.: 3*x^2*(1 +2*x +5*x^2 +10*x^3 +31*x^4 +20*x^5 +22*x^6 +20*x^7 +31*x^8 +10*x^9 +5*x^10 +2*x^11 +x^12) / ((1 -x)^4*(1 +x)^4*(1 +x^2)^4). - Colin Barker, Oct 09 2016
Sum_{n>=2} 1/a(n) = 1 - log(2)/2. - Amiram Eldar, Aug 13 2022

Extensions

More terms from Robert G. Wilson v, Oct 05 2016
Showing 1-2 of 2 results.