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-10 of 20 results. Next

A182167 Min( f(n), n-f(n) ), where f(n) = A002708(n) = Fibonacci(n) mod n.

Original entry on oeis.org

0, 1, 1, 1, 0, 2, 1, 3, 2, 5, 1, 0, 1, 1, 5, 5, 1, 8, 1, 5, 5, 1, 1, 0, 0, 1, 7, 11, 1, 10, 1, 5, 13, 1, 5, 0, 1, 1, 2, 5, 1, 8, 1, 19, 20, 1, 1, 0, 13, 25, 19, 23, 1, 8, 5, 21, 17, 1, 1, 0, 1, 1, 20, 5, 5, 14, 1, 3, 25, 15, 1, 0, 1, 1, 25, 3, 2, 34, 1, 5, 7
Offset: 1

Views

Author

Alex Ratushnyak, Apr 15 2012

Keywords

Comments

Conjecture: the most frequent values are 0,1,2,3,5,8,13,21,34,... i.e Fibonacci numbers.

Examples

			a(1) = min( A002708(1) , 1 - A002708(1) ) = min(0,1) = 0,  a(4) = min(3,1) = 1,  a(5) = min(0,5) = 0
		

Crossrefs

Programs

Formula

a(n) = min( A002708(n) , n - A002708(n) )
a(n) = min( Fibonacci(n) mod n , n - (Fibonacci(n) mod n) )

A161553 Table which contains in row n the fundamental Pisano period of the Fibonacci sequence (mod n).

Original entry on oeis.org

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

Views

Author

Alexander Adamchuk, Jun 13 2009

Keywords

Comments

The length of the n-th row (the length of the period) is A001175(n).

Examples

			F(n) mod 1 {0},
F(n) mod 2 {0,1,1},
F(n) mod 3 {0,1,1,2,0,2,2,1},
F(n) mod 4 {0,1,1,2,3,1},
F(n) mod 5 {0,1,1,2,3,0,3,3,1,4,0,4,4,3,2,0,2,2,4,1},
F(n) mod 6 {0,1,1,2,3,5,2,1,3,4,1,5,0,5,5,4,3,1,4,5,3,2,5,1},
F(n) mod 7 {0,1,1,2,3,5,1,6,0,6,6,5,4,2,6,1},
F(n) mod 8 {0,1,1,2,3,5,0,5,5,2,7,1},
F(n) mod 9 {0,1,1,2,3,5,8,4,3,7,1,8,0,8,8,7,6,4,1,5,6,2,8,1},
F(n) mod 10 {0,1,1,2,3,5,8,3,1,4,5,9,4,3,7,0,7,7,4,1,5,6,1,7,8,5,3,8, 1,9,0,9,9,8,7,5,2,7,9,6,5,1,6,7,3,0,3,3,6,9,5,4,9,3,2,5,7,2,9,1}.
		

Crossrefs

Main diagonal gives A002708.
Row sums give A214300.

Programs

  • Mathematica
    per[1] = 1; per[n_] := For[k = 1, True, k++, If[Mod[Fibonacci[k], n] == 0 && Mod[Fibonacci[k + 1], n] == 1, Return[k]]];
    row[n_] := Table[Mod[Fibonacci[k], n], {k, 0, per[n]-1}];
    Array[row, 9] // Flatten (* Jean-François Alcover, Oct 30 2018 *)
  • PARI
    row(n)={my(L=List([0]), X=Mod([1,1;1,0],n), I=Mod([1,0;0,1],n), M=X); while(M<>I, M*=X; listput(L, lift(M[2,2]))); Vec(L)} \\ Andrew Howroyd, Mar 05 2023

Extensions

Moved into the keyword:tabf category by R. J. Mathar, Oct 04 2009

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

Original entry on oeis.org

0, 0, 1, 2, 0, 5, 12, 5, 33, 5, 1, 0, 232, 233, 55, 5, 1596, 2563, 1, 5, 987, 10946, 28656, 0, 0, 75025, 189653, 89, 1, 6765, 1, 5, 6765, 1, 9227460, 0, 24157816, 1, 63245985, 5, 1, 267914275, 433494436, 4181, 1134896405, 1, 2971215072, 0, 7778741816, 75025
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)$2)[1, 2]:
    seq(a(n), n=1..50);
  • 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], F[n]][[1, 2]];
    Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Oct 29 2024, after Alois P. Heinz *)
  • PARI
    alist(nn)= my(f=fibonacci); [ f(f(n))%f(n) |n<-[1..nn] ]; \\ Ruud H.G. van Tol, Dec 13 2024

Formula

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

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.

A002752 a(n) = Fibonacci(n-1) mod n.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 1, 5, 3, 4, 0, 5, 1, 9, 2, 2, 1, 13, 0, 1, 3, 12, 1, 1, 18, 15, 1, 26, 0, 29, 0, 29, 12, 2, 22, 17, 1, 1, 29, 26, 0, 13, 1, 13, 33, 2, 1, 1, 21, 49, 37, 18, 1, 23, 47, 13, 39, 30, 0, 41, 0, 1, 62, 34, 8, 49, 1, 5, 3, 54, 0, 1, 1, 39, 7, 2, 74
Offset: 1

Views

Author

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

Keywords

Crossrefs

Column 0 of A352747.

Programs

A128288 a(n) = A023163(n)/3 for n > 1.

Original entry on oeis.org

3, 13, 37, 43, 53, 67, 83, 107, 157, 163, 173, 197, 227, 277, 283, 293, 307, 317, 347, 373, 397, 443, 467, 523, 547, 557, 563, 587, 613, 643, 653, 677, 683, 733, 757, 773, 787, 797, 827, 853, 877, 883, 907, 947, 997, 1013, 1093, 1117, 1123, 1163, 1187, 1213
Offset: 2

Views

Author

Alexander Adamchuk, Feb 24 2007

Keywords

Comments

3 divides A023163(n) for n > 1. A023163(n) are the numbers n such that Fibonacci(n) == -2 (mod n). Almost all terms of {a(n)} are prime that belong to A003631 = {2, 3, 7, 13, 17, 23, 37, 43, 47, 53, 67, 73, 83, 97} (primes congruent to {2, 3} mod 5) that are also the primes p that divide Fibonacci(p+1). The first composite term is a(74) = 1853 = 17*109. The second composite term is 9701 = 89*109. The third composite term is 10877 = 73*149 belong to A069107(n) Composite n such that n divides F(n+1) where F(k) are the Fibonacci numbers. Composite terms in {a(n)} are listed in A128289 = {1853, 9701, 10877, 17261, ...}.

Examples

			A023163 begins {1, 9, 39, 111, 129, 159, 201, 249, 321, 471, 489, 519, ...}.
Thus a(2) = A023163(2)/3 = 9/3 = 3, a(3) = A023163(3)/3 = 39/3 = 13.
		

Crossrefs

Cf. A002708, A023172, A023173, A023162, A023163 (numbers k such that Fibonacci(k) == -2 (mod k)).
Cf. A003631, A069107, A128289 (composite terms in A128288).

Formula

a(n) = A023163(n)/3 for n > 1.

A213060 Lucas(n) mod n, Lucas(n)= A000032(n).

Original entry on oeis.org

0, 1, 1, 3, 1, 0, 1, 7, 4, 3, 1, 10, 1, 3, 14, 15, 1, 0, 1, 7, 11, 3, 1, 2, 11, 3, 22, 7, 1, 18, 1, 31, 4, 3, 4, 34, 1, 3, 17, 7, 1, 18, 1, 7, 41, 3, 1, 2, 29, 23, 4, 7, 1, 0, 44, 47, 4, 3, 1, 22, 1, 3, 41, 63, 11, 18, 1, 7, 50, 53, 1, 2, 1, 3, 64, 7, 73, 18
Offset: 1

Views

Author

Gary Detlefs, Jun 03 2012

Keywords

Comments

a(n) = 1 for all prime values of n. Composite values for which a(n) = 1 are listed in A005845.

Crossrefs

Cf. A002708 (Fibonacci(n) mod n).

Programs

  • Magma
    [Lucas(n) mod (n) : n in [1..120]]; // Vincenzo Librandi, Nov 19 2015
  • Maple
    with(combinat):f:=n-> fibonacci(n):L:=n->f(2*n)/f(n): seq(L(n) mod n, n= 1..75)
    # alternative
    A213060 := proc(n::integer)
        modp(A000032(n),n) ;
    end proc:
    seq(A213060(n),n=1..100) ; # R. J. Mathar, Oct 02 2019
  • Mathematica
    Table[Mod[LucasL[n], n], {n, 100}] (* T. D. Noe, Jun 06 2012 *)

A002726 a(n) = Fibonacci(n+1) mod n.

Original entry on oeis.org

0, 0, 0, 1, 3, 1, 0, 2, 1, 9, 1, 5, 0, 8, 12, 13, 0, 5, 1, 6, 8, 13, 0, 1, 18, 14, 21, 9, 1, 19, 1, 2, 25, 1, 17, 17, 0, 2, 27, 21, 1, 5, 0, 38, 8, 1, 0, 1, 8, 24, 18, 41, 0, 31, 52, 34, 22, 31, 1, 41, 1, 2, 42, 29, 3, 35, 0, 2, 47, 69, 1, 1, 0, 38, 57, 5, 76, 31, 1, 66, 55, 43, 0, 5, 3, 44
Offset: 1

Views

Author

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

Keywords

Crossrefs

Programs

Extensions

More terms from Michael Somos, Apr 26 2000

A128289 Composite terms in A128288(n) = A023163(n)/3 for n>1.

Original entry on oeis.org

1853, 9701, 10877, 17261, 23323, 27403, 75077, 80189, 113573, 120581, 161027, 162133, 163059, 196877, 213749, 291941, 361397, 400987, 427549, 482677, 635627, 667589, 941291, 1030373, 1033997, 1140701, 1196061, 1256293, 1751747, 1816363, 1842581, 2288453, 2662277
Offset: 1

Views

Author

Alexander Adamchuk, Feb 24 2007

Keywords

Comments

3 divides A023163(n) for n>1. A023163(n) are the numbers n such that Fibonacci(n) == -2 (mod n).
Almost all terms of A128288 are prime that belong to A003631 = {2, 3, 7, 13, 17, 23, 37, 43, 47, 53, 67, 73, 83, 97} Primes congruent to {2, 3} mod 5; that are also the primes p that divide Fibonacci(p+1).
a(3) = 10877 = 73*149 belongs to A069107 Composite n such that n divides Fibonacci(n+1).
a(3) = 10877 and a(4) = 17261 belong to A094395 Odd composite n such that n divides Fibonacci(n) + 1.

Examples

			a(1) = A128288(74) = 1853 = 17*109.
a(2) = 9701 = 89*109.
a(3) = 10877 = 73*149.
a(4) = 17261 = 41*421.
a(5) = 23323 = 83*281.
		

Crossrefs

Cf. A128288, A002708, A023172, A023173, A023162, A023163 = numbers n such that Fib(n) == -2 (mod n). Cf. A003631, A069107, A094413, A094395 = Odd composite n such that n divides Fibonacci(n) + 1.

Programs

  • Mathematica
    Do[ f = Mod[ Fibonacci[3n], 3n ]; If[ !PrimeQ[n] && f == 3n-2, Print[ {n, FactorInteger[n]} ]], {n,1,25000} ]

Extensions

Two more terms from R. J. Mathar, Oct 08 2007
a(9)-a(33) from Amiram Eldar, Apr 07 2019

A182625 Numbers n for which Fibonacci(n) mod n is a Fibonacci number.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 11, 12, 14, 19, 20, 21, 22, 24, 25, 29, 31, 32, 33, 36, 38, 41, 42, 48, 54, 55, 56, 58, 59, 60, 61, 62, 71, 72, 76, 77, 79, 80, 82, 89, 92, 93, 95, 96, 101, 104, 105, 108, 109, 110, 118, 119, 120, 121, 122, 123, 124, 125, 131, 133, 139, 142
Offset: 1

Views

Author

Carmine Suriano, Mar 30 2011

Keywords

Examples

			Fibonacci(12) = 144, 144 mod 12 = 0, and 0 is a Fibonacci number. Therefore 12 is in the sequence.
Fibonacci(14) = 377, 377 mod 14 = 13, and 13 is a Fibonacci number. Therefore 14 is in the sequence.
		

Crossrefs

Programs

  • Maple
    isA000045 := proc(n) local F,i; for i from 0 do F := combinat[fibonacci](i) ; if F> n then return false; elif F = n then return true; end if; end do;end proc:
    isA182625 := proc(n) isA000045(combinat[fibonacci](n) mod n) ; end proc:
    for n from 1 to 300 do if isA182625(n) then printf("%d,",n) ; end if; end do: # R. J. Mathar, Apr 02 2011
    # second Maple program:
    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:= r.M mod n fi;
             if p=0 then break fi; M:= M.M mod n
          od; r[1, 2]
        end:
    a:= proc(n) option remember; local k;
          for k from 1+`if`(n=1, 0, a(n-1)) while (t->
             not (issqr(t+4) or issqr(t-4)))(5*b(k)^2)
          do od; k
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 26 2016
  • Mathematica
    nn=12; f=Table[Fibonacci[n], {n,0,nn}]; Select[Range[f[[-1]]], MemberQ[f, Mod[Fibonacci[#],#]]&] (* T. D. Noe, Apr 02 2011 *)
  • PARI
    is(n)=my(k=(fibonacci(n)%n)^2);k+=(k+1)<<2; issquare(k) || issquare(k-8) \\ Charles R Greathouse IV, Jul 30 2012

Formula

{n: A002708(n) in A000045}. - R. J. Mathar, Apr 02 2011
Showing 1-10 of 20 results. Next