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-5 of 5 results.

A002708 a(n) = Fibonacci(n) mod n.

Original entry on oeis.org

0, 1, 2, 3, 0, 2, 6, 5, 7, 5, 1, 0, 12, 13, 10, 11, 16, 10, 1, 5, 5, 1, 22, 0, 0, 25, 20, 11, 1, 20, 1, 5, 13, 33, 30, 0, 36, 1, 37, 35, 1, 34, 42, 25, 20, 45, 46, 0, 36, 25, 32, 23, 52, 8, 5, 21, 40, 1, 1, 0, 1, 1, 43, 59, 60, 52, 66, 65, 44, 15, 1, 0, 72, 73, 50, 3, 2, 44, 1, 5, 7, 1, 82, 24
Offset: 1

Views

Author

John C. Hallyburton, Jr. (hallyb(AT)evms.ENET.dec.com)

Keywords

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002, p. 891.

Crossrefs

Cf. A002726, A002752, A023172 (indices of 0's), A023173 (indices of 1's), A023174-A023182.
Cf. A263101.
Main diagonal of A161553.

Programs

  • Magma
    [Fibonacci(n) mod n : n in [1..120]]; // Vincenzo Librandi, Nov 19 2015
    
  • Maple
    with(combinat): [ seq( fibonacci(n) mod n, n=1..80) ];
    # second Maple program:
    a:= proc(n) local r, M, p; r, M, p:=
          <<1|0>, <0|1>>, <<0|1>, <1|1>>, n;
          do if irem(p, 2, 'p')=1 then r:= r.M mod n fi;
             if p=0 then break fi; M:= M.M mod n
          od; r[1, 2]
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 26 2016
  • Mathematica
    Table[Mod[Fibonacci[n], n], {n, 1, 100}] (* Stefan Steinerberger, Apr 18 2006 *)
  • PARI
    a(n) = fibonacci(n) % n; \\ Michel Marcus, May 11 2016
  • Python
    A002708_list, a, b, = [], 1, 1
    for n in range(1,10**4+1):
        A002708_list.append(a%n)
        a, b = b, a+b # Chai Wah Wu, Nov 26 2015
    

Extensions

More terms from Stefan Steinerberger, Apr 18 2006

A263112 a(n) = F(F(n)) mod n, where F = Fibonacci = A000045.

Original entry on oeis.org

0, 1, 1, 2, 0, 3, 2, 2, 1, 5, 1, 0, 8, 13, 10, 2, 12, 15, 5, 10, 1, 1, 1, 0, 0, 25, 1, 2, 5, 15, 27, 2, 10, 33, 20, 0, 1, 1, 34, 10, 40, 21, 18, 2, 10, 1, 1, 0, 1, 25, 1, 2, 16, 21, 5, 26, 37, 1, 7, 0, 33, 27, 1, 2, 40, 21, 5, 2, 1, 15, 1, 0, 46, 1, 25, 2, 68
Offset: 1

Views

Author

Alois P. Heinz, Oct 09 2015

Keywords

Crossrefs

Programs

  • Maple
    F:= n-> (<<0|1>, <1|1>>^n)[1, 2]:
    p:= (M, n, k)-> map(x-> x mod k, `if`(n=0, <<1|0>, <0|1>>,
              `if`(n::even, p(M, n/2, k)^2, p(M, n-1, k).M))):
    a:= n-> p(<<0|1>, <1|1>>, F(n), n)[1, 2]:
    seq(a(n), n=1..80);
  • Mathematica
    F[n_] := MatrixPower[{{0, 1}, {1, 1}}, n][[1, 2]];
    p[M_, n_, k_] := Mod[#, k]& /@ If[n == 0, {{1, 0}, {0, 1}}, If[EvenQ[n], MatrixPower[p[M, n/2, k], 2], p[M, n - 1, k].M]];
    a[n_] := p[{{0, 1}, {1, 1}}, F[n], n][[1, 2]];
    Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Oct 29 2024, after Alois P. Heinz *)

Formula

a(n) = A007570(n) mod n.

A127787 Numbers n such that F(n) divides F(F(n)), where F(n) is a Fibonacci number.

Original entry on oeis.org

1, 2, 5, 12, 24, 25, 36, 48, 60, 72, 96, 108, 120, 125, 144, 168, 180, 192, 216, 240, 288, 300, 324, 336, 360, 384, 432, 480, 504, 540, 552, 576, 600, 612, 625, 648, 660, 672, 684, 720, 768, 840, 864, 900, 960, 972, 1008, 1080, 1104, 1152, 1176, 1200, 1224, 1296, 1320
Offset: 1

Views

Author

Alexander Adamchuk, May 13 2007

Keywords

Comments

It is known that for n > 2 Fibonacci(n) divides Fibonacci(m) if and only if n divides m. Therefore if the term "2" is omitted this is identical to A023172, which see for further information. - Stefan Steinerberger, Dec 20 2007

Examples

			12 is a term because F(12) = 144 divides F(F(12)) = F(144) = 555565404224292694404015791808.
		

Crossrefs

Cf. A023172. Cf. also A000045 = Fibonacci(n), A007570 = F(F(n)), where F is a Fibonacci number, A023172 = numbers n such that n divides Fibonacci(n).
Cf. A263101.

Programs

  • Maple
    with(combinat): a:=proc(n) if type(fibonacci(fibonacci(n))/fibonacci(n), integer) then n else end if end proc: seq(a(n),n=1..40); # Emeric Deutsch, Aug 24 2007

Extensions

Edited by N. J. A. Sloane, Dec 22 2007

A274996 a(n) = F(F(F(n))) mod F(F(n)), where F = Fibonacci = A000045.

Original entry on oeis.org

0, 0, 0, 1, 0, 5, 232, 987, 1, 5, 1, 0, 2211236406303914545699412969744873993387956988652, 2211236406303914545699412969744873993387956988653, 139583862445
Offset: 1

Views

Author

Alois P. Heinz, Nov 11 2016

Keywords

Crossrefs

Programs

  • Maple
    F:= proc(n) local r, M, p; r, M, p:=
          <<1|0>, <0|1>>, <<0|1>, <1|1>>, n;
          do if irem(p, 2, 'p')=1 then r:=
            `if`(nargs=1, r.M, r.M mod args[2]) fi;
             if p=0 then break fi; M:=
            `if`(nargs=1, M.M, M.M mod args[2])
          od; r[1, 2]
        end:
    a:= n-> (h-> F(h$2))(F(F(n))):
    seq(a(n), n=1..15);

Formula

a(n) = A058051(n) mod A007570(n).

A338638 a(n) = L(L(n)) mod L(n), where L = Lucas numbers = A000032.

Original entry on oeis.org

1, 0, 1, 3, 1, 1, 0, 1, 1, 7, 4, 1, 199, 1, 4, 843, 1, 1, 0, 1, 29, 123, 4, 1, 3, 199, 4, 39603, 29, 1, 5778, 1, 1, 7, 4, 17622890, 12752043, 1, 4, 39603, 7881196, 1, 5778, 1, 29, 7, 4, 1, 3, 1149851, 28143689044, 7, 29, 1, 0, 312119004790, 6643838879, 7, 4, 1
Offset: 0

Views

Author

Alois P. Heinz, Nov 04 2020

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) local r, M, p; r, M, p:=
          <<1|0>, <0|1>>, <<0|1>, <1|1>>, n;
          do if irem(p, 2, 'p')=1 then r:=
            `if`(nargs=1, r.M, r.M mod args[2]) fi;
             if p=0 then break fi; M:=
            `if`(nargs=1, M.M, M.M mod args[2])
          od; (r.<<2, 1>>)[1$2]
        end:
    a:= n-> (f-> b(f$2) mod f)(b(n)):
    seq(a(n), n=0..60);
  • Mathematica
    Table[Mod[LucasL[LucasL[n]],LucasL[n]],{n,0,60}] (* Harvey P. Dale, Jul 04 2022 *)

Formula

a(n) = A005371(n) mod A000032(n).
a(n) = 0 for n in { A016089 }.
Showing 1-5 of 5 results.