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.
%I A222580 #16 Feb 26 2013 02:36:37 %S A222580 1,1,1,2,1,1,1,3,2,1,1,3,2,3,2,2,2,3,1,2,2,3,2,2,1,2,3,3,1,1,2,4,2,1, %T A222580 3,2,2,2,3,3,2,2,2,2,6,1,2,3,4,2,3,3,2,3,4,2,4,2,1,1,4,3,4,2,4,1,3,3, %U A222580 2,4,4,2,3,2,3,3,3,3,2,5,1,3,4,7,4,2,3,2,1,5,2,4,2,7,3,3,3,4,5,6 %N A222580 Number of ways to write n=p_m-p_{m-1}+...+(-1)^{m-k}p_k with k<m and p_m<=3n, and p_m+1 and p_k-1 both practical, where p_j denotes the j-th prime. %C A222580 Conjecture: All the terms are positive. %C A222580 See also the comments related to A222579. %H A222580 Zhi-Wei Sun, <a href="/A222580/b222580.txt">Table of n, a(n) for n = 1..10000</a> %H A222580 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1202.6589">On functions taking only prime values</a>, arXiv:1202.6589. %H A222580 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1211.1588">Conjectures involving primes and quadratic forms</a>, arXiv:1211.1588. %e A222580 a(9)=2 since 9=11-7+5=19-17+13-11+7-5+3 with 12, 4, 20, 2 all practical. %e A222580 a(806)=1 since 806=p_{358}-p_{357}+...+p_{150}-p_{149} with p_{358}=2411<=3*806=2418, and 2412 and p_{149}-1=858 are both practical. %t A222580 f[n_]:=f[n]=FactorInteger[n] %t A222580 Pow[n_,i_]:=Pow[n,i]=Part[Part[f[n],i],1]^(Part[Part[f[n],i],2]) %t A222580 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}] %t A222580 pr[n_]:=pr[n]=n>0&&(n<3||Mod[n,2]+Con[n]==0) %t A222580 pp[k_]:=pp[k]=pr[Prime[k]+1]==True %t A222580 pq[k_]:=pq[k]=pr[Prime[k]-1]==True %t A222580 s[0_]:=0 %t A222580 s[n_]:=s[n]=Prime[n]-s[n-1] %t A222580 a[n_]:=a[n]=Sum[If[pp[j]==True&&pq[i+1]==True&&s[j]-(-1)^(j-i)*s[i]==n,1,0],{j,PrimePi[n]+1,PrimePi[3n]},{i,0,j-2}] %t A222580 Table[a[n],{n,1,100}] %Y A222580 Cf. A000040, A005153, A210479, A222579. %K A222580 nonn %O A222580 1,4 %A A222580 _Zhi-Wei Sun_, Feb 25 2013