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.

A209254 Number of ways to write 2n-1 = p+q with q practical, p and p^4+q^4 both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 14 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>1.
Zhi-Wei Sun also conjectured that any odd integer greater than one can be written as p+q with q practical, and p and p^2+q^2 both prime. This is a refinement of Ming-Zhi Zhang's problem related to A036468.

Examples

			a(8)=1 since 2*8-1=11+4 with 4 practical, 11 and 11^4+4^4=14897 both prime.
		

Crossrefs

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[pr[2n-1-Prime[k]]==True&&PrimeQ[Prime[k]^4+(2n-1-Prime[k])^4]==True,1,0],{k,1,PrimePi[2n-1]}]
    Do[Print[n," ",a[n]],{n,1,100}]