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.

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

A236395 a(n) = Fibonacci(p) mod p^2, where p = prime(n).

Original entry on oeis.org

1, 2, 5, 13, 89, 64, 152, 210, 91, 378, 869, 443, 1641, 85, 1832, 2066, 296, 1465, 2009, 4474, 3211, 5057, 2572, 4184, 2909, 10000, 9475, 10164, 1418, 9378, 7238, 4193, 14795, 17793, 8941, 4531, 21194, 13528, 24214, 18683, 15574, 28237, 8978, 15632, 5515, 20299, 11817, 24529, 34049, 2062, 23765, 29159, 21932, 31376, 65791, 20776, 43848, 27101, 29638
Offset: 1

Views

Author

N. J. A. Sloane, Jan 28 2014

Keywords

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-> (q-> p(<<0|1>, <1|1>>, q, q^2)[1, 2])(ithprime(n)):
    seq(a(n), n=1..80);  # Alois P. Heinz, Oct 10 2015
  • PARI
    a(n) = my(p = prime(n)); fibonacci(p) % p^2; \\ Michel Marcus, Jan 29 2014

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.