login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A227144 Numbers that are congruent to {1, 2, 7, 17, 23} modulo 24. 4

%I #15 Sep 08 2022 08:46:05

%S 1,2,7,17,23,25,26,31,41,47,49,50,55,65,71,73,74,79,89,95,97,98,103,

%T 113,119,121,122,127,137,143,145,146,151,161,167,169,170,175,185,191,

%U 193,194,199,209,215,217,218,223,233,239,241,242,247,257,263,265,266

%N Numbers that are congruent to {1, 2, 7, 17, 23} modulo 24.

%C A089911(a(n)) = 1.

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

%F G.f.: x*(1+x)*(x^4+5*x^3+5*x^2+1) / ( (x^4+x^3+x^2+x+1)*(x-1)^2 ). - _R. J. Mathar_, Jul 17 2013

%F From _Wesley Ivan Hurt_, Dec 26 2016: (Start)

%F a(n) = a(n-1) + a(n-5) - a(n-6) for n > 6.

%F a(n) = (120*n - 110 - 6*(n mod 5) - 26*((n+1) mod 5) - ((n+2) mod 5) + 19*((n+3) mod 5) + 14*((n+4) mod 5))/25.

%F a(5k) = 24k-1, a(5k-1) = 24k-7, a(5k-2) = 24k-17, a(5k-3) = 24k-22, a(5k-4) = 24k-23. (End)

%p A227144:=n->24*floor(n/5)+[1, 2, 7, 17, 23][(n mod 5)+1]: seq(A227144(n), n=0..100); # _Wesley Ivan Hurt_, Dec 26 2016

%t Select[Range[500], MemberQ[{1, 2, 7, 17, 23}, Mod[#, 24]] &] (* _Wesley Ivan Hurt_, Dec 26 2016 *)

%t LinearRecurrence[{1,0,0,0,1,-1},{1,2,7,17,23,25},60] (* _Harvey P. Dale_, Dec 18 2019 *)

%o (Haskell)

%o a227144 n = a227144_list !! (n-1)

%o a227144_list = [1,2,7,17,23] ++ map (+ 24) a227144_list

%o (Magma) [n : n in [0..300] | n mod 24 in [1, 2, 7, 17, 23]]; // _Wesley Ivan Hurt_, Dec 26 2016

%o (PARI) Vec(x*(1+x)*(x^4 +5*x^3 +5*x^2 +1)/((x^4 +x^3 +x^2 +x +1)*(x-1)^2) + O(x^50)) \\ _G. C. Greubel_, Dec 26 2016

%Y Cf. A004771, A089911, A227146.

%K nonn,easy

%O 1,2

%A _Reinhard Zumkeller_, Jul 05 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 16:34 EDT 2024. Contains 371254 sequences. (Running on oeis4.)