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.

A209253 Number of ways to write 2n-1 as the sum of a Sophie Germain prime and a practical number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 14 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>1.
This has been verified for n up to 5*10^6.

Examples

			a(40)=1 since 2*40-1=23+56 with 23 a Sophie Germain prime and 56 a practical number.
		

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