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.

A233793 Least odd prime p such that 2*n - p = sigma(k) for some k > 0, or 0 if such an odd prime p does not exist, where sigma(k) is the sum of all (positive) divisors of k.

Original entry on oeis.org

0, 3, 3, 5, 3, 5, 7, 3, 3, 5, 7, 11, 11, 13, 17, 17, 3, 5, 7, 37, 3, 5, 7, 17, 11, 13, 23, 17, 19, 3, 5, 7, 3, 5, 7, 41, 11, 13, 47, 17, 19, 53, 23, 31, 59, 29, 3, 3, 5, 7, 11, 11, 13, 17, 17, 19, 23, 23, 61, 29, 29, 3, 5, 7, 3, 5, 7, 3, 5, 7, 79, 11, 13, 109, 17, 19, 61, 23, 31, 67, 29, 31, 73, 41, 37, 79, 3, 5, 7, 47, 11, 13, 3, 5, 7, 59, 11, 13, 3, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Dec 15 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1. Moreover, if n > 180 is not among 284, 293, 371, 542, 788, 1274, then 2*n can be written as p + sigma(m^2), where p is an odd prime and m is a positive integer.
See also part (i) of the conjecture in A233654.
Note that if sigma(k) is odd, then the order of k at each odd prime must be even, and hence k has the form m^2 or 2*m^2, where m is a positive integer.
We have verified part (i) of the conjecture for n up to 10^9.

Examples

			a(2) = 3 since 2*2 = 3 + sigma(1), but 2*2 = 2 + sigma(k) for no k > 0.
		

Crossrefs

Programs

  • Mathematica
    sigma[n_]:=Sum[If[Mod[n,d]==0,d,0],{d,1,n}]
    S[n_]:=Union[Table[sigma[j^2],{j,1,Sqrt[n]}],Table[sigma[2*j^2],{j,1,Sqrt[n/2]}]]
    Do[Do[If[MemberQ[S[2n],2n-Prime[k]],Print[n," ",Prime[k]];Goto[aa]],{k,2,PrimePi[2n]}];
    Print[n," ",0];Label[aa];Continue,{n,1,100}]