login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A263101
a(n) = F(F(n)) mod F(n), where F = Fibonacci = A000045.
6
0, 0, 1, 2, 0, 5, 12, 5, 33, 5, 1, 0, 232, 233, 55, 5, 1596, 2563, 1, 5, 987, 10946, 28656, 0, 0, 75025, 189653, 89, 1, 6765, 1, 5, 6765, 1, 9227460, 0, 24157816, 1, 63245985, 5, 1, 267914275, 433494436, 4181, 1134896405, 1, 2971215072, 0, 7778741816, 75025
OFFSET
1,4
LINKS
FORMULA
a(n) = A007570(n) mod A000045(n).
MAPLE
F:= n-> (<<0|1>, <1|1>>^n)[1, 2]:
p:= (M, n, k)-> map(x-> x mod k, `if`(n=0, <<1|0>, <0|1>>,
`if`(n::even, p(M, n/2, k)^2, p(M, n-1, k).M))):
a:= n-> p(<<0|1>, <1|1>>, F(n)$2)[1, 2]:
seq(a(n), n=1..50);
MATHEMATICA
F[n_] := MatrixPower[{{0, 1}, {1, 1}}, n][[1, 2]];
p[M_, n_, k_] := Mod[#, k]& /@ If[n == 0, {{1, 0}, {0, 1}}, If[EvenQ[n], MatrixPower[p[M, n/2, k], 2], p[M, n - 1, k].M]];
a[n_] := p[{{0, 1}, {1, 1}}, F[n], F[n]][[1, 2]];
Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Oct 29 2024, after Alois P. Heinz *)
PROG
(PARI) alist(nn)= my(f=fibonacci); [ f(f(n))%f(n) |n<-[1..nn] ]; \\ Ruud H.G. van Tol, Dec 13 2024
CROSSREFS
Sequence in context: A292590 A080901 A137260 * A219765 A153059 A151336
KEYWORD
nonn,look,changed
AUTHOR
Alois P. Heinz, Oct 09 2015
STATUS
approved