A112237
If a(n-2) is the i-th Fibonacci number then a(n)=Fibonacci(i+a(n-1)); with a(1)=1, a(2)=2 and where we use the following nonstandard indexing for the Fibonacci numbers: f(n)=f(n-1)+f(n-2), f(1)=1, f(2)=2 (cf. A000045).
Original entry on oeis.org
1, 2, 3, 8, 144, 9969216677189303386214405760200
Offset: 1
a(5)=Fibonacci(3+8)=144 because a(3) is third Fibonacci number and a(4)=8.
A112866
If a(n-1) is the i-th Fibonacci number then a(n)=Fibonacci(i+a(n-2)); with a(1)=1, a(2)=2 and where we use the following nonstandard indexing for the Fibonacci numbers: f(n)=f(n-1)+f(n-2), f(1)=1, f(2)=2 (cf. A000045).
Original entry on oeis.org
1, 2, 3, 8, 34, 1597, 20365011074
Offset: 1
a(5)=Fibonacci(5+3)=34 because a(4) is the 5th Fibonacci number and a(3)=3.
-
f := proc(n)
combinat[fibonacci](n+1) ;
end proc:
Fidx := proc(n)
for i from 1 do
if f(i) = n then
return i;
elif f(i) > n then
return -1 ;
end if;
end do:
end proc:
A112866 := proc(n)
option remember;
if n<= 2 then
n;
else
i := Fidx(procname(n-1)) ;
f( i+procname(n-2)) ;
end if:
end proc: # R. J. Mathar, Nov 26 2011
-
f[n_] := Fibonacci[n+1];
Fidx[n_] := For[i = 1, True, i++, If[f[i] == n, Return[i], If[f[i] > n, Return[-1]]]];
a[n_] := a[n] = If[n <= 2, n, i = Fidx[a[n-1]]; f[i+a[n-2]]];
Table[a[n], {n, 1, 7}] (* Jean-François Alcover, Oct 26 2023, after R. J. Mathar *)
Showing 1-2 of 2 results.
Comments