A105870 Fibonacci sequence (mod 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
Offset: 0
Examples
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.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- 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.
- Wayne Peng, ABC Implies There are Infinitely Many non-Fibonacci-Wieferich Primes - An Application of ABC Conjecture over Number Fields, arXiv:1511.05645 [math.NT], 2015.
- Diana Savin and Elif Tan, On Companion sequences associated with Leonardo quaternions: Applications over finite fields, arXiv:2403.01592 [math.CO], 2024. See p. 10.
- 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).
Programs
-
Haskell
a105870 n = a105870_list !! (n-1) a105870_list = 1 : 1 : zipWith (\u v -> (u + v) `mod` 7) (tail a105870_list) a105870_list -- Reinhard Zumkeller, Jan 15 2014
-
Magma
[Fibonacci(n) mod 7: n in [0..100]]; // Vincenzo Librandi, Feb 04 2014
-
Mathematica
Table[Mod[Fibonacci[n], 7], {n, 0, 100}] (* Alonso del Arte, Jul 29 2013 *)
-
PARI
a(n)=fibonacci(n)%7 \\ Charles R Greathouse IV, Jun 04 2013
-
PARI
a(n)=lift(((Mod([1,1;1,0],7))^n)[1,2]) \\ Charles R Greathouse IV, Jun 04 2013
-
PARI
a(n)=fibonacci(n%16)%7 \\ Charles R Greathouse IV, Jan 06 2016
-
Python
A105870_list, a, b, = [], 0, 1 for _ in range(10**3): A105870_list.append(a) a, b = b, (a+b) % 7 # Chai Wah Wu, Nov 26 2015
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
Extensions
a(0)=0 from Vincenzo Librandi, Feb 04 2014
Comments