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.

A113396 a(n) = -prime(n)^2 (mod prime(n+1)).

Original entry on oeis.org

2, 1, 3, 6, 9, 1, 15, 7, 22, 27, 1, 25, 39, 31, 17, 23, 57, 31, 55, 69, 43, 67, 53, 33, 85, 99, 91, 105, 97, 58, 115, 101, 135, 49, 147, 121, 127, 151, 137, 143, 177, 91, 189, 181, 195, 67, 79, 211, 225, 217, 203, 237, 151
Offset: 1

Views

Author

Marian Kraus, Oct 26 2005

Keywords

Examples

			-2^2 == 2 (mod 3); -3^2 == 1 (mod 5); -5^2 == 3 (mod 7); -7^2 == 6 (mod 11); etc.
		

Crossrefs

Programs

  • Mathematica
    Mod[#[[2]]^2-#[[1]]^2,#[[2]]]&/@Partition[Prime[Range[60]],2,1] (* Harvey P. Dale, Nov 10 2014 *)
  • PARI
    vector(55,n,(-prime(n)^2)%prime(n+1)) \\ Joerg Arndt, Sep 09 2024

Formula

a(n) = prime(n+1) - A167770(n). - Jason Yuen, Sep 08 2024

Extensions

Name simplified by Joerg Arndt, Sep 09 2024