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!)
A359502 a(n) = a(n-2)^2 + a(n-1) + 1 for n >= 2 with a(0) = 0 and a(1) = 1. 0

%I #27 Jan 05 2023 18:40:38

%S 0,1,2,4,9,26,108,785,12450,628676,155631177,395389144154,

%T 24221458643549484,156332599536291235925201,

%U 586679058977510608947573592591458,24439881677774993432884951095586547256059481860

%N a(n) = a(n-2)^2 + a(n-1) + 1 for n >= 2 with a(0) = 0 and a(1) = 1.

%t a[0] = 0; a[1] = 1; a[n_] := a[n] = a[n - 2]^2 + a[n - 1] + 1; Array[a, 16, 0] (* _Amiram Eldar_, Jan 05 2023 *)

%o (Python)

%o # a generator

%o def agen_q():

%o a, b = 0, 1

%o while 1:

%o yield a

%o a, b = b, (a * a) + b + 1

%o f = agen_q(); print([next(f) for _ in range(20)])

%Y Cf. A000278, A000283.

%K nonn

%O 0,3

%A _Andrew Wall_, Jan 03 2023

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 August 13 09:13 EDT 2024. Contains 375130 sequences. (Running on oeis4.)