login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A088440
a(4n) = 4n, otherwise a(n) = 1.
2
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, 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, 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
OFFSET
0,5
FORMULA
a(n) = 1+(n-1)*((1+(-1)^(n/2))*(1+(-1)^n))/4. - Wesley Ivan Hurt, May 07 2021
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
E.g.f.: (1/2)*( cosh(x) + (x+2)*sinh(x) - cos(x) - x*sin(x) ). - G. C. Greubel, Dec 05 2022
MATHEMATICA
Array[1 + (# - 1)*((1 + (-1)^(#/2))*(1 + (-1)^#))/4 &, 96, 0] (* Michael De Vlieger, May 07 2021 *)
PROG
(PARI) A088440(n) = if((n%4), 1, n); \\ Antti Karttunen, Jul 03 2018
(Magma)
A088440:= func< n | n mod 4 eq 0 select n else 1>;
[A088440(n): n in [0..120]]; // G. C. Greubel, Dec 05 2022
(SageMath)
def A088440(n): return 1 if (n%4) else n
[A088440(n) for n in range(121)] # G. C. Greubel, Dec 05 2022
CROSSREFS
Cf. A088140.
Sequence in context: A074058 A308552 A368333 * A300253 A212173 A366993
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Nov 09 2003
EXTENSIONS
Description corrected by Antti Karttunen, Jul 03 2018
STATUS
approved