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 21-25 of 25 results.

A231432 Primes p such that abs(p - 3*k) is also prime, where p is the k-th prime.

Original entry on oeis.org

3, 7, 13, 19, 31, 41, 47, 53, 61, 71, 79, 89, 101, 107, 113, 139, 151, 173, 193, 199, 223, 229, 239, 251, 271, 281, 293, 349, 373, 397, 433, 457, 463, 521, 541, 557, 569, 593, 601, 613, 619, 641, 647, 673, 683, 743, 787, 809, 839, 911, 941, 953, 971, 1013, 1049
Offset: 1

Views

Author

K. D. Bajpai, Nov 09 2013

Keywords

Examples

			The first prime, 2, is not a term since |2-3*1| = 1.
The second prime, 3, is a term, since |3-2*3| = 3 is a prime.
a(11) = 79 which is the 22nd prime, prime(22)-3*22 = 79-66 = 13 which is also prime.
a(15) = 113 which is the 30th prime, prime(30)-3*30 = 113-90 = 23 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).
Cf. A231383 (primes p : p+3*k is also prime).

Programs

  • Maple
    KD := proc() local a, b;  a:= ithprime(n); b:= abs(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]]
    Select[Table[{k,Prime[k]},{k,200}],PrimeQ[Abs[#[[2]]-3#[[1]]]]&][[;;,2]] (* Harvey P. Dale, Jul 14 2024 *)
  • PARI
    k=0;forprime(p=2,1e3,if(isprime(abs(p-k++*3)), print1(p", "))) \\ Charles R Greathouse IV, Mar 11 2014

A239743 Primes of the form prime(k)^3 + k.

Original entry on oeis.org

29, 347, 2203, 704993, 2248123, 2685653, 3442987, 81182821, 86938393, 95444081, 230346509, 1064332433, 1298596753, 1829276767, 2202074113, 3449796071, 4306879141, 6740558659, 8205739219, 9649993009, 11650768499, 14225261327, 15124198183, 19968681493, 21415471837
Offset: 1

Views

Author

K. D. Bajpai, Mar 26 2014

Keywords

Examples

			29 is in the sequence because prime(2)^3 + 2 = 29, which is prime.
347 is in the sequence because prime(4)^3 + 4 = 347, which is prime.
		

Crossrefs

Cf. A000040 (prime numbers).
Cf. A184935 (primes: k^2 + prime(k)).
Cf. A188831 (primes: k^2 - prime(k)).
Cf. A229203 (primes: k^3 - prime(k)).
Cf. A061068 (primes: prime(k) + k)
Cf. A212304 (primes: prime(k)^2 + k).

Programs

  • Magma
    [q: k in [1..1000] | IsPrime(q) where q is NthPrime(k)^3+k]; // Bruno Berselli, Mar 26 2014
  • Maple
    KD := proc() local a,b; a:= ithprime(n); b:=a^3+n; if isprime(b) then RETURN (b); fi; end: seq(KD(), n=1..1000);
  • Mathematica
    Select[Table[Prime[k]^3 + k, {k, 1000}], PrimeQ]
  • PARI
    s=[]; for(k=1, 1000, n=prime(k)^3+k; if(isprime(n), s=concat(s, n))); s \\ Colin Barker, Mar 26 2014
    

A254867 Numbers n such that prime(n) + n and prime(n) + n^2 are prime.

Original entry on oeis.org

1, 2, 4, 22, 66, 96, 106, 144, 180, 222, 324, 378, 466, 492, 604, 742, 760, 778, 784, 960, 984, 990, 994, 1050, 1150, 1162, 1186, 1248, 1302, 1308, 1356, 1360, 1380, 1744, 1830, 1866, 1870, 1956, 2052, 2070, 2112, 2182, 2212, 2380, 2470, 2556, 2586, 2638, 2676, 2760, 2766
Offset: 1

Views

Author

Zak Seidov, Feb 09 2015

Keywords

Examples

			a(4) = 22 = A064402(6): prime(22) = 79, 79 + {22, 22^2} = {101, 563} both prime.
		

Crossrefs

Subsequence of A064402. Cf. A000040, A014688, A061067, A061068.

Programs

  • Maple
    A254867:=n->`if`(isprime(ithprime(n)+n) and isprime(ithprime(n)+n^2), n, NULL): seq(A254867(n), n=1..10^4); # Wesley Ivan Hurt, Jan 16 2017
  • Mathematica
    Select[Range[1000], PrimeQ[Prime[#] + #] && PrimeQ[Prime[#] + #^2] &] (* Alonso del Arte, Feb 09 2015 *)
    Select[Range[3000],AllTrue[Prime[#]+{#,#^2},PrimeQ]&] (* Harvey P. Dale, Jan 17 2023 *)

A084294 Number of primes in the interval [prime(n),n+prime(n)].

Original entry on oeis.org

2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 4, 4, 3, 4, 4, 5, 5, 5, 5, 4, 5, 5, 7, 6, 6, 5, 5, 5, 5, 7, 7, 7, 7, 8, 7, 8, 9, 8, 8, 7, 7, 9, 8, 9, 8, 9, 11, 10, 10, 11, 10, 10, 9, 10, 11, 10, 9, 9, 9, 8, 10, 11, 11, 10, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 14, 15, 14, 13
Offset: 1

Views

Author

Labos Elemer, May 27 2003

Keywords

Crossrefs

Programs

  • Mathematica
    t[x_] := Table[w, {w, Prime[x], x+Prime[x]}] Table[Count[PrimeQ[t[n]], True], {n, 1, 128}] (* or *) Table[PrimePi[n+Prime[n]]-n+1, {n, 1, 25}];
  • PARI
    a(n) = primepi(n+prime(n)) - n + 1; \\ Michel Marcus, Aug 28 2019

Formula

a(n) = Pi(n+prime(n)) - n + 1 = A000720(n+A000040(n)) - n + 1. [corrected by Michel Marcus, Aug 28 2019]

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
Previous Showing 21-25 of 25 results.