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-10 of 20 results. Next

A061068 Primes which are the sum of a prime and its subscript.

Original entry on oeis.org

3, 5, 11, 19, 79, 101, 113, 127, 163, 173, 223, 271, 383, 419, 431, 503, 571, 599, 619, 641, 659, 673, 683, 701, 733, 757, 827, 863, 971, 1013, 1033, 1087, 1193, 1249, 1423, 1433, 1453, 1483, 1579, 1621, 1667, 1723, 2003, 2113, 2179, 2287, 2381, 2459, 2467
Offset: 1

Views

Author

Labos Elemer, May 28 2001

Keywords

Comments

a(n) = A061067(n-1) + A064402(n). - Leroy Quet, Jun 30 2006
This sequence is the intersection of A014688 with the set of primes. Conjecture: this sequence is infinite, yet derives from arbitrarily long "prime deserts" such as the 11 composites in A014688 between a(6) = 19 and a(18) = 79 and the 17 composites in A014688 between a(48) = 271 and a(66) = 383. - Jonathan Vos Post, Nov 22 2004
Primes not of the form n + pi(n-1). - Thomas Ordowski, Sep 21 2013
Except for the first pair (3, 5) no two consecutive primes are terms of the sequence. - Zak Seidov, Nov 10 2013

Examples

			5th term is 79=61+18=prime(18)+18.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[500], PrimeQ[Prime[ # ] + # ] &] + Prime[Select[Range[500], PrimeQ[Prime[ # ] + # ] &]] (* Stefan Steinerberger, Jul 21 2006 *)
  • PARI
    { n=0; m=0; forprime (p=2, 109567, if (isprime(p + m++), write("b061068.txt", n++, " ", p + m)) ) } \\ Harry J. Smith, Jul 17 2009

Extensions

Edited by N. J. A. Sloane, Apr 29 2007
Definition clarified by Jonathan Sondow, Jul 12 2012

A061067 m-th prime prime(m) is included iff prime(m) + m is also prime.

Original entry on oeis.org

2, 3, 7, 13, 61, 79, 89, 101, 131, 139, 181, 223, 317, 349, 359, 421, 479, 503, 521, 541, 557, 569, 577, 593, 619, 641, 701, 733, 827, 863, 881, 929, 1021, 1069, 1223, 1231, 1249, 1277, 1361, 1399, 1439, 1487, 1733, 1831, 1889, 1987, 2069, 2137, 2143, 2203
Offset: 0

Views

Author

Labos Elemer, May 28 2001

Keywords

Examples

			5th term here is 61 = prime(18) and 61 + 18 = 79.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..250] | IsPrime(NthPrime(n)+ n)]; // Vincenzo Librandi, Jan 19 2015
  • Mathematica
    Prime[Select[Range[500], PrimeQ[Prime[ # ] + # ] &]] (* Stefan Steinerberger, Jul 21 2006 *)
    Select[Prime[Range[400]],PrimeQ[#+PrimePi[#]]&] (* Harvey P. Dale, Oct 03 2016 *)
  • PARI
    { n=-1; m=0; forprime (p=2, 109597, if (isprime(p + m++), write("b061067.txt", n++, " ", p)) ) } \\ Harry J. Smith, Jul 17 2009
    

Formula

a(n) + A064402(n+1) = A061068(n+1). [corrected by Martin Fuller]

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Aug 23 2007

A231232 Primes p = prime(k) such that p + 2*k is prime.

Original entry on oeis.org

3, 5, 17, 23, 31, 37, 41, 43, 61, 89, 103, 107, 109, 113, 151, 163, 191, 193, 241, 251, 257, 269, 281, 307, 311, 313, 317, 359, 373, 409, 433, 463, 487, 557, 563, 593, 601, 607, 643, 647, 691, 701, 761, 787, 811, 823, 857, 863, 907, 911, 953, 977, 1019, 1033
Offset: 1

Views

Author

K. D. Bajpai, Nov 06 2013

Keywords

Examples

			31 = prime(11) is a term: prime(11) + 2*11 = 31 + 22 = 53 is also prime.
89 = prime(24) is a term: prime(24) + 2*24 = 89 + 48 = 137 is also prime.
		

Crossrefs

Cf. A061068 (primes: prime(m) plus its subscript).
Cf. A064402 (numbers n: prime(n)+n is prime).
Subsequence of A364877.

Programs

  • Magma
    [NthPrime(n): n in [1..250] | IsPrime(NthPrime(n)+2*n)]; // Vincenzo Librandi, Jan 19 2015
  • Maple
    KD := proc() local a,b;  a:= ithprime(n); b:= a+2*n; if isprime(b) then RETURN (a); fi; end: seq(KD(),n=1..500);
  • Mathematica
    t = Select[Table[{Prime[n], Prime[n] + 2*n}, {n, 200}], PrimeQ[#[[2]]] &]; Transpose[t][[1]] (* T. D. Noe, Nov 06 2013 *)
  • PARI
    is(n)=isprime(n+2*primepi(n)) && isprime(n) \\ Charles R Greathouse IV, Aug 25 2014
    

Extensions

Name edited by David A. Corneth, Sep 07 2023

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

A100915 Numbers n such that n plus n-th semiprime is semiprime.

Original entry on oeis.org

4, 6, 9, 12, 16, 18, 19, 20, 24, 29, 31, 34, 35, 39, 40, 44, 46, 49, 51, 54, 55, 72, 73, 76, 79, 80, 81, 84, 87, 91, 93, 94, 96, 98, 110, 113, 116, 120, 128, 130, 136, 137, 148, 150, 154, 159, 165, 168, 170, 172, 175, 188, 190, 191, 199, 200, 206, 215, 217, 220, 230
Offset: 1

Views

Author

Ray Chandler, Nov 26 2004

Keywords

Comments

This is the semiprime analog of A064402.

Examples

			a(3) = 9 because 9 + semiprime(9) = 9 + 25 = 34 is semiprime.
		

Crossrefs

Programs

  • Mathematica
    With[{c=Select[Range[1000],PrimeOmega[#]==2&]},Transpose[Select[Thread[ {c,Range[ Length[c]]}], PrimeOmega[Total[#]]==2&]][[2]]] (* Harvey P. Dale, Oct 25 2011 *)

Formula

a(n) = A100466(n) - A100916(n) = A100466(n) - A001358(A100915(n)).

A231383 Primes p such that p + 3*k is also prime, where p is k-th prime.

Original entry on oeis.org

2, 7, 13, 19, 29, 37, 53, 71, 101, 107, 131, 139, 163, 173, 181, 199, 223, 229, 263, 281, 293, 311, 337, 397, 443, 463, 491, 557, 569, 659, 673, 719, 733, 787, 809, 827, 839, 857, 953, 983, 1013, 1069, 1091, 1109, 1151, 1223, 1249, 1283, 1307, 1451, 1493, 1549
Offset: 1

Views

Author

K. D. Bajpai, Nov 08 2013

Keywords

Examples

			a(5)= 29 which is 10th prime.  prime(10)+3*10= 29+30= 59 which is also prime.
a(7)= 53 which is 16th prime.  prime(16)+3*16= 53+48= 101 which is also prime.
		

Crossrefs

Cf. A061068 (primes: prime(m) plus its subscript).
Cf. A064402 (numbers n: prime(n)+n is prime).
Cf. A231232 (primes p : p+2*k is also prime).

Programs

  • Magma
    [NthPrime(n): n in [1..250] | IsPrime(NthPrime(n)+3*n)]; // Vincenzo Librandi, Jan 19 2015
  • Maple
    KD := proc() local a, b;  a:= ithprime(n); b:= a+3*n; if isprime(b) then RETURN (a); fi; end: seq(KD(), n=1..500);
  • Mathematica
    KD = Select[Table[{Prime[n], Prime[n] + 3*n}, {n, 200}], PrimeQ[#[[2]]] &]; Transpose[KD][[1]]
  • PARI
    is(n)=isprime(n) && isprime(n+3*primepi(n)) \\ Charles R Greathouse IV, Nov 08 2013
    

A076300 Numbers k such that prime(k) + s*k is prime, s=5.

Original entry on oeis.org

1, 2, 6, 8, 10, 12, 14, 18, 30, 36, 38, 40, 48, 50, 52, 54, 64, 66, 68, 72, 74, 78, 80, 84, 96, 110, 118, 120, 122, 124, 134, 142, 148, 150, 154, 160, 178, 184, 186, 188, 198, 204, 210, 214, 220, 224, 228, 238, 240, 242, 246, 250, 252, 254, 258, 260, 268, 270
Offset: 1

Views

Author

Zak Seidov, Oct 05 2002

Keywords

Examples

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

Crossrefs

Cf. A064402 (s=1), A076297 (s=2), A076298 (s=3), A076299 (s=4).

Programs

  • Magma
    [n: n in [0..500]| IsPrime(NthPrime(n) +5*n)]; // Vincenzo Librandi, Apr 06 2011
    
  • Mathematica
    Select[Range[300],PrimeQ[Prime[#]+5#]&] (* Harvey P. Dale, Nov 27 2013 *)
  • PARI
    select(x->isprime(x), vector(500, n, prime(n) + 5*n), 1) \\ Michel Marcus, Jan 15 2015
    
  • PARI
    isok(n) = isprime(prime(n) + 5*n); \\ Michel Marcus, May 05 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]
    
Showing 1-10 of 20 results. Next