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.

A166519 a(n) = 1 + 2*(-1)^n + 2*n.

Original entry on oeis.org

3, 1, 7, 5, 11, 9, 15, 13, 19, 17, 23, 21, 27, 25, 31, 29, 35, 33, 39, 37, 43, 41, 47, 45, 51, 49, 55, 53, 59, 57, 63, 61, 67, 65, 71, 69, 75, 73, 79, 77, 83, 81, 87, 85, 91, 89, 95, 93, 99, 97, 103, 101, 107, 105, 111, 109, 115, 113, 119, 117, 123, 121, 127, 125, 131, 129, 135
Offset: 0

Views

Author

Vincenzo Librandi, Oct 16 2009

Keywords

Comments

Many pairs of primes of the form p+6 (5,11 - 13,19 - 17,23 - 37,43 - 41,47 - 53,59 - 61,67 - 73,79 - 97,103 - 101,107 - and so on).
a(n) is A005408(n) = 1+2*n swapped by pairs. - Paul Curtz, Mar 07 2011

Crossrefs

Cf. A005408.

Programs

Formula

a(n) = 4*n - a(n-1), n >= 1.
G.f.: ( 3-2*x+3*x^2 ) / ( (1+x)*(1-x)^2 ). - R. J. Mathar, Nov 02 2011
a(n) = a(n-1) + a(n-2) - a(n-3). - Vincenzo Librandi, Dec 01 2012
E.g.f.: (1 + 2*x)*exp(x) + 2*exp(-x). - G. C. Greubel, May 16 2016
Sum_{n>=0} (-1)^(n+1)/a(n) = Pi/4. - Amiram Eldar, Mar 02 2023