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

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

A051830 a(n) = Fibonacci(p(n)+1) mod p(n), where p(n) is the n-th prime.

Original entry on oeis.org

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

Views

Author

Jud McCranie, Dec 11 1999

Keywords

Comments

Terms are 1 when p(n) == 1 or 4 (mod 5) and 0 when p(n) == 2 or 3 (mod 5).

Examples

			p(3) = 5, so a(3) = Fibonacci(5+1) mod 5 = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[Fibonacci[n+1],n],{n,Prime[Range[110]]}] (* Harvey P. Dale, Nov 27 2015 *)

Formula

a(n) = max(0, Legendre(5,prime(n))) for n >= 4, where Legendre is the Legendre symbol. - Haifeng Xu, Jan 31 2025
Showing 1-2 of 2 results.