OFFSET
1
COMMENTS
A chaotic sequence based on a definition by A. Fraenkel. Fibonacci numbers determine the boundaries of the generations.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Altug Alkan, Line plot of a(n) for n <= 28657
A. S. Fraenkel, Iterated floor function, algebraic numbers, discrete chaos, Beatty subsequences, semigroups, Trans. Amer. Math. Soc., Volume 341, Number 2 (1994).
Rémy Sigrist, C program for A307721
MAPLE
x:= proc(n) option remember;
procname(procname(n-2)) + procname(n-procname(n-1))
end proc:
x(1):= 1: x(2):= 1: x(3):= 1:
y:= proc(n) option remember;
procname(procname(n-1)) + procname(n-procname(n-1))
end proc:
y(1):= 1: y(2):= 1: y(3):= 1:
map(x@y-y@x, [$1..100]); # Robert Israel, Apr 25 2019
MATHEMATICA
x[1]=x[2]=x[3]=y[1]=y[2]=y[3]=1; x[n_] := x[n] = x[x[n-2]] + x[n - x[n - 1]]; y[n_] := y[n] = y[y[n-1]] + y[n - y[n-1]]; a[n_] := x[y[n]] - y[x[n]]; Array[a, 100] (* Giovanni Resta, Apr 24 2019 *)
PROG
(PARI) x=vector(200); for(n=1, 3, x[n] = 1); for(n=4, #x, x[n] = x[x[n-2]] + x[n-x[n-1]]); y=vector(200); for(n=1, 3, y[n] = 1); for(n=4, #y, y[n] = y[y[n-1]] + y[n-y[n-1]]); vector(200, n, x[y[n]]-y[x[n]])
(C) See Links section.
CROSSREFS
KEYWORD
sign
AUTHOR
Altug Alkan, Apr 24 2019
STATUS
approved