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.

A086937 Number of distinct zeros of x^2-x-1 mod prime(n).

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 0, 2, 0, 2, 2, 0, 2, 0, 0, 0, 2, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 0, 2, 0, 0, 2, 0, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 2, 2, 0, 0, 2, 0, 2, 2, 2, 0, 0, 2, 2, 0, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 2, 0, 0, 2, 0, 2, 0, 2, 2, 2, 2, 2, 0, 2, 0, 2, 0, 2, 0, 0, 2, 0, 2, 2, 0, 2, 2, 0, 2, 0, 0, 0, 2, 2
Offset: 1

Views

Author

N. J. A. Sloane, Sep 23 2003

Keywords

Comments

For the prime modulus 5, the polynomial can be factored as (x+2)^2, showing that x=3 is a zero of multiplicity 2. The discriminant of the polynomial is 5. Also note how this sequence is related to the Fibonacci sequence A051830; for n>3, a(n) = 2*A051830(n). - T. D. Noe, Aug 13 2004

Crossrefs

Programs

  • Mathematica
    Table[p=Prime[n]; cnt=0; Do[If[Mod[x^2-x-1, p]==0, cnt++ ], {x, 0, p-1}]; cnt, {n, 105}] (* T. D. Noe, Sep 24 2003 *)

Formula

If p = prime(n), a(n) = A080891(p) + 1.

Extensions

Corrected and extended by T. D. Noe, Sep 24 2003

A051831 a(n) = Fibonacci(prime(n)) mod prime(n), where prime(n) is the n-th prime.

Original entry on oeis.org

1, 2, 0, 6, 1, 12, 16, 1, 22, 1, 1, 36, 1, 42, 46, 52, 1, 1, 66, 1, 72, 1, 82, 1, 96, 1, 102, 106, 1, 112, 126, 1, 136, 1, 1, 1, 156, 162, 166, 172, 1, 1, 1, 192, 196, 1, 1, 222, 226, 1, 232, 1, 1, 1, 256, 262, 1, 1, 276, 1, 282, 292, 306, 1, 312, 316, 1, 336, 346, 1, 352, 1
Offset: 1

Views

Author

Jud McCranie, Dec 11 1999

Keywords

Comments

Terms are 1 when prime(n) == 1 or 4 mod 5, terms are prime(n)-1 when prime(n) == 2 or 3 mod 5.
In general, it appears that Fibonacci(k*p) mod p = Fibonacci(k) or p-Fibonacci(k) for prime p > Fibonacci(k). For example Fibonacci(8*29) mod 29 = 21. - Gary Detlefs, May 28 2014

Examples

			prime(3) = 5, fibonacci(5) = 5 == 0 mod 5.
		

Crossrefs

Programs

  • Maple
    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>>, ithprime(n)$2)[1, 2]:
    seq(a(n), n=1..80);  # Alois P. Heinz, Oct 10 2015
  • Mathematica
    Mod[Fibonacci[Prime[#]],Prime[#]]&/@Range[75] (* Harvey P. Dale, Jan 14 2011 *)
  • PARI
    vector(80, n, fibonacci(prime(n)) % prime(n)) \\ Michel Marcus, Jul 15 2015

A051834 Fibonacci(Pn-1) mod Pn, where Pn is the n-th prime.

Original entry on oeis.org

1, 1, 3, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1
Offset: 1

Views

Author

Jud McCranie, Dec 11 1999

Keywords

Comments

Terms are 0 when Pn == 1 or 4 mod 5, terms are 1 when Pn == 2 or 3 mod 5.

Examples

			P3=5, Fibonacci(5-1)=3 mod 5.
		

Crossrefs

Showing 1-3 of 3 results.