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-5 of 5 results.

A076297 Numbers k such that prime(k) + s*k is prime, s=2.

Original entry on oeis.org

2, 3, 7, 9, 11, 12, 13, 14, 18, 24, 27, 28, 29, 30, 36, 38, 43, 44, 53, 54, 55, 57, 60, 63, 64, 65, 66, 72, 74, 80, 84, 90, 93, 102, 103, 108, 110, 111, 117, 118, 125, 126, 135, 138, 141, 143, 148, 150, 155, 156, 162, 165, 171, 174, 180, 183, 186, 188, 190, 198
Offset: 1

Views

Author

Zak Seidov, Oct 05 2002

Keywords

Comments

See also A064402 (s=1), A076298 (s=3), A076299 (s=4), A076300 (s=5).

Examples

			3 is OK because p(3) + 2*3 = 5 + 6 = 11 is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..500]| IsPrime(NthPrime(n) +2*n)]; // G. C. Greubel, May 04 2018
    
  • Mathematica
    Select[Range[200],PrimeQ[Prime[#]+2#]&] (* Harvey P. Dale, Sep 01 2015 *)
  • PARI
    select(x->isprime(x), vector(500, n, prime(n) + 2*n), 1) \\ G. C. Greubel, May 04 2018

A076298 Numbers k such that prime(k) + s*k is prime, s=3.

Original entry on oeis.org

1, 4, 6, 8, 10, 12, 16, 20, 26, 28, 32, 34, 38, 40, 42, 46, 48, 50, 56, 60, 62, 64, 68, 78, 86, 90, 94, 102, 104, 120, 122, 128, 130, 138, 140, 144, 146, 148, 162, 166, 170, 180, 182, 186, 190, 200, 204, 208, 214, 230, 238, 244, 246, 250, 252, 254, 260, 270, 282
Offset: 1

Views

Author

Zak Seidov, Oct 05 2002

Keywords

Comments

See also A064402 (s=1), A076297 (s=2), A076299 (s=4), A076300 (s=5).

Examples

			4 is OK because p(4) + 3*4 = 7 + 12 = 19 is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..500]| IsPrime(NthPrime(n) +3*n)]; // G. C. Greubel, May 04 2018
    
  • Mathematica
    Select[Range[300],PrimeQ[3#+Prime[#]]&] (* Harvey P. Dale, Sep 06 2012 *)
  • PARI
    select(x->isprime(x), vector(500, n, prime(n) + 3*n), 1) \\ G. C. Greubel, May 04 2018

A076299 Numbers k such that prime(k) + s*k is prime, s=4.

Original entry on oeis.org

2, 3, 4, 5, 6, 9, 15, 17, 20, 21, 22, 25, 27, 30, 31, 33, 42, 46, 54, 56, 58, 60, 62, 67, 72, 73, 78, 81, 84, 86, 87, 88, 90, 93, 96, 99, 100, 105, 111, 112, 113, 115, 119, 127, 128, 133, 135, 137, 145, 146, 151, 152, 162, 163, 164, 165, 168, 170, 172, 173, 176, 177
Offset: 1

Views

Author

Zak Seidov, Oct 05 2002

Keywords

Comments

See also A064402 (s=1), A076297 (s=2), A076298 (s=3), A076300 (s=5).

Examples

			4 is OK because p(4) + 4*4 = 7 + 16 = 23 is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..500]| IsPrime(NthPrime(n) +4*n)]; // G. C. Greubel, May 04 2018
    
  • Mathematica
    Select[Range[500], PrimeQ[Prime[#] + 4 #] &] (* G. C. Greubel, May 04 2018 *)
  • PARI
    select(x->isprime(x), vector(500, n, prime(n) + 4*n), 1) \\ G. C. Greubel, May 04 2018

A186102 Smallest prime p such that p == n (mod prime(n)).

Original entry on oeis.org

3, 2, 3, 11, 5, 19, 7, 103, 101, 97, 11, 197, 13, 229, 109, 281, 17, 79, 19, 233, 167, 101, 23, 113, 607, 127, 233, 349, 29, 821, 31, 163, 307, 173, 631, 1093, 37, 853, 373, 1597, 41, 223, 43, 1009, 439, 643, 47, 271, 503, 2111, 983, 769, 53, 1811, 569, 2423
Offset: 1

Views

Author

Zak Seidov, Feb 12 2011

Keywords

Comments

a(n) = n iff n is prime.

Examples

			Eighth prime is 19, and 103 is the smallest prime p such that p mod 19 is 8. Therefore a(8) = 103.
		

Crossrefs

Programs

  • Haskell
    a186102 n = f a000040_list where
       f (q:qs) = if (q - n) `mod` (a000040 n) == 0 then q else f qs
    -- Reinhard Zumkeller, Aug 21 2015
  • Magma
    Aux:=function(n); q:=NthPrime(n); p:=2; while p mod q ne n do p:=NextPrime(p); end while; return p; end function; [ Aux(n): n in [1..70] ]; // Klaus Brockhaus, Feb 12 2011
    
  • Mathematica
    k=200;Table[p=Prime[n];m=n;While[!PrimeQ[m],m=m+p];m,{n,k}]; (* For the first k terms. Zak Seidov, Dec 13 2013 *)
    Flatten[With[{prs=Prime[Range[500]]},Table[Select[prs,Mod[#,Prime[n]] == n&,1],{n,60}]]] (* Harvey P. Dale, Mar 30 2012 *)
  • Sage
    def A186102(n): np = nth_prime(n); return next(p for p in Primes() if p % np == n) # [D. S. McNeil, Feb 13 2011]
    

A254462 Primes prime(n) such that prime(n) + 5*n is also prime.

Original entry on oeis.org

2, 3, 13, 19, 29, 37, 43, 61, 113, 151, 163, 173, 223, 229, 239, 251, 311, 317, 337, 359, 373, 397, 409, 433, 503, 601, 647, 659, 673, 683, 757, 821, 857, 863, 887, 941, 1061, 1097, 1109, 1123, 1213, 1249, 1291, 1307, 1373, 1423, 1439, 1493, 1511, 1531, 1559
Offset: 1

Views

Author

Vincenzo Librandi, Feb 04 2015

Keywords

Examples

			prime(2)=3 is in the sequence because 3+5*2 = 13 is prime.
prime(6)=13 is in the sequence because 13+5*6 = 43 is prime.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..300] | IsPrime(NthPrime(n)+5*n)];
  • Maple
    P:= select(isprime, [2,seq(i,i=3..10000,2)]):
    P[select(i -> isprime(P[i]+5*i),[$1..nops(P)])]; # Robert Israel, Aug 01 2024
  • Mathematica
    Prime[Select[Range[300], PrimeQ[Prime[#] + 5 #] &]]
Showing 1-5 of 5 results.