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!)
A344935 a(0)=1; for n > 0, a(n) = n*(a(n-1) + i^(n-1)) if n is odd, n*a(n-1) + i^n otherwise, where i = sqrt(-1). 0
1, 2, 3, 6, 25, 130, 779, 5446, 43569, 392130, 3921299, 43134278, 517611337, 6728947394, 94205263515, 1413078952710, 22609263243361, 384357475137154, 6918434552468771, 131450256496906630, 2629005129938132601, 55209107728700784642, 1214600370031417262123 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Table of n, a(n) for n=0..22.

FORMULA

E.g.f.: (1+x)*cos(x)/(1-x).

Lim_{n->infinity} a(n)/n! = 2*cos(1) = 2*A049470.

EXAMPLE

a(0) = 1;

a(1) = 1*(a(0) + i^(1-1)) =  2;

a(2) = 2*a(1)  + i^2      =  3;

a(3) = 3*(a(2) + i^2)     =  6;

a(4) = 4*a(3)  + i^4      = 25.

MATHEMATICA

a[0] = 1; a[n_] := a[n] = If[OddQ[n], n*(a[n - 1] + I^(n - 1)), n*a[n - 1] + I^n]; Array[a, 30, 0] (* Amiram Eldar, Jun 03 2021 *)

PROG

(PARI) a(n) = if (n==0, 1, if (n%2, n*(a(n-1) + I^(n-1)), n*a(n-1) + I^n)); \\ Michel Marcus, Jun 05 2021

CROSSREFS

Cf. A344262, A344419, A049470, A009001.

Sequence in context: A063728 A333420 A296259 * A000341 A144857 A090445

Adjacent sequences:  A344932 A344933 A344934 * A344936 A344937 A344938

KEYWORD

nonn

AUTHOR

Amrit Awasthi, Jun 03 2021

STATUS

approved

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 July 4 22:49 EDT 2022. Contains 355086 sequences. (Running on oeis4.)