|
|
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
|
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.
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
|
a(n) = 1/1920*{ - 71*(n mod 16) + 169*[(n+1) mod 16] + 649*[(n+2) mod 16] - 431*[(n+3) mod 16] + 289*[(n+4) mod 16] + 169*[(n+5) mod 16] + 169*[(n+6) mod 16] + 49*[(n+7) mod 16] - 671*[(n+8) mod 16] + 769*[(n+9) mod 16] - 551*[(n+10) mod 16] + 529*[(n+11) mod 16] - 191*[(n+12) mod 16] - 71*[(n+13) mod 16] - 71*[(n+14) mod 16] + 49*[(n+15) mod 16]} with n >= 0. - Paolo P. Lava, Nov 28 2006
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
|
(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
(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
(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
|
|
CROSSREFS
|
Sequence in context: A239693 A256655 A128047 * A328145 A096534 A322558
Adjacent sequences: A105867 A105868 A105869 * A105871 A105872 A105873
|
|
KEYWORD
|
nonn,easy,hear
|
|
AUTHOR
|
Shyam Sunder Gupta, May 05 2005
|
|
EXTENSIONS
|
a(0)=0 from Vincenzo Librandi, Feb 04 2014
|
|
STATUS
|
approved
|
|
|
|