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-30 of 37 results. Next

A234850 Primes in A014692, i.e., of the form prime(k)-k+1, for some k.

Original entry on oeis.org

2, 2, 3, 7, 11, 29, 43, 53, 61, 73, 97, 139, 149, 179, 223, 283, 313, 349, 373, 461, 467, 491, 541, 599, 619, 659, 727, 787, 859, 907, 911, 919, 941, 1019, 1087, 1091, 1187, 1223, 1249, 1283, 1301, 1321, 1433, 1471, 1481, 1511, 1523, 1543
Offset: 1

Views

Author

M. F. Hasler, Dec 31 2013

Keywords

Comments

The first term is listed twice because A014692(1) = 2-1+1 = A014692(2) = 3-2+1 = 2 both are prime; thereafter the sequence A014692 is strictly increasing, so there is no other duplicate value.

Crossrefs

Cf. A234695.

Programs

  • PARI
    for(k=1,999,isprime(p=prime(k)-k+1)&&print1(p","))

Formula

a(n) = prime(A234851(n)), prime = A000040.

A234852 Indices k of primes p=prime(k) such that prime(p)-p+1 is prime.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 9, 11, 13, 14, 18, 20, 23, 24, 27, 29, 34, 36, 40, 42, 46, 47, 48, 53, 58, 59, 60, 62, 63, 64, 66, 68, 70, 71, 73, 90, 95, 100, 103, 105, 110, 121, 122, 127, 128, 132, 133, 134, 141, 143, 144, 153, 155, 156, 162
Offset: 1

Views

Author

M. F. Hasler, Dec 31 2013

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[200],PrimeQ[Prime[Prime[#]]-Prime[#]+1]&] (* Harvey P. Dale, Jul 14 2024 *)
  • PARI
    for(k=1,999,isprime(prime(p=prime(k))-p+1)&&print1(k","))

Formula

a(n) = PrimePi(A234695(n)), PrimePi = A000720.

A235508 Number of ways to write 2*n = p + q with q > 0 such that p, p*(p+1) - prime(p) and prime(q) - q + 1 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 14 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.

Examples

			a(7) = 1 since 2*7 = 11 + 3 with 11, 11*12 - prime(11) = 101 and prime(3) - 3 + 1 = 3 all prime.
a(19) = 1 since 2*19 = 37 + 1 with 37, 37*38 - prime(37) = 1249 and prime(1) - 1 + 1 = 2 all prime.
a(98) = 1 since 2*98 = 11 + 185 with 11, 11*12 - prime(11) = 101 and prime(185) - 185 + 1 = 919 all prime.
		

Crossrefs

Programs

  • Mathematica
    p[k_]:=PrimeQ[Prime[k](Prime[k]+1)-Prime[Prime[k]]]
    q[m_]:=PrimeQ[Prime[m]-m+1]
    a[n_]:=Sum[If[p[k]&&q[2n-Prime[k]],1,0],{k,1,PrimePi[2n-1]}]
    Table[a[n],{n,1,100}]

A235935 Primes p with f(p), f(f(p)), f(f(f(p))), f(f(f(f(p)))) all prime, where f(n) = prime(n) - n + 1.

Original entry on oeis.org

2, 3, 2861, 8753, 56821, 83449, 162787, 165883, 167197, 186397, 217309, 261721, 275939, 309493, 355571, 382351, 467293, 501187, 539303, 560029, 602839, 640307, 657299, 708959, 879859, 919129, 973813, 1057741, 1085779, 1115899, 1156031, 1302667, 1366297, 1396427, 1516279, 1580461, 1760419, 1829797, 1867249, 1870021
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 17 2014

Keywords

Comments

By the general conjecture in A235925, this sequence should have infinitely many terms.

Examples

			a(3) = 2861 with 2861, f(2861) = 23143, f(23143) = 240769 and f(240769) = 3117791 and f(3117791) =  48951967 all prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Prime[n]-n+1
    p[k_]:=PrimeQ[f[Prime[k]]]&&PrimeQ[f[f[Prime[k]]]]&&PrimeQ[f[f[f[Prime[k]]]]]&&PrimeQ[f[f[f[f[Prime[k]]]]]]
    n=0;Do[If[p[k],n=n+1;Print[n," ",Prime[k]]],{k,1,100000}]

A238756 Number of ordered ways to write n = k + m (k > 0 and m > 0) such that 2*k + 1, prime(prime(k)) - prime(k) + 1 and prime(prime(m)) - prime(m) + 1 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 05 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
We have verified this for n up to 10^7.
The conjecture suggests that there are infinitely many primes p with 2*pi(p) + 1 and prime(p) - p + 1 both prime.

Examples

			a(6) = 2 since 6 = 2 + 4 with 2*2 + 1 = 5, prime(prime(2)) - prime(2) + 1 = prime(3) - 3 + 1 = 3 and prime(prime(4)) - prime(4) + 1 = prime(7) - 7 + 1 = 17 - 6 = 11 all prime, and 6 = 3 + 3 with 2*3 + 1 = 7 and prime(prime(3)) - prime(3) + 1 = prime(5) - 5 + 1 = 11 - 4 = 7 both prime.
		

Crossrefs

Programs

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

A238814 Primes p with prime(p) - p + 1 and prime(q) - q + 1 both prime, where q is the first prime after p.

Original entry on oeis.org

2, 3, 5, 13, 41, 83, 199, 211, 271, 277, 293, 307, 349, 661, 709, 743, 751, 823, 907, 1117, 1447, 1451, 1741, 1747, 2203, 2371, 2803, 2819, 2861, 2971, 3011, 3251, 3299, 3329, 3331, 3691, 3877, 4021, 4027, 4049, 4051, 4093, 4129, 4157, 4447, 4513, 4549, 4561, 4751, 4801, 5179, 5479, 5519, 5657, 5813, 6007, 6011, 6571, 7057, 7129
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 05 2014

Keywords

Comments

Conjecture: The sequence is infinite, in other words, A234695 contains infinitely many consecutive prime pairs prime(k) and prime(k+1).
This is motivated by the comments in A238766 and A238776, and the sequence is a subsequence of A234695.

Examples

			a(1) = 2 since prime(2) - 2 + 1 = 3 - 1 = 2 and prime(3) - 3 + 1 = 5 - 2 = 3 are both prime.
a(2) = 3 since prime(3) - 3 + 1 = 5 - 2 = 3 and prime(5) - 5 + 1 = 11 - 4 = 7 are both prime.
		

Crossrefs

Programs

  • Mathematica
    p[k_]:=PrimeQ[Prime[Prime[k]]-Prime[k]+1]
    n=0
    Do[If[p[k]&&p[k+1],n=n+1;Print[n," ",Prime[k]]],{k,1,914}]
    Select[Prime[Range[1000]],AllTrue[{Prime[#]-#+1,Prime[NextPrime[#]]-NextPrime[ #]+1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 24 2019 *)
  • PARI
    step(p,k)=k++;while(k--,p=nextprime(p+1)); p
    p=0;forprime(r=2,1e6,if(isprime(p++) && isprime(r-p+1), q=nextprime(p+1); if(isprime(step(r,q-p)-q+1), print1(p", ")))) \\ Charles R Greathouse IV, Mar 06 2014

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 17 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 24.
This implies that there are infinitely many primes p with prime(p) - p + 1 and (p^2 - 1)/4 - prime(p) both prime.

Examples

			 a(30) = 1 since prime(6) + phi(24)/2 = 13 + 4 = 17, prime(17) - 16 = 59 - 16 = 43 and (17^2 - 1)/4 - prime(17) = 72 - 59 = 13 are all prime.
  a(35) = 1 since prime(19) + phi(16)/2 = 67 + 4 = 71, prime(71) - 70 = 353 - 70 = 283 and (71^2 - 1)/4 - prime(71) = 1260 - 353 = 907 are all prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PQ[n]=n>0&&PrimeQ[n]
    p[n_]:=p[n]=PrimeQ[n]&&PrimeQ[Prime[n]-n+1]&&PQ[(n^2-1)/4-Prime[n]]
    f[n_,k_]:=f[n,k]=Prime[k]+EulerPhi[n-k]/2
    a[n_]:=a[n]=Sum[If[p[f[n,k]],1,0],{k,1,n-3}]
    Table[a[n],{n,1,100}]

A235984 Primes p with f(p), f(f(p)), f(f(f(p))), f(f(f(f(p)))), f(f(f(f(f(p))))) all prime, where f(n) = prime(n) - n + 1.

Original entry on oeis.org

2, 3, 501187, 560029, 2076881, 2836003, 2907011, 8254787, 8822347, 10322189, 11329181, 11354641, 12307693, 14528069, 15801601, 17757427, 19023091, 24995669, 25871971
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 17 2014

Keywords

Comments

By the general conjecture in A235925, this sequence should have infinitely many terms.

Examples

			a(3) = 501187 with 501187, f(501187) = 6886357, f(6886357) = 113948711, f(113948711) = 2224096873, f(2224096873) =  50351471977 and f(50351471977) = 1303792228393 all prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Prime[n]-n+1
    p[k_]:=PrimeQ[f[Prime[k]]]&&PrimeQ[f[f[Prime[k]]]]&&PrimeQ[f[f[f[Prime[k]]]]]&&PrimeQ[f[f[f[f[Prime[k]]]]]]&&PrimeQ[f[f[f[f[f[Prime[k]]]]]]]
    n=0;Do[If[p[k],n=n+1;Print[n," ",Prime[k]]],{k,1,10^7}]

A236066 Primes p with g(p), g(g(p)), g(g(g(p))), g(g(g(g(p)))), g(g(g(g(g(p))))) all prime, where g(n) = prime(n) - n - 1.

Original entry on oeis.org

5, 98893, 1110709, 4231849, 5319707, 6763349, 7904087, 10823431, 13893109, 15323939, 15544079, 15716713, 17642899, 18978439, 20126237
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 18 2014

Keywords

Comments

Conjecture: For any integer m > 1, there are infinitely many chains p(1) < ... < p(m) of m primes with p(k+1) = prime(p(k)) - p(k) - 1 for all 0 < k < m.
This is similar to the conjecture in A235925.

Examples

			a(1) = 5 since neither g(2) = prime(2) - 2 - 1 = 0 nor g(3) = prime(3) - 3 - 1 = 1 is prime, but 5 = g(5) = g(g(5)) =  g(g(g(5))) = g(g(g(g(5)))) = g(g(g(g(g(5))))) is prime.
a(2) = 98893 with 98893, g(98893) = 1185113, g(1185113) = 17381209, g(17381209) = 304696943, g(304696943) = 6262760333, g(6262760333) = 148561011217 all prime.
		

Crossrefs

Programs

  • Mathematica
    g[n_]:=Prime[n]-n-1
    p[k_]:=PrimeQ[g[Prime[k]]]&&PrimeQ[g[g[Prime[k]]]]&&PrimeQ[g[g[g[Prime[k]]]]]&&PrimeQ[g[g[g[g[Prime[k]]]]]]&&PrimeQ[g[g[g[g[g[Prime[k]]]]]]]
    n=0;Do[If[p[k],n=n+1;Print[n," ",Prime[k]]],{k,1,10^6}]

A236143 Odd primes p with prime(p-1) - (p-1) and prime(p-1) - 2*prime((p-1)/2) both prime.

Original entry on oeis.org

7, 11, 31, 67, 179, 193, 197, 281, 347, 349, 563, 599, 757, 1123, 1453, 1543, 1933, 1987, 2083, 2531, 2971, 3037, 3259, 3547, 3583, 3701, 3919, 4027, 4483, 5023, 5581, 5591, 5647, 5981, 6449, 7207, 7297, 7603, 8291, 9049
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 19 2014

Keywords

Comments

By part (i) of the conjecture in A236138, this sequence should have infinitely many terms.

Examples

			a(1) = 7 with prime(6) - 6 = 13 - 6 = 7 and prime(6) - 2*prime(3) = 13 - 2*5 = 3 both prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=n>0&&PrimeQ[n]
    p[n_]:=PrimeQ[Prime[n-1]-(n-1)]&&PQ[Prime[n-1]-2*Prime[(n-1)/2]]
    n=0;Do[If[p[Prime[k]],n=n+1;Print[n," ",Prime[k]]],{k,2,10^5}]
  • PARI
    s=[]; forprime(p=3, 10000, if(isprime(prime(p-1)-(p-1)) && isprime(prime(p-1)-2*prime((p-1)/2)), s=concat(s, p))); s \\ Colin Barker, Jan 19 2014
Previous Showing 21-30 of 37 results. Next