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.

A260376 Values of n such that prime(prime(n)) + n is a prime number.

Original entry on oeis.org

2, 6, 16, 20, 30, 42, 78, 90, 92, 102, 108, 118, 124, 126, 128, 132, 136, 150, 160, 166, 180, 182, 186, 194, 196, 202, 206, 210, 214, 230, 270, 280, 294, 348, 356, 358, 366, 370, 374, 378, 418, 436, 456, 458, 472, 474, 478, 492, 522, 546, 556, 560, 570, 584, 586, 590
Offset: 1

Views

Author

Altug Alkan, Aug 29 2015

Keywords

Comments

Inspired by A061068.
Obviously, sequence only can include even numbers.
Initial primes of the form prime(prime(n)) + n are 7, 47, 257, 373, 647, 1129, 2797, 3389, 3499, 4129, 4447.

Examples

			For n=2, prime(prime(2)) + 2 = prime(3) + 2 = 7. 7 is a prime number.
		

Crossrefs

Cf. A006450.

Programs

  • Magma
    [n: n in [1..600] | IsPrime(NthPrime(NthPrime(n))+n)]; // Vincenzo Librandi, Aug 30 2015
    
  • Mathematica
    Select[Range[600], PrimeQ[Prime[Prime[#]] + #] &] (* Vincenzo Librandi, Aug 30 2015 *)
  • PARI
    for(n=1, 1e3, if(isprime(prime(prime(n))+n), print1(n", ")))
    
  • Perl
    use ntheory ":all"; my @p = grep { is_prime(nth_prime(nth_prime($))+$) } 1..10000; say join ", ", @p; # Dana Jacobsen, Sep 02 2015