login
Numbers that are congruent to 2 or 7 mod 11.
1

%I #44 Sep 04 2022 21:01:55

%S 2,7,13,18,24,29,35,40,46,51,57,62,68,73,79,84,90,95,101,106,112,117,

%T 123,128,134,139,145,150,156,161,167,172,178,183,189,194,200,205,211,

%U 216,222,227,233,238,244,249,255,260,266,271,277,282,288,293,299,304,310

%N Numbers that are congruent to 2 or 7 mod 11.

%H Vincenzo Librandi, <a href="/A168465/b168465.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).

%F G.f.: x*(4*x^2 + 5*x + 2) / ((x+1)*(x-1)^2).

%F a(n) = (22*n - (-1)^n - 3)/4 - 3. [_Bruno Berselli_, Jan 05 2013, modified Jul 08 2015]

%F E.g.f.: 4 + ((22*x - 15)*exp(x) - exp(-x))/4. - _David Lovler_, Sep 04 2022

%t Select[Range[310],MemberQ[{2,7},Mod[#,11]]&] (* _Ray Chandler_, Jul 07 2015 *)

%t LinearRecurrence[{1,1,-1},{2,7,13},57] (* _Ray Chandler_, Jul 07 2015 *)

%t Rest[CoefficientList[Series[(4*x^2+5*x+2)*x/((x+1)*(x-1)^2),{x,0,57}],x]] (* _Ray Chandler_, Jul 07 2015 *)

%o (Magma) [(22*n-(-1)^n-3)/4-3: n in [1..60]]; // _Bruno Berselli_, Jul 08 2015

%o (PARI) a(n)=(22*n-(-1)^n-3)/4-3 \\ _Charles R Greathouse IV_, Jul 09 2015

%K nonn,easy

%O 1,1

%A _Vincenzo Librandi_, Nov 26 2009

%E Definition corrected by Editors of the OEIS, Jul 07 2015