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!)
A116591 a(n) = b(n+2) + b(n) with a(0) = 1, where b(n) = A005229(n) for n>2. 2

%I #20 Mar 29 2022 04:10:12

%S 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 36,37,39,39,41,42,44,46,47,49,50,51,53,54,56,57,59,59,60,61,62,64,66,

%U 68,70,71,73,73,75,76,77,79,80,82,84,85,87,88,89,90,91,91,93,94,96,98

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

%C A similar definition applied to the Fibonacci sequence (A000045) leads to the Lucas sequence (A000032).

%H G. C. Greubel, <a href="/A116591/b116591.txt">Table of n, a(n) for n = 0..5000</a>

%F a(n) = A005229(n+2) + A005229(n) for n>=1.

%p 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 M[n_]:= M[n]= If[n<3, 1 -Boole[n==0], M[M[n-2]] + M[n -M[n-2]]];

%t L[n_]:= L[n]= If[n==1, 1, M[n-1] + M[n+1]];

%t Table[L[n], {n, 100}] (* modified by _G. C. Greubel_, Mar 28 2022 *)

%o (Sage)

%o @CachedFunction

%o def b(n): # A005229

%o if (n<3): return 1

%o else: return b(b(n-2)) + b(n-b(n-2))

%o def A116591(n): return b(n+2) +b(n) -bool(n==0)

%o [A116591(n) for n in (0..100)] # _G. C. Greubel_, Mar 28 2022

%Y Cf. A000032, A005185, A005229.

%K nonn

%O 0,2

%A _Roger L. Bagula_, Mar 27 2006

%E Edited by _N. J. A. Sloane_, Apr 15 2006

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 April 25 13:12 EDT 2024. Contains 371969 sequences. (Running on oeis4.)