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
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, 36, 37, 39, 39, 41, 42, 44, 46, 47, 49, 50, 51, 53, 54, 56, 57, 59, 59, 60, 61, 62, 64, 66, 68, 70, 71, 73, 73, 75, 76, 77, 79, 80, 82, 84, 85, 87, 88, 89, 90, 91, 91, 93, 94, 96, 98 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
A similar definition applied to the Fibonacci sequence (A000045) leads to the Lucas sequence (A000032).
LINKS
FORMULA
a(n) = A005229(n+2) + A005229(n) for n>=1.
MAPLE
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);
MATHEMATICA
M[n_]:= M[n]= If[n<3, 1 -Boole[n==0], M[M[n-2]] + M[n -M[n-2]]];
L[n_]:= L[n]= If[n==1, 1, M[n-1] + M[n+1]];
Table[L[n], {n, 100}] (* modified by G. C. Greubel, Mar 28 2022 *)
PROG
(Sage)
@CachedFunction
def b(n): # A005229
if (n<3): return 1
else: return b(b(n-2)) + b(n-b(n-2))
def A116591(n): return b(n+2) +b(n) -bool(n==0)
[A116591(n) for n in (0..100)] # G. C. Greubel, Mar 28 2022
CROSSREFS
Sequence in context: A047367 A184620 A039043 * A136119 A184618 A110882
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Mar 27 2006
EXTENSIONS
Edited by N. J. A. Sloane, Apr 15 2006
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:41 EDT 2024. Contains 371964 sequences. (Running on oeis4.)