cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A118965 Number of missing residues in Fibonacci sequence mod n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 4, 1, 4, 0, 0, 5, 4, 7, 7, 0, 12, 8, 4, 11, 0, 8, 0, 7, 19, 0, 12, 11, 14, 21, 0, 21, 8, 25, 14, 10, 22, 24, 10, 24, 0, 25, 32, 33, 12, 0, 16, 22, 16, 25, 43, 31, 24, 38, 22, 5, 36, 41, 40, 22, 20, 28, 16, 48, 40, 0, 27, 57
Offset: 1

Views

Author

Casey Mongoven, May 07 2006

Keywords

Comments

If n belongs to A079002, then a(n) = 0. - Michel Marcus, May 27 2013
a(n) = number of zeros in n-th row of triangle A128924. - Reinhard Zumkeller, Jan 16 2014

Examples

			The Fibonacci sequence mod 8 is { 0 1 1 2 3 5 0 5 5 2 7 1 0 1 1 ... } - a periodic sequence with a period of 12 (see A001175). Two residues do not occur in this sequence (4 and 6), therefore a(8) = 2.
		

Crossrefs

Programs

  • Haskell
    a118965 = sum . map (0 ^) . a128924_row
    -- Reinhard Zumkeller, Jan 16 2014
    
  • Mathematica
    With[{fibs=Fibonacci[Range[300]]},Table[Length[Complement[Range[0,n-1],Union[ Mod[fibs,n]]]],{n,80}]] (* Harvey P. Dale, Jul 01 2021 *)
  • PARI
    a(n)=if(n<8, return(0)); my(v=List([1,2])); while(v[#v] || v[#v-1]!=1, listput(v,(v[#v]+v[#v-1])%n)); n-#Set(v) \\ Charles R Greathouse IV, Jun 20 2017

Formula

a(n) = n - A066853(n). - Michel Marcus, May 27 2013

Extensions

Offset corrected by Michel Marcus, May 27 2013