|
|
A166519
|
|
a(n) = 1 + 2*(-1)^n + 2*n.
|
|
7
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
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).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 4*n - a(n-1), n>=1.
G.f.: ( 3-2*x+3*x^2 ) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Nov 02 2011
E.g.f.: (2*x + 1)*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
|
|
MATHEMATICA
|
LinearRecurrence[{1, 1, -1}, {3, 1, 7}, 70] (* Harvey P. Dale, Jan 16 2023 *)
|
|
PROG
|
(PARI) vector(100, n, n--; 1 + 2*(-1)^n + 2*n) \\ Altug Alkan, Oct 19 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|