OFFSET
1,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..25000
FORMULA
{ k >= 0 : A330439(k) = 1 }.
MAPLE
b:= proc() 0 end:
g:= proc(n) option remember; local t;
t:= `if`(n<2, n, b(g(n-1))+b(g(n-2)));
b(t):= b(t)+1; t
end:
f:= proc(n) option remember; b(g(n)) end:
a:= proc(n) option remember; local k; for k from 1+
`if`(n=1, -1, a(n-1)) while f(k)<>1 do od; k
end:
seq(a(n), n=1..80);
MATHEMATICA
b[_] = 0;
g[n_] := g[n] = Module[{t},
t = If[n < 2, n, b[g[n - 1]] + b[g[n - 2]]];
b[t]++; t];
f[n_] := f[n] = b[g[n]];
a[n_] := a[n] = Module[{k}, For[k = 1 +
If[n == 1, -1, a[n - 1]], f[k] != 1, k++]; k];
Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Jun 01 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 14 2019
STATUS
approved