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.

Previous Showing 11-15 of 15 results.

A240546 a(n) = prime(n+1)^n mod prime(n).

Original entry on oeis.org

1, 1, 3, 4, 10, 1, 9, 5, 16, 9, 26, 10, 33, 1, 2, 49, 33, 3, 35, 48, 3, 32, 62, 64, 4, 20, 8, 62, 93, 83, 64, 41, 68, 79, 138, 125, 88, 56, 4, 169, 72, 36, 40, 144, 73, 140, 63, 120, 24, 218, 67, 48, 58, 194, 126, 54, 74, 223, 74, 59, 176, 161, 280, 208, 215, 236, 82, 141, 139, 344, 7
Offset: 1

Views

Author

Irina Gerasimova, Apr 07 2014

Keywords

Comments

prime(k+1)^k mod prime(k) = k: 1, 3, 4, 76, 7743, ... .

Examples

			a(5) = prime(5+1)^5 mod prime(5) = 13^5 mod 11 = 10.
		

Crossrefs

Cf. A038702.

Programs

  • Magma
    [(NthPrime(n+1)^n mod NthPrime(n)): n in [1..100]]; // Juri-Stepan Gerasimov, Apr 07 2014
    
  • Maple
    a:= n-> ithprime(n+1) &^n mod ithprime(n):
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 30 2014
  • Mathematica
    Table[Mod[Prime[n + 1]^n, Prime[n]], {n, 80}] (* Alonso del Arte, Apr 11 2014 *)
    Table[PowerMod[Prime[n+1],n,Prime[n]],{n,80}] (* Harvey P. Dale, Jun 11 2019 *)
  • PARI
    a(n)=my(p=prime(n)); lift(Mod(nextprime(p+1),p)^n) \\ Charles R Greathouse IV, Apr 08 2014

A038703 Primes p such that p^2 mod q is odd, where q is the previous prime.

Original entry on oeis.org

3, 5, 17, 29, 37, 127
Offset: 1

Views

Author

Neil Fernandez, May 01 2000

Keywords

Comments

The next term if it exists is > 32452843 = 2000000th prime. Can someone prove this sequence is complete? - Olivier Gérard, Jun 26 2001
To prove that 127 is the last prime, we need to show that prime gaps satisfy prime(k)-prime(k-1)31. Although it is easy to verify this inequality for all known prime gaps, there is no proof for all gaps. - T. D. Noe, Jul 25 2006

Examples

			The first prime with a prime lower than itself is 3. This squared is 9, which when divided by the previous prime 2 leaves remainder 1, which is odd. So 3 is in the sequence. 11 is not in the sequence because 11^2, when divided by the previous prime 7, leaves a remainder of 121 (mod 7) = 2, which is even.
		

Crossrefs

Cf. A038702.
Cf. A058188 (number of primes between prime(n) and prime(n)+sqrt(prime(n))).

Programs

  • Mathematica
    Prime /@ Select[ Range[ 2, 100 ], OddQ[ Mod[ Prime[ # ]^2, Prime[ # - 1 ] ] ] & ]
    Transpose[Select[Partition[Prime[Range[50]],2,1],OddQ[PowerMod[Last[#],2, First[#]]]&]] [[2]]  (* Harvey P. Dale, May 31 2012 *)
  • PARI
    isok(p) = isprime(p) && (p>2) && (lift(Mod(p, precprime(p-1))^2) % 2); \\ Michel Marcus, Mar 05 2023

Formula

Prime(k) is in the sequence if prime(k)^2 (mod prime(k-1)) is odd.

Extensions

More terms from Olivier Gérard, Jun 26 2001

A179397 a(n) = prime(n)^2 mod prime(n-2).

Original entry on oeis.org

1, 1, 1, 1, 3, 10, 2, 5, 18, 6, 7, 36, 36, 14, 3, 11, 5, 39, 36, 64, 27, 21, 30, 55, 36, 36, 36, 36, 106, 98, 100, 64, 7, 5, 64, 144, 100, 100, 144, 64, 144, 144, 36, 36, 196, 178, 45, 36, 36, 100, 64, 144, 15, 144, 144, 64, 64, 100, 36, 144, 10, 31, 36, 36, 11, 83, 256, 144, 36, 100, 196, 196, 144, 100, 100, 196
Offset: 3

Views

Author

Umut Uludag, Jan 07 2011

Keywords

Examples

			a(1) =  5^2 mod  2 =  25 mod  2 = 1;
a(2) =  7^2 mod  3 =  49 mod  3 = 1;
a(3) = 11^2 mod  5 = 121 mod  5 = 1;
a(4) = 13^2 mod  7 = 169 mod  7 = 1;
a(5) = 17^2 mod 11 = 289 mod 11 = 3.
		

Crossrefs

Cf. A038702.

Programs

  • Maple
    A179397 := proc(n) ithprime(n)^2 mod ithprime(n-2); end proc: # R. J. Mathar, Jan 09 2011
  • Mathematica
    PowerMod[#[[3]],2,#[[1]]]&/@Partition[Prime[Range[80]],3,1] (* Harvey P. Dale, Oct 21 2018 *)

A179398 a(n) = prime(n)^2 mod prime(n-3).

Original entry on oeis.org

1, 1, 4, 2, 9, 9, 8, 11, 12, 28, 20, 26, 21, 41, 8, 37, 26, 22, 10, 2, 37, 8, 75, 18, 3, 64, 100, 79, 48, 11, 17, 62, 59, 46, 47, 105, 99, 93, 29, 151, 17, 75, 64, 131, 85, 187, 113, 100, 144, 144, 91, 85, 2, 73, 196, 196, 144, 144, 256, 114, 218, 107, 100, 89, 263, 266, 324, 256, 144, 324, 47, 41, 256, 256, 324
Offset: 4

Views

Author

Umut Uludag, Jan 07 2011

Keywords

Examples

			a(1) =  7^2 mod 2 =  49 mod 2 = 1;
a(2) = 11^2 mod 3 = 121 mod 3 = 1;
a(3) = 13^2 mod 5 = 169 mod 5 = 4;
a(4) = 17^2 mod 7 = 289 mod 7 = 2.
		

Crossrefs

Cf. A038702.

Programs

  • Maple
    A179398 := proc(n) ithprime(n)^2 mod ithprime(n-3); end proc: # R. J. Mathar, Jan 09 2011
  • Mathematica
    Table[PowerMod[Prime[n],2,Prime[n-3]],{n,4,80}] (* Harvey P. Dale, Dec 13 2011 *)

A179399 Prime(n)^2 mod prime(n-4).

Original entry on oeis.org

1, 1, 4, 4, 1, 9, 9, 1, 2, 22, 8, 34, 37, 23, 24, 6, 19, 19, 55, 40, 65, 10, 68, 57, 47, 43, 61, 41, 21, 111, 103, 7, 126, 20, 26, 31, 13, 161, 75, 54, 145, 143, 18, 128, 112, 104, 62, 33, 196, 26, 110, 98, 61, 149, 143, 61, 196, 213, 69, 57, 51, 283, 269, 54, 217, 73, 153, 147, 53, 227, 323, 217, 117, 203
Offset: 5

Views

Author

Umut Uludag, Jan 07 2011

Keywords

Examples

			a(1)=11^2 mod(2)=121 mod(2)=1, a(2)=13^2 mod(3)=169 mod(3)=1, a(3)=17^2 mod(5)=289 mod(5)=4, a(4)=19^2 mod(7)=361 mod(7)=4,...
		

Crossrefs

Cf. A038702.

Programs

  • Maple
    A179399 := proc(n) ithprime(n)^2 mod ithprime(n-4); end proc: # R. J. Mathar, Jan 09 2011
  • Mathematica
    Table[PowerMod[Prime[n],2,Prime[n-4]],{n,5,80}] (* Harvey P. Dale, Aug 04 2019 *)
Previous Showing 11-15 of 15 results.