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.

Showing 1-4 of 4 results.

A233867 a(n) = |{0 < m < 2*n: m is a square with 2*n - 1 - phi(m) prime}|, where phi(.) is Euler's totient function (A000010).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 17 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1.
(ii) For any odd number 2*n - 1 > 4, there is a positive integer k < 2*n such that 2*n - 1 - phi(k) and 2*n - 1 + phi(k) are both prime.
By Goldbach's conjecture, 2*n > 2 could be written as p + q with p and q both prime, and hence 2*n - 1 = p + (q - 1) = p + phi(q).
By induction, phi(k^2) (k = 1,2,3,...) are pairwise distinct.

Examples

			a(29) = 1 since 2*29 - 1 = 37 + phi(5^2) with 37 prime.
a(39) = 1 since 2*39 - 1 = 71 + phi(3^2) with 71 prime.
a(66) = 1 since 2*66 - 1 = 89 + phi(7^2) with 89 prime.
a(128) = 1 since 2*128 - 1 = 223 + phi(8^2) with 223 prime.
a(182) = 1 since 2*182 - 1 = 331 + phi(8^2) with 331 prime.
a(413) = 1 since 2*413 - 1 = 823 + phi(2^2) with 823 prime.
a(171) = 3 since 2*171 - 1 = 233 + phi(18^2) = 257 + phi(14^2) = 293 + phi(12^2) with 233, 257, 293 all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[2n-1-EulerPhi[k^2]],1,0],{k,1,Sqrt[2n-1]}]
    Table[a[n],{n,1,100}]

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}]

A233864 a(n) = |{0 < m < 2*n: m = sigma(k) for some k > 0, and 2*n - 1 - m and 2*n - 1 + m are both prime}|, where sigma(k) is the sum of all (positive) divisors of k.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 16 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 3.
(ii) For any even number 2*n > 0, 2*n + sigma(k) is prime for some 0 < k < 2*n.
See also A233793 for a related conjecture.
Clearly part (i) of the conjecture implies Goldbach's conjecture for even numbers 2*(2*n - 1) with n > 3; we have verified part (i) for n up to 10^8. Concerning part (ii), we remark that 1024 is the unique positive integer k < 1134 with 1134 + sigma(k) prime, and that sigma(1024) = 2047 > 1134.

Examples

			a(7) = 1 since sigma(5) = 6, and 2*7 - 1 - 6 = 7 and 2*7 - 1 + 6 = 19 are both prime.
a(10) = 1 since sigma(6) = sigma(11) = 12, and 2*10 - 1 - 12 = 7 and 2*10 - 1 + 12 = 31 are both prime.
a(11) = 1 since sigma(7) = 8, and 2*11 - 1 - 8 = 13 and 2*11 - 1 + 8 = 29 are both prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Sum[If[Mod[n,d]==0,d,0],{d,1,n}]
    S[n_]:=Union[Table[f[j],{j,1,n}]]
    PQ[n_]:=n>0&&PrimeQ[n]
    a[n_]:=Sum[If[PQ[2n-1-Part[S[2n-1],i]]&&PQ[2n-1+Part[S[2n-1],i]],1,0],{i,1,Length[S[2n-1]]}]
    Table[a[n],{n,1,100}]

A236765 Number of ways to write n = k^2 + m with k > 1 and m > 1 such that sigma(k^2) + prime(m) - 1 is prime, where sigma(j) denotes the sum of all positive divisors of j.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 0, 2, 3, 1, 3, 2, 1, 2, 2, 3, 2, 4, 3, 2, 3, 2, 2, 3, 3, 2, 2, 2, 3, 4, 4, 3, 4, 4, 1, 3, 4, 2, 2, 5, 3, 3, 4, 4, 3, 1, 5, 3, 4, 3, 4, 5, 4, 3, 1, 5, 2, 6, 4, 3, 4, 2, 1, 5, 4, 7, 4, 4, 3, 1, 3, 1, 4, 4, 4, 2, 5, 6, 3, 6, 5, 5, 1, 4, 5, 5, 4, 3, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 30 2014

Keywords

Comments

Conjecture: (i) If n > 6 is not equal to 18, then a(n) > 0.
(ii) Any integer n > 14 can be written as p + q with q > 0 such that p, p + 6 and prime(p) + sigma(q) are all prime.

Crossrefs

Programs

  • Maple
    a(10) = 1 since 10 = 2^2 + 6 with sigma(2^2) + prime(6) - 1 = 7 + 13 - 1 = 19 prime.
    a(253) = 1 since 253 = 15^2 + 28 with sigma(15^2) + prime(28) - 1 = 403 + 107 - 1 = 509 prime.
  • Mathematica
    p[n_,k_]:=PrimeQ[DivisorSigma[1,k^2]+Prime[n-k^2]-1]
    a[n_]:=If[n<6,0,Sum[If[p[n,k],1,0],{k,2,Sqrt[n-2]}]]
    Table[a[n],{n,1,100}]
Showing 1-4 of 4 results.