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.

A069830 Multiplicative inverse of prime(n) modulo prime(n+1).

Original entry on oeis.org

2, 2, 3, 8, 6, 4, 9, 17, 24, 15, 6, 10, 21, 35, 44, 49, 30, 11, 53, 36, 13, 62, 74, 12, 25, 51, 80, 54, 28, 9, 98, 114, 69, 134, 75, 26, 27, 125, 144, 149, 90, 19, 96, 49, 99, 123, 130, 170, 114, 58, 199, 120, 25, 214, 219, 224, 135, 46, 70, 141, 205, 285, 233, 156, 79
Offset: 1

Views

Author

Lekraj Beedassy, Apr 23 2002

Keywords

Comments

Smallest k such that prime(n+1) divides k*prime(n) - 1, n>1.

Examples

			a(4) = 8 as prime(5) = 11 divides 8*7 -1, where 7 = prime(4).
a(9) = 24, for a(9)*prime(9) = 24*23 = (-5)*(-6) [mod 29] = 1 [mod prime(10)].
a(14) = 35, for a(14)*prime(14) = 35*43 = (-12)*(-4) [mod 47] = 1 [mod prime(15)].
		

Crossrefs

Cf. A077005.

Programs

  • Magma
    [InverseMod(NthPrime(n), NthPrime(n+1)): n in [1..65]]; // G. C. Greubel, Aug 09 2019
    
  • Maple
    seq( (1/ithprime(n) mod ithprime(n+1)), n = 1..65); # G. C. Greubel, Aug 09 2019
  • Mathematica
    Table[PowerMod[Prime[n], -1, Prime[n+1]], {n, 65}] (* G. C. Greubel, Aug 09 2019 *)
  • PARI
    vector(65,n,lift(Mod(prime(n),prime(n+1))^-1)) \\ Joerg Arndt, Aug 09 2019
    
  • Sage
    [nth_prime(n).inverse_mod(nth_prime(n+1)) for n in (1..65)] # G. C. Greubel, Aug 09 2019

Formula

a(n) + A077005(n) = prime(n+1). - Emmanuel Vantieghem, Aug 12 2018

Extensions

More terms from Rick L. Shepherd, May 03 2002

A087454 Multiplicative inverse of the n-th prime prime(n) modulo prime(n-1).

Original entry on oeis.org

1, 2, 3, 2, 6, 10, 9, 5, 4, 15, 26, 28, 21, 11, 8, 9, 30, 51, 17, 36, 61, 20, 14, 78, 73, 51, 26, 54, 82, 105, 32, 22, 69, 14, 75, 126, 131, 41, 28, 29, 90, 163, 96, 145, 99, 83, 88, 56, 114, 172, 39, 120, 217, 42, 43, 44, 135, 226, 208, 141, 85, 21, 77, 156, 235, 68, 276
Offset: 2

Views

Author

Lekraj Beedassy, Oct 23 2003

Keywords

Examples

			We have a(7) = 10 because prime(7)*10 = 170 = 1 [mod 13] = 1 [mod prime(6)].
		

Crossrefs

Programs

  • Magma
    [InverseMod(NthPrime(n), NthPrime(n-1)): n in [2..70]]; // G. C. Greubel, Aug 09 2019
    
  • Maple
    seq(`mod`(1/ithprime(n), ithprime(n-1)), n = 2..70); # G. C. Greubel, Aug 09 2019
  • Mathematica
    Table[PowerMod[Prime[n], -1, Prime[n - 1]], {n, 2, 68}] (* Geoffrey Critzer, May 16 2015 *)
  • PARI
    a(n)=my(p=prime(n-1),g=nextprime(p+1)-p);lift(Mod(1/g,p)) \\ Charles R Greathouse IV, Aug 23 2011
    
  • Sage
    [nth_prime(n).inverse_mod(nth_prime(n-1)) for n in (2..70)] # G. C. Greubel, Aug 09 2019

Extensions

Corrected and extended by Ray Chandler, Oct 24 2003

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
Showing 1-3 of 3 results.