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.

A116591 a(n) = b(n+2) + b(n) with a(0) = 1, where b(n) = A005229(n) for n>2.

This page as a plain text file.
%I A116591 #20 Mar 29 2022 04:10:12
%S A116591 1,3,4,5,7,8,10,11,13,13,15,16,18,19,21,22,23,25,26,28,30,31,33,33,35,
%T A116591 36,37,39,39,41,42,44,46,47,49,50,51,53,54,56,57,59,59,60,61,62,64,66,
%U A116591 68,70,71,73,73,75,76,77,79,80,82,84,85,87,88,89,90,91,91,93,94,96,98
%N A116591 a(n) = b(n+2) + b(n) with a(0) = 1, where b(n) = A005229(n) for n>2.
%C A116591 A similar definition applied to the Fibonacci sequence (A000045) leads to the Lucas sequence (A000032).
%H A116591 G. C. Greubel, <a href="/A116591/b116591.txt">Table of n, a(n) for n = 0..5000</a>
%F A116591 a(n) = A005229(n+2) + A005229(n) for n>=1.
%p A116591 b:=proc(n) option remember; if n<=2 then 1 else b(b(n-2))+b(n-b(n-2)): fi: end: seq(b(n),n=1..75): a[0]:=1: for n from 1 to 70 do a[n]:=b(n)+b(n+2) od: seq(a[n],n=0..70);
%t A116591 M[n_]:= M[n]= If[n<3, 1 -Boole[n==0], M[M[n-2]] + M[n -M[n-2]]];
%t A116591 L[n_]:= L[n]= If[n==1, 1, M[n-1] + M[n+1]];
%t A116591 Table[L[n], {n, 100}] (* modified by _G. C. Greubel_, Mar 28 2022 *)
%o A116591 (Sage)
%o A116591 @CachedFunction
%o A116591 def b(n): # A005229
%o A116591     if (n<3): return 1
%o A116591     else: return b(b(n-2)) + b(n-b(n-2))
%o A116591 def A116591(n): return b(n+2) +b(n) -bool(n==0)
%o A116591 [A116591(n) for n in (0..100)] # _G. C. Greubel_, Mar 28 2022
%Y A116591 Cf. A000032, A005185, A005229.
%K A116591 nonn
%O A116591 0,2
%A A116591 _Roger L. Bagula_, Mar 27 2006
%E A116591 Edited by _N. J. A. Sloane_, Apr 15 2006