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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A356891 a(n) = a(n-1) * a(n-2) + 1 if n is even, otherwise a(n) = a(n-3) + 1, with a(0) = a(1) = 1. 1
 1, 1, 2, 2, 5, 3, 16, 6, 97, 17, 1650, 98, 161701, 1651, 266968352, 161702, 43169316455105, 266968353, 11524841314155180292066, 43169316455106, 497519521785644682185076928856988997, 11524841314155180292067 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS J. Conrad, Table of n, a(n) for n = 0..34 EXAMPLE For n=2, a(2) = a(0) * a(1) + 1 = 2. For n=3, a(3) = a(0) + 1 = 2. For n=4, a(4) = a(3) * a(2) + 1 = 5. MATHEMATICA a[n_] := a[n] = If[EvenQ[n], a[n - 1]*a[n - 2], a[n - 3]] + 1; a[0] = a[1] = 1; Array[a, 22, 0] (* Amiram Eldar, Sep 10 2022 *) PROG (Python) def A356891(length): output = [1] * length for n in range(2, length): output[n] += output[n-3] if n % 2 else output[n-1] * output[n-2] return output CROSSREFS Cf. A007660. Sequence in context: A344507 A322786 A184243 * A135281 A068465 A217876 Adjacent sequences: A356888 A356889 A356890 * A356892 A356893 A356894 KEYWORD nonn AUTHOR J. Conrad, Sep 02 2022 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.

Last modified February 5 03:48 EST 2023. Contains 360082 sequences. (Running on oeis4.)