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

 


a(4n) = 4n, otherwise a(n) = 1.
2

%I #27 Dec 06 2022 07:58:57

%S 0,1,1,1,4,1,1,1,8,1,1,1,12,1,1,1,16,1,1,1,20,1,1,1,24,1,1,1,28,1,1,1,

%T 32,1,1,1,36,1,1,1,40,1,1,1,44,1,1,1,48,1,1,1,52,1,1,1,56,1,1,1,60,1,

%U 1,1,64,1,1,1,68,1,1,1,72,1,1,1,76,1,1,1,80,1,1,1,84,1,1,1,88,1,1,1,92,1,1,1

%N a(4n) = 4n, otherwise a(n) = 1.

%H Antti Karttunen, <a href="/A088440/b088440.txt">Table of n, a(n) for n = 0..65537</a>

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

%F a(n) = 1+(n-1)*((1+(-1)^(n/2))*(1+(-1)^n))/4. - _Wesley Ivan Hurt_, May 07 2021

%F G.f.: x*(1 + x + x^2 + 4*x^3 - x^4 - x^5 - x^6)/(1-x^4)^2. - _Georg Fischer_, Nov 17 2022

%F E.g.f.: (1/2)*( cosh(x) + (x+2)*sinh(x) - cos(x) - x*sin(x) ). - _G. C. Greubel_, Dec 05 2022

%t Array[1 + (# - 1)*((1 + (-1)^(#/2))*(1 + (-1)^#))/4 &, 96, 0] (* _Michael De Vlieger_, May 07 2021 *)

%o (PARI) A088440(n) = if((n%4),1,n); \\ _Antti Karttunen_, Jul 03 2018

%o (Magma)

%o A088440:= func< n | n mod 4 eq 0 select n else 1>;

%o [A088440(n): n in [0..120]]; // _G. C. Greubel_, Dec 05 2022

%o (SageMath)

%o def A088440(n): return 1 if (n%4) else n

%o [A088440(n) for n in range(121)] # _G. C. Greubel_, Dec 05 2022

%Y Cf. A088140.

%K nonn,easy

%O 0,5

%A _Roger L. Bagula_, Nov 09 2003

%E Description corrected by _Antti Karttunen_, Jul 03 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 23 21:52 EDT 2024. Contains 376183 sequences. (Running on oeis4.)