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.

Showing 1-3 of 3 results.

A128924 T(n,m) is the number of m's in the fundamental period of Fibonacci numbers mod n.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 1, 3, 1, 1, 4, 4, 4, 4, 4, 2, 6, 3, 4, 3, 6, 2, 4, 2, 1, 1, 2, 4, 2, 3, 2, 1, 0, 3, 0, 1, 2, 5, 2, 2, 2, 2, 2, 2, 5, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 1, 3, 2, 1, 0, 1, 0, 0, 1, 0, 1, 2, 5, 2, 2, 1, 5, 0, 1, 1, 2, 2, 1, 4, 4, 2, 2, 0, 4, 0, 0, 4, 0, 2, 2, 4, 2, 8, 2, 2, 1, 4, 4, 4, 4, 4, 1, 2, 2, 8
Offset: 1

Views

Author

R. J. Mathar, Apr 25 2007

Keywords

Comments

T(n,m) is the triangle read by rows, 0<=m
A118965 and A066853 give numbers of zeros and nonzeros in n-th row, respectively. - Reinhard Zumkeller, Jan 16 2014

Examples

			{F(k) mod 4} has fundamental period (0,1,1,2,3,1), see A079343, with
T(4,0)=1 zero, T(4,1)=3 ones, T(4,2)=1 two's, T(4,3)=1 three's. The triangle starts
1,
1, 2,
2, 3, 3,
1, 3, 1, 1,
4, 4, 4, 4, 4,
2, 6, 3, 4, 3, 6,
2, 4, 2, 1, 1, 2, 4,
2, 3, 2, 1, 0, 3, 0, 1,
2, 5, 2, 2, 2, 2, 2, 2, 5,
4, 8, 4, 8, 4, 8, 4, 8, 4, 8,
1, 3, 2, 1, 0, 1, 0, 0, 1, 0, 1,
2, 5, 2, 2, 1, 5, 0, 1, 1, 2, 2, 1,
4, 4, 2, 2, 0, 4, 0, 0, 4, 0, 2, 2, 4,
2, 8, 2, 2, 1, 4, 4, 4, 4, 4, 1, 2, 2, 8,
2, 3, 3, 2, 3, 3, 2, 3, 3, 2, 3, 3, 2, 3, 3,
2, 3, 4, 1, 0, 3, 0, 1, 2, 3, 0, 1, 0, 3, 0, 1,
4, 4, 2, 2, 4, 2, 0, 0, 2, 2, 0, 0, 2, 4, 2, 2, 4,
		

Crossrefs

Cf. A053029, A053030, A053031, A001175 (row sums), A001176 (1st column).

Programs

  • Haskell
    import Data.List (group, sort)
    a128924 n k = a128924_tabl !! (n-1) !! (k-1)
    a128924_tabl = map a128924_row [1..]
    a128924_row 1 = [1]
    a128924_row n = f [0..n-1] $ group $ sort $ g 1 ps where
       f []     _                            = []
       f (v:vs) wss'@(ws:wss) | head ws == v = length ws : f vs wss
                              | otherwise    = 0 : f vs wss'
       g 0 (1 : xs) = []
       g _ (x : xs) = x : g x xs
       ps = 1 : 1 : zipWith (\u v -> (u + v) `mod` n) (tail ps) ps
    -- Reinhard Zumkeller, Jan 16 2014
  • Maple
    A128924 := proc(m,h)
        local resul,k,M ;
        resul :=0 ;
        for k from 0 to A001175(m)-1 do
            M := combinat[fibonacci](k) mod m ;
            if M = h then
                resul := resul+1 ;
            end if ;
        end do;
        resul ;
    end proc:
    seq(seq(A128924(m,h),h=0..m-1),m=1..17) ;
  • Mathematica
    A001175[1] = 1; A001175[n_] := For[k = 1, True, k++, If[Mod[Fibonacci[k], n] == 0 && Mod[Fibonacci[k+1], n] == 1, Return[k]]]; T[m_, h_] := Module[{resul, k, M}, resul = 0; For[k = 0, k <= A001175[m]-1, k++, M = Mod[Fibonacci[k], m]; If[ M == h, resul++]]; Return[resul]]; Table[T[m, h], {m, 1, 17}, {h, 0, m-1}] // Flatten (* Jean-François Alcover, Feb 11 2015, after Maple code *)

Formula

T(n,n) = A235715(n). - Reinhard Zumkeller, Jan 17 2014

A137751 a(n) = number of missing residues in the Fibonacci sequence mod the n-th prime number.

Original entry on oeis.org

0, 0, 0, 0, 4, 4, 4, 7, 4, 19, 12, 8, 22, 10, 32, 16, 22, 36, 16, 27, 16, 30, 20, 72, 28, 66, 24, 74, 60, 80, 30, 49, 28, 106, 88, 114, 44, 40, 40, 36, 67, 119, 72, 44, 48, 183, 181, 54, 56, 149, 212, 90, 138, 94, 64, 178, 156, 102
Offset: 1

Author

Casey Mongoven, Feb 10 2008

Keywords

Examples

			The 5th prime number is 11. The Fibonacci sequence mod 11 is {0,1,1,2,3,5,8,2,10,1,0,1,...} - a periodic sequence. There are 4 residues which do not occur in this sequence, namely {4,6,7,9}. So a(5) = 4.
		

Crossrefs

A223487 Number of missing residues in Lucas sequence mod n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 0, 2, 4, 2, 1, 0, 8, 5, 1, 7, 7, 10, 8, 8, 4, 10, 13, 2, 0, 8, 19, 16, 12, 10, 16, 14, 22, 21, 9, 25, 15, 30, 22, 16, 10, 24, 28, 25, 32, 31, 12, 26, 20, 16, 9, 25, 39, 28, 28, 38, 22, 42, 33, 41, 30, 22, 49, 32, 16, 42, 36, 44, 27, 55
Offset: 1

Author

Casey Mongoven, Mar 20 2013

Keywords

Comments

The Lucas numbers mod n for any n are periodic - see A106291 for period lengths.

Crossrefs

Cf. A118965.

Programs

  • Mathematica
    pisano[n_] := Module[{a = {2, 1}, a0, k = 0, s, t}, If[n == 1, 1, a0 = a; t = a; While[k++; s = Mod[Plus @@ a, n]; AppendTo[t, s]; a[[1]] = a[[2]]; a[[2]] = s; a != a0]; t]]; Join[{0, 0}, Table[u = Union[pisano[n]]; mx = Max[u]; Length[Complement[Range[0, mx], u]], {n, 3, 100}]] (* T. D. Noe, Mar 22 2013 *)
Showing 1-3 of 3 results.