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 14 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

A064402 Numbers n such that prime(n)+n is a prime, where prime(n) denotes the n-th prime number.

Original entry on oeis.org

1, 2, 4, 6, 18, 22, 24, 26, 32, 34, 42, 48, 66, 70, 72, 82, 92, 96, 98, 100, 102, 104, 106, 108, 114, 116, 126, 130, 144, 150, 152, 158, 172, 180, 200, 202, 204, 206, 218, 222, 228, 236, 270, 282, 290, 300, 312, 322, 324, 328, 330, 350, 352, 356, 362, 378, 384
Offset: 1

Views

Author

Robert G. Wilson v, Sep 28 2001

Keywords

Comments

a(n) = order among the primes of A061067(n).
Except for the first one all terms are even. Conjecture: First differences include all even integers. - Zak Seidov, Nov 10 2013

Crossrefs

Programs

  • Magma
    [n: n in [0..500]| IsPrime(NthPrime(n) +n)]; // Vincenzo Librandi, Apr 06 2011
  • Mathematica
    Select[ Range[ 400 ], PrimeQ[ Prime[ # ] + # ] & ]
  • PARI
    { n=0; for (m=1, 10^9, if (isprime(prime(m) + m), write("b064402.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Sep 13 2009
    

Formula

a(n) = A061068(n) - A061067(n-1).
A014688(a(n)) = A061068(n). - Zak Seidov, Nov 10 2013

Extensions

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

A077510 Numbers k such that k + pi(k) is a prime.

Original entry on oeis.org

2, 3, 7, 9, 12, 13, 21, 28, 32, 36, 45, 52, 55, 57, 61, 65, 70, 76, 79, 81, 84, 86, 89, 101, 104, 110, 119, 121, 131, 135, 139, 145, 147, 155, 160, 162, 172, 181, 185, 187, 195, 205, 216, 222, 223, 228, 231, 253, 258, 262, 273, 278, 286, 288, 292, 297, 305, 310
Offset: 1

Views

Author

Amarnath Murthy, Nov 08 2002

Keywords

Comments

Conjecture: for k > 5, prime(n) <= k < prime(n+1) <= k + pi(k), i.e., the smallest prime greater than k is <= k + pi(k). Equality holds for k = 7.

Examples

			21 is a member as 21 + pi(21) = 21 + 8 = 29 is a prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[350],PrimeQ[#+PrimePi[#]]&] (* Harvey P. Dale, Nov 19 2011 *)
  • PARI
    for(n=1,200,if(isprime(n+primepi(n)),print1(n,", "))) \\ Derek Orr, Jun 22 2015
    
  • PARI
    pi=0; p=2; forprime(q=3,1e3, pi++; for(n=p,q-1, if(isprime(n+pi), print1(n", "))); p=q) \\ Charles R Greathouse IV, Jun 23 2015

Extensions

More terms from David Garber, Nov 10 2002

A100916 Sum of a semiprime and its semiprime index is a new semiprime.

Original entry on oeis.org

10, 15, 25, 34, 46, 51, 55, 57, 69, 86, 91, 95, 106, 119, 121, 133, 141, 145, 155, 161, 166, 217, 218, 226, 247, 249, 253, 262, 274, 291, 298, 299, 302, 305, 341, 358, 365, 382, 407, 413, 445, 446, 481, 485, 501, 515, 533, 538, 543, 551, 559, 614, 623, 626
Offset: 1

Views

Author

Ray Chandler, Nov 26 2004

Keywords

Comments

This is the semiprime analog of A061067.

Examples

			a(1) = 10 because 10 = semiprime(4) and semiprime(4) + 4 = 14 is
semiprime.
a(2) = 15 because 15 = semiprime(6) and semiprime(6) + 6 = 21 is
semiprime.
		

Crossrefs

Programs

  • Mathematica
    Module[{sp=Select[Range[1000],PrimeOmega[#]==2&],len},len=Length[sp];Select[ Thread[{sp,Range[len]}],PrimeOmega[Total[#]]==2&]][[All,1]] (* Harvey P. Dale, Jan 13 2019 *)

Formula

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

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 #] &]]

A227420 Primes p such that p - pi(p) is also prime.

Original entry on oeis.org

5, 7, 13, 19, 29, 43, 53, 61, 107, 113, 181, 193, 229, 251, 317, 337, 383, 433, 463, 491, 601, 827, 857, 887, 997, 1033, 1061, 1163, 1193, 1307, 1373, 1531, 1693, 1699, 1721, 1789, 1811, 1831, 1931, 2003, 2029, 2267, 2339, 2347, 2383, 2411, 2423, 2531, 2579, 2617
Offset: 1

Views

Author

Zak Seidov, Sep 16 2013

Keywords

Comments

Note that pi(p) are all even, except for the first term. Differs from A101324.

Crossrefs

Programs

  • Maple
    5 = A000040(3) and 5 - 3 = 2 prime, 43 = A000040(14) and 43 - 14 = 29 prime.
  • Mathematica
    fQ[p_] := PrimeQ[p - PrimePi[p]]; Select[ Prime@ Range@ 400, fQ] (* Robert G. Wilson v, Dec 19 2014 *)
  • PARI
    is(n)=isprime(n) && isprime(n-primepi(n)) \\ Charles R Greathouse IV, Sep 16 2013
    
  • PARI
    v=primes(10^4); for(i=1,#v,if(isprime(v[i]-i),print1(v[i]", "))) \\ Charles R Greathouse IV, Sep 16 2013

A254665 Primes prime(n) such that prime(n) + 7*n is also prime.

Original entry on oeis.org

3, 71, 79, 89, 101, 199, 271, 281, 293, 349, 359, 433, 463, 479, 569, 577, 641, 659, 701, 743, 769, 787, 809, 839, 863, 911, 953, 1013, 1033, 1049, 1109, 1181, 1249, 1277, 1321, 1361, 1399, 1429, 1451, 1459, 1481, 1511, 1549, 1571, 1627, 1693, 1733, 1759, 1889
Offset: 1

Views

Author

Vincenzo Librandi, Feb 04 2015

Keywords

Examples

			prime(2)=3 is in the sequence because 3+7*2 = 17 is prime.
prime(20)=71 is in the sequence because 71+7*20 = 211 is prime.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..300] | IsPrime(NthPrime(n)+7*n)];
  • Mathematica
    Prime[Select[Range[300], PrimeQ[Prime[#] + 7# ]&]]

A254672 Primes prime(n) such that prime(n) + 6*n is also prime.

Original entry on oeis.org

5, 7, 11, 17, 19, 29, 31, 37, 43, 47, 53, 67, 71, 73, 79, 89, 101, 109, 113, 127, 149, 151, 157, 167, 181, 191, 193, 197, 227, 257, 263, 271, 277, 281, 331, 347, 349, 379, 383, 431, 433, 449, 467, 479, 499, 509, 521, 523, 547, 563, 569, 571, 577, 587, 619, 631
Offset: 1

Views

Author

Vincenzo Librandi, Feb 05 2015

Keywords

Examples

			prime(5) = 11 is in the sequence because 11 + 6*5 = 41 is prime.
prime(8) = 19 is in the sequence because 19 + 6*8 = 67 is prime.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..200] | IsPrime(NthPrime(n)+6*n)]
  • Mathematica
    Prime[Select[Range[150], PrimeQ[Prime[#] + 6 #] &]]

A254673 Primes prime(n) such that prime(n) + 4*n is also prime.

Original entry on oeis.org

3, 5, 7, 11, 13, 23, 47, 59, 71, 73, 79, 97, 103, 113, 127, 137, 181, 199, 251, 263, 271, 281, 293, 331, 359, 367, 397, 419, 433, 443, 449, 457, 463, 487, 503, 523, 541, 571, 607, 613, 617, 631, 653, 709, 719, 751, 761, 773, 829, 839, 877, 881, 953, 967, 971
Offset: 1

Views

Author

Vincenzo Librandi, Feb 05 2015

Keywords

Examples

			prime(4)=7 is in the sequence because 7+4*4 = 23 is prime.
prime(6)=13 is in the sequence because 13+4*6 = 37 is prime.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..200] | IsPrime(NthPrime(n)+4*n)]
  • Mathematica
    Prime[Select[Range[180], PrimeQ[Prime[#] + 4 #] &]]
Showing 1-10 of 14 results. Next