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 11 results. Next

A234694 a(n) = |{0 < k < n: p = k + prime(n-k) and prime(p) - p + 1 are both prime}|.

Original entry on oeis.org

0, 1, 0, 2, 1, 2, 1, 0, 0, 2, 2, 4, 1, 1, 2, 4, 2, 1, 1, 2, 3, 3, 2, 3, 1, 1, 1, 3, 5, 4, 3, 4, 3, 3, 3, 2, 4, 3, 2, 5, 4, 4, 4, 1, 1, 5, 4, 2, 1, 2, 5, 5, 2, 3, 4, 2, 3, 5, 7, 7, 6, 2, 5, 6, 2, 5, 4, 4, 7, 6, 6, 5, 4, 8, 7, 4, 5, 3, 5, 7, 3, 5, 4, 7, 6, 7, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Dec 29 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 9. Also, for any integer n > 51 there is a positive integer k < n such that p = k + prime(n-k) and prime(p) + p + 1 are both prime.
(ii) If n > 9 (or n > 21), then there is a positive integer k < n such that m - 1 and prime(m) + m (or prime(m) - m, resp.) are both prime, where m = k + prime(n-k).
(iii) If n > 483, then for some 0 < k < n both prime(m) + m and prime(m) - m are prime, where m = k + prime(n-k).
(iv) If n > 3, then there is a positive integer k < n such that prime(k + prime(n-k)) + 2 is prime.
Clearly, part (i) of the conjecture implies that there are infinitely many primes p with prime(p) - p + 1 (or prime(p) + p + 1) also prime.
See A234695 for primes p with prime(p) - p + 1 also prime.

Examples

			a(5) = 1 since 2 + prime(3) = 7 and prime(7) - 6 = 11 are both prime.
a(25) = 1 since 20 + prime(5) = 31 and prime(31) - 30 = 97 are both prime.
a(27) = 1 since 18 + prime(9) = 41 and prime(41) - 40 = 139 are both prime.
a(45) = 1 since 6 + prime(39) = 173 and prime(173) - 172 = 859 are both prime.
a(49) = 1 since 26 + prime(23) = 109 and prime(109) - 108 = 491 are both prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_,k_]:=k+Prime[n-k]
    q[n_,k_]:=PrimeQ[f[n,k]]&&PrimeQ[Prime[f[n,k]]-f[n,k]+1]
    a[n_]:=Sum[If[q[n,k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

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

A232861 Numbers k with k - 1, k + 1, prime(k) - k, prime(k) + k, k*prime(k) - 1, k*prime(k) + 1 all prime.

Original entry on oeis.org

22110, 23742, 128238, 275592, 346560, 1061910, 1281522, 1339002, 1378188, 1461600, 1850130, 2064150, 2354952, 2478270, 2523708, 2689260, 2694300, 3916638, 4422618, 4933530, 6179082, 6541080, 6641562, 6740478, 6759030, 7315812, 8484798, 8711010, 9133308, 9687720
Offset: 1

Views

Author

Zhi-Wei Sun, Dec 01 2013

Keywords

Comments

Obviously, each term of the sequence is a multiple of 6.
Conjecture: (i) This sequence contains infinitely many terms.
(ii) Let P(x) be a non-constant integer-valued polynomial with positive leading coefficient. Then, there are infinitely many positive integers k with prime(k) - k in the range P(Z) = {P(m): m is an integer}, if and only if the degree of P(x) is at most 3. We may also replace prime(k) - k by prime(k) + k.

Examples

			a(1) = 22110 with the six numbers 22110 - 1 = 22109, 22110 + 1 = 22111, prime(22110) - 22110 = 228841, prime(22110) + 22110 = 273061, 22110*prime(22110) - 1 = 5548526609, 22110*prime(22110) + 1 = 5548526611 all prime.
		

Crossrefs

Programs

  • Mathematica
    n=0
    Do[If[PrimeQ[k-1]&&PrimeQ[k+1]&&PrimeQ[Prime[k]-k]&& PrimeQ[Prime[k]+k]&& PrimeQ[k*Prime[k]-1]&& PrimeQ[k*Prime[k]+1],n=n+1;Print[n," ",k]],{k,1,9700000}]

A064270 Primes of the form prime(k) - k; or primes arising in A014689.

Original entry on oeis.org

2, 3, 7, 11, 19, 29, 37, 43, 79, 83, 139, 149, 179, 197, 251, 269, 307, 349, 373, 397, 491, 683, 709, 733, 829, 859, 883, 971, 997, 1093, 1153, 1289, 1429, 1433, 1453, 1511, 1531, 1549, 1637, 1699, 1721, 1931, 1993, 1999, 2029, 2053, 2063, 2161, 2203
Offset: 1

Views

Author

Jason Earls, Sep 23 2001

Keywords

Crossrefs

Cf. A064269.

Programs

  • Mathematica
    t={}; Do[If[PrimeQ[q=Prime[n]-n], AppendTo[t,q]], {n,378}]; t (* Jayanta Basu, May 14 2013 *)
  • PARI
    j=[]; for(n=1,500, if(isprime(prime(n)-n), j=concat(j, prime(n)-n))); j
    
  • PARI
    { n=0; for (m=1, 10^9, if (isprime(prime(m) - m), write("b064270.txt", n++, " ", prime(m) - m); if (n==1000, break)) ) } \\ Harry J. Smith, Sep 11 2009

A238881 Number of odd primes p < 2*n with prime(n*(p+1)/2) + n*(p+1)/2 prime.

Original entry on oeis.org

0, 1, 1, 0, 0, 2, 1, 3, 1, 2, 2, 5, 2, 3, 2, 4, 3, 5, 2, 3, 2, 4, 1, 8, 4, 4, 4, 3, 2, 5, 2, 4, 4, 4, 4, 8, 2, 4, 2, 5, 4, 6, 3, 2, 6, 6, 3, 11, 6, 10, 4, 8, 2, 11, 4, 7, 4, 7, 2, 12, 4, 6, 2, 6, 3, 8, 3, 5, 8, 12, 6, 12, 4, 15, 8, 11, 5, 12, 2, 11
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 06 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5, and a(n) = 1 only for n = 2, 3, 7, 9, 23. Moreover, for any r = 1,-1 and n > 5*(2+r) there is a positive integer k < n such that 2*k+r and prime(k*n)+k*n are both prime.
(ii) If n > 1 is not equal to 13, then prime(k*n) - k*n is prime for some k = 1, ..., n.
This conjecture implies that there are infinitely many positive integers m with prime(m) + m (or prime(m) - m) prime.

Examples

			a(7) = 1 since 11 and prime(7*(11+1)/2) + 7*(11+1)/2 = prime(42) + 42 = 181 + 42 = 223 are both prime.
a(23) = 1 since 7 and prime(23*(7+1)/2) + 23*(7+1)/2 = prime(92) + 92 = 479 + 92 = 571 are both prime.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28--Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169--187. (See Conjecture 3.21(i) and note that the typo 2k+1 there should be 2k-1.)

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[Prime[n]+n]
    p[k_,n_]:=PQ[(Prime[k]+1)/2*n]
    a[n_]:=Sum[If[p[k,n],1,0],{k,2,PrimePi[2n-1]}]
    Table[a[n],{n,1,80}]
  • PARI
    a(n) = {my(nb = 0); forprime(p=3, 2*n, if (isprime(prime(n*(p+1)/2) + n*(p+1)/2), nb++);); nb;} \\ Michel Marcus, Sep 21 2015

A105962 Numbers k such that prime(k^2) - k is prime.

Original entry on oeis.org

2, 30, 38, 44, 74, 82, 88, 96, 106, 114, 132, 138, 140, 160, 162, 184, 230, 276, 278, 280, 298, 304, 316, 318, 332, 342, 414, 420, 428, 450, 470, 480, 540, 580, 584, 600, 638, 668, 672, 678, 680, 684, 728, 750, 754, 766, 768, 788, 798, 848, 858, 860, 902, 930
Offset: 1

Views

Author

Tanya Khovanova, Dec 26 2006

Keywords

Crossrefs

Cf. A064269 (prime(k) - k is prime), A130135 (prime(k^3) - k is prime).

Programs

  • Mathematica
    Select[Range[1000], PrimeQ[Prime[ #^2] - # ] &]
  • PARI
    is(k) = isprime(prime(k^2)-k); \\ Jinyuan Wang, Apr 10 2020

A130135 Numbers k such that prime(k^3) - k is prime.

Original entry on oeis.org

2, 4, 12, 30, 40, 42, 62, 66, 70, 72, 84, 88, 98, 112, 130, 150, 180, 248, 264, 298, 336, 342, 354, 408, 438, 450, 468, 482, 486, 546, 550, 558, 602, 606, 682, 686, 700, 710, 720, 732, 744, 770, 774, 804, 840, 848, 854, 948, 968, 976, 994, 996, 1048, 1056
Offset: 1

Views

Author

Jani Melik, Aug 01 2007

Keywords

Examples

			a(1)=2 because prime(2^3) - 2 = 19 - 2 = 17 (a prime),
a(2)=4 because prime(4^3) - 4 = 311 - 4 = 307 (a prime),
a(3)=12 because prime(12^3) - 12 = 14741 (a prime), ...
		

Crossrefs

Cf. A064269 (prime(k) - k is prime), A105962 (prime(k^2) - k is prime).

Programs

  • Maple
    ts_pra_3:=proc(n) local i,ans; ans := [ ]: for i from 1 to n do if (isprime(ithprime(i^(3))-i)) then ans := [ op(ans), i ]: fi: od; RETURN(ans) end: ts_pra_3(200);
  • Mathematica
    Select[Range[1100],PrimeQ[Prime[#^3]-#]&] (* Harvey P. Dale, Mar 24 2023 *)
  • PARI
    is(k) = isprime(prime(k^3)-k); \\ Jinyuan Wang, Apr 10 2020

Extensions

a(18)-a(32) from Jinyuan Wang, Apr 10 2020
a(33)-a(44) from Tyler NeSmith, Apr 15 2022
a(45)-a(54) from Jon E. Schoenfield, Apr 15 2022

A233539 a(n) = |{0 < k < n-2: m - 1, m + 1, prime(m) - m and prime(m) + m are all prime with m = phi(k) + phi(n-k)/2}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 3, 2, 4, 2, 4, 4, 2, 4, 3, 5, 1, 4, 2, 3, 1, 2, 2, 2, 1, 1, 0, 0, 1, 4, 0, 1, 2, 0, 5, 2, 4, 4, 1, 3, 3, 3, 2, 3, 8, 2, 2, 3, 5, 5, 4, 3, 5, 3, 4, 3, 1, 3, 8, 4, 5, 4, 2, 6, 0, 12, 2, 4, 1, 5, 0, 4, 1, 4, 3, 3, 2, 5, 4, 7, 5, 3, 11, 1, 5, 4, 3, 4, 6, 2, 2, 5, 5, 6, 4, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 13 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 794.
(ii) For any integer n > 59, there is a positive integer k < n such that m = phi(k) + phi(n-k)/4 is an integer with prime(m) - m and prime(m) + m both prime.
Clearly, part (i) of the conjecture implies that there are infinitely many positive integers m with m - 1, m + 1, prime(m) - m and prime(m) + m all prime.

Examples

			a(21) = 1 since phi(6) + phi(15)/2 = 6 with 6 - 1 = 5, 6 + 1 = 7, prime(6) - 6 = 7 and prime(6) + 6 = 19 all prime.
a(25) = 1 since phi(17) + phi(8)/2 = 18 with 18 - 1 = 17, 18 + 1 = 19, prime(18) - 18 = 43 and prime(18) + 18 = 79 all prime.
		

Crossrefs

Programs

  • Mathematica
    q[n_]:=PrimeQ[n-1]&&PrimeQ[n+1]&&PrimeQ[Prime[n]-n]&&PrimeQ[Prime[n]+n]
    f[n_,k_]:=EulerPhi[k]+EulerPhi[n-k]/2
    a[n_]:=Sum[If[q[f[n,k]],1,0],{k,1,n-3}]
    Table[a[n],{n,1,100}]

A270821 Numbers n such that F(n) - n is a prime, where F(n) denotes the n-th Fibonacci number.

Original entry on oeis.org

6, 8, 16, 26, 28, 76, 148, 159, 808, 848, 916, 1143, 4036, 4959, 43239, 73432, 98716, 144039, 146132
Offset: 1

Views

Author

Paolo P. Lava, Mar 30 2016

Keywords

Examples

			fibonacci(6) - 6 = 8 - 6 = 2 that is a prime;
fibonacci(8) - 8 = 21 - 8 = 13 that is a prime.
		

Crossrefs

Programs

  • Maple
    with(combinat): P:=proc(q) local n;
    for n from 0 to q do
    if isprime(fibonacci(n)-n) then print(n); fi; od; end: P(10^5);
  • Mathematica
    Select[Range[150000],PrimeQ[Fibonacci[#]-#]&] (* Harvey P. Dale, May 03 2018 *)
  • PARI
    lista(nn) = {for(n=1, nn, if(ispseudoprime(fibonacci(n)-n), print1(n, ", ")));} \\ Altug Alkan, Mar 30 2016

Extensions

a(15)-a(19) from Giovanni Resta, Apr 14 2016

A107295 Numbers k such that prime(k^2) - k^2 is prime.

Original entry on oeis.org

2, 4, 12, 14, 20, 42, 48, 56, 60, 88, 104, 120, 126, 134, 138, 160, 164, 182, 186, 204, 226, 254, 270, 276, 312, 316, 330, 336, 350, 382, 408, 410, 414, 422, 438, 448, 450, 480, 492, 494, 502, 522, 546, 568, 580, 596, 620, 624, 640, 650, 690, 696
Offset: 1

Views

Author

Zak Seidov, May 20 2005

Keywords

Examples

			88 is in the sequence because prime(88^2) - 88^2 = prime(7744) - 7744 = 78977 - 7744 = 71233 = prime(7051).
		

Crossrefs

Cf. A064269 (prime(n)-n is prime), A141129 (prime(n^2)-n^2).

Programs

  • Mathematica
    Select[Range[700],PrimeQ[Prime[#^2]-#^2]&] (* Harvey P. Dale, Jun 20 2015 *)
  • PARI
    isok(n) = isprime(prime(n^2) - n^2); \\ Michel Marcus, Oct 09 2013

Extensions

More terms from Michel Marcus, Oct 09 2013
Showing 1-10 of 11 results. Next