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!)
A047535 Numbers that are congruent to {4, 7} mod 8. 17

%I #42 Mar 30 2024 11:38:39

%S 4,7,12,15,20,23,28,31,36,39,44,47,52,55,60,63,68,71,76,79,84,87,92,

%T 95,100,103,108,111,116,119,124,127,132,135,140,143,148,151,156,159,

%U 164,167,172,175,180,183,188,191,196,199,204,207,212,215,220,223,228,231

%N Numbers that are congruent to {4, 7} mod 8.

%C Union of A004771 and A017113.

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

%F a(n) = 8*n - a(n-1) - 5 (with a(1)=4). - _Vincenzo Librandi_, Aug 06 2010

%F a(n) = 4*n -(1 + (-1)^n)/2. - _Arkadiusz Wesolowski_, Sep 18 2012

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

%F From _Franck Maminirina Ramaharo_, Jul 22 2018: (Start)

%F a(n) = A047470(n) + 4.

%F E.g.f.: (2 - exp(-x) + (8*x - 1)*exp(x))/2. (End)

%F Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)+1)*Pi/16 - log(2)/4 - sqrt(2)*log(sqrt(2)+1)/8. - _Amiram Eldar_, Dec 11 2021

%p A047535:=n->4*n - (1 + (-1)^n)/2; seq(A047535(n), n=1..100); # _Wesley Ivan Hurt_, Feb 24 2014

%t Table[4n - (1 + (-1)^n)/2, {n, 100}] (* _Wesley Ivan Hurt_, Feb 24 2014 *)

%o (Maxima) makelist(4*n - (1 + (-1)^n)/2, n, 1, 100); /* _Franck Maminirina Ramaharo_, Jul 22 2018 */

%o (Python)

%o def A047535(n): return (n<<2)-(n&1^1) # _Chai Wah Wu_, Mar 30 2024

%Y Cf. A004771, A017113, A047398, A047461, A047452, A047470, A047524, A047615, A047617.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_

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 April 24 15:18 EDT 2024. Contains 371960 sequences. (Running on oeis4.)