OFFSET
1,1
LINKS
Danny Rorabaugh, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = 2*(6*n + (-1)^n - 3).
A259748(a(n))/a(n) = 3/4.
a(n) = 4*A007310(n). - Michel Marcus, Sep 22 2015
G.f.: 4*x*(1 + 4*x + x^2) / ((1 + x)*(1 - x)^2). - Bruno Berselli, Oct 23 2015
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(3)*Pi/24. - Amiram Eldar, Dec 31 2021
E.g.f.: 2*(2 + (6*x - 3)*exp(x) + exp(-x)). - David Lovler, Sep 05 2022
MATHEMATICA
A[n_] := A[n] = Sum[a b, {a, 1, n}, {b, a + 1, n}]; Select[Range[200], Mod[A[#], #]/# == 3/4 &]
Table[2 (6 n + (-1)^n - 3), {n, 1, 60}] (* Bruno Berselli, Oct 23 2015 *)
LinearRecurrence[{1, 1, -1}, {4, 20, 28}, 60] (* Harvey P. Dale, Jul 19 2016 *)
PROG
(Magma) [2*(6*n+(-1)^n-3): n in [1..60]]; // Vincenzo Librandi, Aug 27 2015
(PARI) vector(100, n, 2*(6*n+(-1)^n-3)) \\ Altug Alkan, Oct 23 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
José María Grau Ribas, Jul 18 2015
EXTENSIONS
Better name from Danny Rorabaugh, Oct 22 2015
STATUS
approved