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.

A194367 Smallest k such that prime(n) divides k*prime(n+1)+1.

Original entry on oeis.org

1, 1, 2, 5, 5, 3, 8, 14, 19, 14, 5, 9, 20, 32, 39, 44, 29, 10, 50, 35, 12, 59, 69, 11, 24, 50, 77, 53, 27, 8, 95, 109, 68, 125, 74, 25, 26, 122, 139, 144, 89, 18, 95, 48, 98, 116, 123, 167, 113, 57
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 23 2011

Keywords

Examples

			a(4) = 5 as prime(4)=7 divides 5*11+1, where 11=prime(5).
a(7) = 8 = (17*9-1)/19. - _Bob Selcoe_, Aug 21 2016
		

Crossrefs

Cf. A077005.
Cf. A000040 (prime numbers), A069830.

Programs

  • Maple
    seq(-ithprime(i+1)^(-1) mod ithprime(i),i=1..100); # Robert Israel, Aug 25 2016
  • Mathematica
    Table[k = 1; While[! Divisible[k Prime[n + 1] + 1, Prime@ n], k++]; k, {n, 50}] (* Michael De Vlieger, Aug 22 2016 *)
  • PARI
    a(n)=my(p=prime(n),q=nextprime(p+1));lift(Mod(-1,p)/q) \\ Charles R Greathouse IV, Sep 03 2011

Formula

a(n) = (prime(n)*A069830(n) - 1)/prime(n+1). - Bob Selcoe, Aug 21 2016