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-2 of 2 results.

A232442 a(n) = |{0 < k < n: m*prime(m) - 1 and m*prime(m) + 1 are both prime with m = sigma(k) + phi(n-k)}|, where sigma(k) is the sum of all positive divisors of k and phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 14 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 214.
This implies that there are infinitely many twin prime pairs of the special form {m*prime(m) - 1, m*prime(m) + 1}.
We have verified the conjecture for n up to 10^5.

Examples

			a(25) = 1 since sigma(6) + phi(19) = 12 + 18 = 30 with {30*prime(30) - 1, 30*prime(30) + 1} = {3389, 3391} a twin prime pair.
a(100) = 1 since sigma(75) + phi(25) = 124 + 20 = 144 with {144*prime(144) - 1, 144*prime(144) + 1} = {119087, 119089} a twin prime pair.
		

Crossrefs

Programs

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

A257789 Numbers n such that 2n*prime(n) - 1 and 2n*prime(n) + 1 are both prime.

Original entry on oeis.org

1, 2, 3, 24, 30, 33, 54, 90, 156, 168, 189, 225, 294, 300, 402, 576, 741, 780, 825, 849, 918, 948, 978, 1014, 1245, 1542, 1551, 1608, 1614, 1617, 1770, 1773, 1908, 1914, 1920, 1947, 2025, 2286, 2361, 2370, 2598, 2760, 2865, 2970, 3081, 3516, 3744, 3759, 3948, 4023
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 08 2015

Keywords

Comments

a(n) is divisible by 3 for n >= 3. - Robert Israel, May 08 2015

Examples

			2 is in this sequence because 2*2*prime(2) - 1 = 11 and 2*2*prime(2) + 1 = 13 are both prime.
		

Crossrefs

Cf. A085637.

Programs

  • Magma
    [n: n in [1..4500] | IsPrime(2*n*NthPrime(n)-1) and IsPrime(2*n*NthPrime(n)+1)];
    
  • Maple
    filter:= proc(n)
    local p;
    p:= ithprime(n);
    isprime(2*n*p+1) and isprime(2*n*p-1)
    end proc:
    select(filter, [1,2,seq(3*j,j=1..10^5)]); # Robert Israel, May 08 2015
  • Mathematica
    Select[Range[3000], PrimeQ[2 # Prime[#] - 1] && PrimeQ[2 #  Prime[#] + 1] &] (* Vincenzo Librandi, May 09 2015 *)
    Select[Range[4200],AllTrue[2# Prime[#]+{1,-1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 08 2018 *)
  • PARI
    v=List(); n=0; forprime(p=2,1e5, n++; if(isprime(2*n*p-1) && isprime(2*n*p+1), listput(v,n))); Vec(v) \\ Charles R Greathouse IV, May 08 2015
Showing 1-2 of 2 results.