cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A359502 #27 Jan 05 2023 18:40:38
%S A359502 0,1,2,4,9,26,108,785,12450,628676,155631177,395389144154,
%T A359502 24221458643549484,156332599536291235925201,
%U A359502 586679058977510608947573592591458,24439881677774993432884951095586547256059481860
%N A359502 a(n) = a(n-2)^2 + a(n-1) + 1 for n >= 2 with a(0) = 0 and a(1) = 1.
%t A359502 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 A359502 (Python)
%o A359502 # a generator
%o A359502 def agen_q():
%o A359502     a, b = 0, 1
%o A359502     while 1:
%o A359502         yield a
%o A359502         a, b = b, (a * a) + b + 1
%o A359502 f = agen_q(); print([next(f) for _ in range(20)])
%Y A359502 Cf. A000278, A000283.
%K A359502 nonn
%O A359502 0,3
%A A359502 _Andrew Wall_, Jan 03 2023