|
|
A105870
|
|
Fibonacci sequence (mod 7).
|
|
7
|
|
|
0, 1, 1, 2, 3, 5, 1, 6, 0, 6, 6, 5, 4, 2, 6, 1, 0, 1, 1, 2, 3, 5, 1, 6, 0, 6, 6, 5, 4, 2, 6, 1, 0, 1, 1, 2, 3, 5, 1, 6, 0, 6, 6, 5, 4, 2, 6, 1, 0, 1, 1, 2, 3, 5, 1, 6, 0, 6, 6, 5, 4, 2, 6, 1, 0, 1, 1, 2, 3, 5, 1, 6, 0, 6, 6, 5, 4, 2, 6, 1, 0, 1, 1, 2, 3, 5, 1, 6, 0, 6, 6, 5, 4, 2, 6, 1, 0, 1, 1, 2, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
Sequence is periodic with Pisano period 16 = A001175(7).
|
|
LINKS
|
Brady Haran, Fibonacci Tartan and Bagpipes, Numberphile video (2013). The music by Alan Stewart at 1:53 to 3:20 has pitch based on this sequence.
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1).
|
|
FORMULA
|
G.f.: - x*(1 + x + 2*x^2 + 3*x^3 + 5*x^4 + x^5 + 6*x^6 + 6*x^8 + 6*x^9 + 5*x^10 + 4*x^11 + 2*x^12 + 6*x^13 + x^14)/((x - 1)*(1 + x)*(1 + x^2)*(1 + x^4)*(1 + x^8)). - R. J. Mathar, Jul 14 2012
a(1) = a(2) = 1, then a(n) = (a(n - 2) + a(n - 1)) mod 7. - Alonso del Arte, Jul 30 2013
|
|
EXAMPLE
|
a(5) = 5 because Fibonacci(5) = 5.
a(6) = 1 because Fibonacci(6) = 8 and 8 mod 7 = 1.
a(7) = 6 because Fibonacci(7) = 13 and 13 mod 7 = 6.
|
|
MATHEMATICA
|
Table[Mod[Fibonacci[n], 7], {n, 0, 100}] (* Alonso del Arte, Jul 29 2013 *)
|
|
PROG
|
(Haskell)
a105870 n = a105870_list !! (n-1)
a105870_list = 1 : 1 : zipWith (\u v -> (u + v) `mod` 7)
(tail a105870_list) a105870_list
(Python)
for _ in range(10**3):
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|