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.

A072565 a(n) = prime(n+1)*prime(n+2)+1 mod prime(n), where prime(n) is the n-th prime.

Original entry on oeis.org

0, 0, 3, 4, 2, 12, 13, 3, 3, 17, 30, 25, 13, 41, 26, 49, 17, 0, 25, 17, 61, 41, 2, 8, 25, 13, 25, 13, 73, 27, 41, 49, 25, 121, 17, 73, 61, 41, 73, 49, 25, 121, 13, 25, 29, 90, 193, 25, 13, 41, 49, 25, 161, 73, 73, 49, 17, 61, 25, 25, 241, 253, 25, 13, 73, 281, 97, 121, 13
Offset: 1

Views

Author

G. L. Honaker, Jr., Aug 06 2002

Keywords

Examples

			a(18) = prime(19)*prime(20)+1 mod prime(18) = 67*71+1 mod 61 = 0.
		

References

  • R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer-Verlag, NY, (2002 printing), Research problem 1.85, p. 73.

Crossrefs

Programs

  • GAP
    P:=Filtered([1..1000],IsPrime);;
    List([1..70],n->(P[n+1]*P[n+2]+1) mod P[n]); # Muniru A Asiru, Mar 09 2018
  • Magma
    [(NthPrime(n+1)*NthPrime(n+2)+1) mod NthPrime(n): n in [1..100]]; // Vincenzo Librandi, Feb 28 2018
    
  • Maple
    p:=ithprime; seq((p(n+1)*p(n+2)+1) mod p(n),n=1..70); # Muniru A Asiru, Mar 09 2018
  • Mathematica
    a[n_] := Mod[Prime[n+1] Prime[n+2] + 1, Prime[n]]
    Mod[#[[2]]#[[3]]+1,#[[1]]]&/@Partition[Prime[Range[80]],3,1] (* Harvey P. Dale, Dec 19 2018 *)
  • PARI
    a(n) = (prime(n+1)*prime(n+2) + 1) % prime(n); \\ Michel Marcus, Feb 28 2018
    

Formula

a(n) = A023523(n+1) mod A000040(n). - Michel Marcus, Feb 28 2018

Extensions

Edited by Dean Hickerson and Robert G. Wilson v, Aug 10 2002