%I #45 Mar 15 2018 06:18:05
%S 7,14,63,64,215,174,511,368,999,670,1727,1104,2743,1694,4095,2464,
%T 5831,3438,7999,4640,10647,6094,13823,7824,17575,9854,21951,12208,
%U 26999,14910,32767,17984,39303,21454,46655,25344,54871,29678,63999,34480,74087,39774,85183
%N a(n) is the least k > n such that n divides k, and n+1 divides k+1, and n+2 divides k+2.
%H Robert G. Wilson v, <a href="/A295388/b295388.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0, 4, 0, -6, 0, 4, 0, -1).
%F a(2n-1) = 8*n^3 - 1.
%F a(2n) = 4*n^3 + 6*n^2 + 4*n.
%F G.f.: (7 + 14*x + 35*x^2 + 8*x^3 + 5*x^4 + 2*x^5 + x^6)/(x^2 - 1)^4.
%e 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.
%t 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 *)
%t CoefficientList[ Series[(7 + 14x + 35x^2 + 8x^3 + 5 x^4 + 2x^5 + x^6)/(x^2 - 1)^4, {x, 0, 50}], x] (* or *)
%t LinearRecurrence[{0, 4, 0, -6, 0, 4, 0, -1}, {7, 14, 63, 64, 215, 174,
%t 511, 368}, 50] (* _Robert G. Wilson v_, Feb 12 2018 *)
%o (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
%Y Cf. A005563 (with only: n divides k, and n+1 divides k+1).
%K nonn,easy
%O 1,1
%A _Alex Ratushnyak_, Feb 03 2018
|