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.

A208249 Number of primes p with n < p < 2n, such that p-1 and p+1 are both practical.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 12 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>8.
Zhi-Wei Sun also made the following conjectures:
(1) For each integer n>6 there is a practical number q with n
(2) For any integer n>231 there is a prime p with n
(3) There are infinitely many twin prime pairs {p,p+2} with p-1,p+1,p+3 all practical.
(4) Any odd number n>1 can be written as p+q (p,q>0) with p practical and p^2+q^2 prime.

Examples

			a(9)=1 since 17 is the only prime 9<p<18 with p-1 and p+1 both practical.
		

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]; Pow[n_,i_] := Pow[n,i] = Part[Part[f[n],i],1]^(Part[Part[f[n],i],2]); Con[n_] := Con[n] = Sum[If[Part[Part[f[n],s+1],1] <= DivisorSigma[1,Product[Pow[n,i], {i,1,s}]]+1,0,1], {s,1,Length[f[n]]-1}]; pr[n_]:=pr[n]=n>0&&(n<3||Mod[n,2]+Con[n]==0); a[n_] := a[n] = Sum[If[PrimeQ[n+k] == True && pr[n+k-1] == True && pr[n+k+1] == True,1,0], {k,1,n-1}]; Table[a[n],{n,1,100}]

Formula

a(n) = card { p in A000040 | n < p < 2n, p-1 and p+1 are both practical }.