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

A234851 Indices of primes in A014692, i.e., numbers k such that prime(k)-k+1 is prime.

Original entry on oeis.org

1, 2, 3, 5, 7, 13, 17, 21, 23, 25, 31, 41, 43, 49, 61, 71, 77, 83, 89, 103, 105, 109, 121, 129, 133, 139, 151, 161, 173, 181, 183, 185, 189, 199, 211, 213, 223, 231, 235, 241, 243, 247, 265, 271, 273, 277, 279, 281, 285, 293, 301, 303, 307, 311, 317
Offset: 1

Views

Author

M. F. Hasler, Dec 31 2013

Keywords

Comments

Sequence A234695 lists primes in this sequence.

Crossrefs

Programs

  • Maple
    select(k -> isprime(ithprime(k)-k+1), [$1..1000]); # Robert Israel, Feb 19 2021
  • PARI
    for(k=1,999,isprime(prime(k)-k+1)&&print1(k","))
    
  • PARI
    is_A234851(n)=isprime(prime(k)-k+1)

Formula

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

A235330 Number of ways to write 2*n = p + q with p, q, prime(p) - p + 1 and prime(q) + q + 1 all prime.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 3, 1, 1, 2, 3, 0, 1, 2, 0, 3, 1, 0, 2, 2, 0, 0, 1, 1, 2, 3, 0, 1, 3, 0, 2, 0, 0, 2, 1, 0, 1, 2, 0, 3, 0, 0, 4, 2, 1, 1, 1, 1, 3, 4, 1, 1, 3, 1, 0, 2, 1, 1, 3, 0, 0, 2, 3, 3, 3, 1, 1, 3, 3, 2, 3, 1, 1, 5, 0, 1, 4, 2, 1, 1
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 05 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n >= 2480.
(ii) If n > 4368 then 2*n+1 can be written as 2*p + q with p and q terms of the sequence A234695.
Parts (i) and (ii) are stronger than Goldbach's conjecture (A045917) and Lemoine's conjecture (A046927) respectively.

Examples

			a(8) = 1 since 2*8 = 5 + 11 with 5, 11, prime(5) - 5 + 1 = 7 and prime(11) + 11 + 1 = 43 all prime.
		

Crossrefs

Programs

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

A235682 Number of ways to write n = k + m with k > 0 and m > 2 such that p = phi(k) + phi(m)/2 + 1, prime(p) - p + 1 and p*(p+1) - prime(p) are all prime, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 13 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 84.
Clearly, this implies that there are infinitely many primes p with prime(p) - p + 1 and p*(p+1) - prime(p) both prime.

Examples

			a(10) = 1 since 10 = 1 + 9 with phi(1) + phi(9)/2 + 1 = 5, prime(5) - 5 + 1 = 7 and 5*6 - prime(5) = 19 all prime.
a(95) = 1 since 95 = 62 + 33 with phi(62) + phi(33)/2 + 1 = 41, prime(41) - 41 + 1 = 139 and 41*42 - prime(41) = 1543 all prime.
a(421) = 1 since 421 = 289 + 132 with phi(289) + phi(132)/2 + 1 = 293, prime(293) - 293 + 1 = 1621 and 293*294 - prime(293) = 84229 all prime.
		

Crossrefs

Programs

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

A236687 Primes p such that prime(p^2) - 2 is also prime.

Original entry on oeis.org

2, 11, 17, 47, 61, 137, 163, 229, 239, 263, 317, 389, 419, 449, 467, 557, 571, 617, 619, 653, 709, 937, 953, 1009, 1033, 1087, 1123, 1129, 1181, 1249, 1481, 1831, 1987, 2003, 2099, 2207, 2381, 2441, 2579, 2663, 2707, 3109, 3457, 3833, 4013, 4463, 4519, 4783
Offset: 1

Views

Author

K. D. Bajpai, Jan 29 2014

Keywords

Examples

			17 is prime and appears in the sequence because prime(17^2) = 1879 and 1879 - 2 = 1877, which is also prime.
47 is prime and appears in the sequence because prime(47^2) = 19471 and 19471 - 2 = 19469, which is also prime.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a,b,d; a:=ithprime(n); b:=ithprime(a^2)-2; if isprime (b) then RETURN (a);fi; end: seq(KD(), n=1..500);
  • PARI
    default(primelimit,2^31)
    s=[]; forprime(p=2, 5000, if(isprime(prime(p^2)-2), s=concat(s, p))); s \\ Colin Barker, Jan 30 2014

A236688 Primes p such that prime(p^2) + 2 is also prime.

Original entry on oeis.org

7, 53, 83, 107, 149, 223, 367, 509, 701, 769, 853, 971, 1039, 1229, 1283, 1327, 1373, 1381, 1439, 1447, 1459, 1783, 1873, 1973, 2237, 2243, 2269, 2339, 2347, 2437, 2459, 2521, 2531, 2797, 2857, 3001, 3391, 3413, 3461, 3583, 3593, 3631, 3659, 3769, 3889, 3947
Offset: 1

Views

Author

K. D. Bajpai, Jan 29 2014

Keywords

Examples

			7 is prime and appears in the sequence: prime(7^2) = 227 and 227+2 = 229, which is also prime.
53 is prime and appears in the sequence: prime(53^2) = 25469 and 25469+2 = 25471, which is also prime.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a,b; a:=ithprime(n); b:=ithprime(a^2)+2; if isprime (b) then RETURN (a);fi; end: seq(KD(), n=1..700);
  • Mathematica
    Select[Prime[Range[600]],PrimeQ[Prime[#^2]+2]&] (* Harvey P. Dale, Aug 29 2021 *)
  • PARI
    default(primelimit,2^31)
    s=[]; forprime(p=2, 4000, if(isprime(prime(p^2)+2), s=concat(s, p))); s \\ Colin Barker, Jan 30 2014

A238776 Primes p with prime(p) - p + 1 and prime(q) - q + 1 both prime, where q = prime(2*pi(p)+1) with pi(.) given by A000720.

Original entry on oeis.org

2, 5, 7, 13, 31, 41, 43, 83, 109, 151, 211, 281, 307, 317, 349, 353, 499, 601, 709, 757, 883, 911, 971, 1447, 1453, 1483, 1531, 1801, 2053, 2281, 2819, 2833, 3163, 3329, 3331, 3881, 3907, 4051, 4243, 4447, 4451, 4703, 4751, 5483, 5659, 5701, 5737, 6011, 6271, 6311, 6361, 6379, 6427, 6571, 6827, 6841, 6983, 7159, 7879, 8209
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 05 2014

Keywords

Comments

Conjecture: The sequence has infinitely many terms.
This is motivated by the conjecture in A238766. Note that the sequence is a subsequence of A234695.

Examples

			a(1) = 2 since prime(2) - 2 + 1 = 2 and prime(prime(2*pi(2)+1)) - prime(2*pi(2)+1) + 1 = 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[2k+1],n=n+1;Print[n," ",Prime[k]]],{k,1,1029}]

A235681 Primes p with prime(p) - p + 1 and p*(p+1) - prime(p) both prime.

Original entry on oeis.org

2, 3, 5, 41, 61, 71, 89, 271, 281, 293, 337, 499, 571, 751, 907, 911, 1093, 1531, 2027, 2341, 2707, 2861, 3011, 3359, 3391, 3511, 4133, 5179, 5189, 5483, 5573, 5657, 5867, 6577, 6827, 7159, 7411, 7753, 7879, 8179, 8467, 9209, 9391, 9419, 9433, 10259, 10303, 10859, 10993, 11287
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 13 2014

Keywords

Comments

This is the intersection of A234695 and A235661. For any prime p in this sequence, p^2 + 1 is the sum of the two primes prime(p) - p + 1 and p*(p+1) - prime(p).
By the conjecture in A235682, this sequence should have infinitely many terms.

Examples

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

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[Prime[n]-n+1]&&PrimeQ[n(n+1)-Prime[n]]
    n=0;Do[If[PQ[Prime[k]],n=n+1;Print[n," ",Prime[k]]],{k,1,1000}]

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

Original entry on oeis.org

2, 3, 23, 311, 1777, 2341, 2861, 3329, 3833, 4051, 8753, 9007, 11587, 13093, 13309, 14551, 16001, 19687, 23143, 26993, 37309, 41981, 44131, 45491, 54623, 56431, 56821, 57991, 60223, 61643, 66413, 66883, 67511, 68767, 69029, 70003, 75743, 76261, 76819, 80021
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) = 23 with 23, f(23) = 61, f(61) = 223 and f(223) = 1187 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]]]]]
    n=0;Do[If[p[k],n=n+1;Print[n," ",Prime[k]]],{k,1,10000}]

A238134 Number of primes p < n with q = floor((n-p)/4) and prime(q) - q + 1 both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 03 2014

Keywords

Comments

Conjecture: Let m > 0 and n > 2*m + 1 be integers. If m = 1 and 2 | n, or m = 3 and n is not congruent to 1 modulo 6, or m = 2, 4, 5, ..., then there is a prime p < n such that q = floor((n-p)/m) and prime(q) - q + 1 are both prime.
In the cases m = 1, 2, this gives refinements of Goldbach's conjecture and Lemoine's conjecture (see also A235189). For m > 2, the conjecture is completely new.
See also A238701 for a similar conjecture involving primes q with q^2 - 2 also prime.

Examples

			 a(29) = 3 since 7, floor((29-7)/4) = 5 and prime(5) - 5 + 1 = 11 - 4 = 7 are all prime; 17, floor((29-17)/4) = 3 and prime(3) - 3 + 1 = 5 - 2 = 3 are all prime; 19, floor((29-19)/4) = 2 and prime(2) - 2 + 1 = 3 - 1 = 2 are all prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[n]&&PrimeQ[Prime[n]-n+1]
    a[n_]:=Sum[If[PQ[Floor[(n-Prime[k])/4]],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 06 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 4, 5, 19, 77.
(ii) For any integer n > 0, there is a number k among 1, ..., n such that 2*k + 1 and prime(prime(k^2*n)) - prime(k^2*n) + 1 are both prime.

Examples

			a(5) = 1 since prime(prime(4)) - prime(4) + 1 = prime(7) - 7 + 1 = 17 - 6 = 11 and prime(prime(4*5)) - prime(4*5) + 1 = prime(71) - 71 + 1 = 353 - 70 = 283 are both prime.
a(77) = 1 since prime(prime(3)) - prime(3) + 1 = prime(5) - 5 + 1 = 11 - 4 = 7 and prime(prime(3*77)) - prime(3*77) + 1 = prime(1453) - 1453 + 1 = 12143 - 1452 = 10691 are both prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[Prime[n]-n+1]
    p[k_,n_]:=PQ[Prime[k]]&&PQ[Prime[k*n]]
    a[n_]:=Sum[If[p[k,n],1,0],{k,1,n}]
    Table[a[n],{n,1,80}]
Previous Showing 11-20 of 37 results. Next