OFFSET
1,4
COMMENTS
a(n) is congruent to tribonacci(n) modulo k if Fibonacci(n) is divisible by k, although the converse does not hold.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..2000
EXAMPLE
For n=10, since tribonacci(10)=81 and Fibonacci(10)=55, a(10)=81 modulo 55 = 26.
MAPLE
a:= n-> (<<0|1|0>, <0|0|1>, <1|1|1>>^n)[1, 3] mod (<<0|1>, <1|1>>^n)[1, 2]:
seq(a(n), n=1..45); # Alois P. Heinz, Aug 19 2020
MATHEMATICA
m = 42; Mod[LinearRecurrence[{1, 1, 1}, {0, 1, 1}, m], Array[Fibonacci, m]] (* Amiram Eldar, Aug 19 2020 *)
PROG
(PARI) t(n) = ([0, 1, 0; 0, 0, 1; 1, 1, 1]^n)[1, 3]; \\ A000073
a(n) = t(n) % fibonacci(n); \\ Michel Marcus, Aug 19 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Richard Peterson, Jun 12 2020
STATUS
approved