OFFSET
1,1
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0, 4, 0, -6, 0, 4, 0, -1).
FORMULA
a(2n-1) = 8*n^3 - 1.
a(2n) = 4*n^3 + 6*n^2 + 4*n.
G.f.: (7 + 14*x + 35*x^2 + 8*x^3 + 5*x^4 + 2*x^5 + x^6)/(x^2 - 1)^4.
EXAMPLE
999 is the smallest integer k > 9 such that 9 divides k, 10 divides k+1, and 11 divides k+2. Therefore a(9)=999.
MATHEMATICA
f[n_] := Block[{k = 2 n}, While[ Mod[{k, k +1, k +2}, {n, n +1, n +2}] != {0, 0, 0}, k += n]; k]; Array[f, 45] (* or *)
CoefficientList[ Series[(7 + 14x + 35x^2 + 8x^3 + 5 x^4 + 2x^5 + x^6)/(x^2 - 1)^4, {x, 0, 50}], x] (* or *)
LinearRecurrence[{0, 4, 0, -6, 0, 4, 0, -1}, {7, 14, 63, 64, 215, 174,
511, 368}, 50] (* Robert G. Wilson v, Feb 12 2018 *)
PROG
(PARI) a(n) = {my(k=n+1); while ((k % n) || ((k+1) % (n+1)) || ((k+2) % (n+2)), k++); k; } \\ Michel Marcus, Feb 12 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Feb 03 2018
STATUS
approved