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-7 of 7 results.

A233544 Number of ways to write n = k^2 + m with k > 0 and m >= k^2 such that sigma(k^2) + phi(m) is prime, where sigma(k^2) is the sum of all (positive) divisors of k^2, and phi(.) is Euler's totient function (A000010).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 12 2013

Keywords

Comments

Conjectures:
(i) a(n) > 0 for all n > 1.
(ii) Any integer n > 1 can be written as k + m with k > 0 and m > 0 such that sigma(k)^2 + phi(m) (or sigma(k) + phi(m)^2) is prime.
Part (i) of the conjecture is stronger than the conjecture in A232270. We have verified it for n up to 10^8.
I verified the conjecture to 3*10^9. The conjecture is almost surely true. - Charles R Greathouse IV, Dec 13 2013
There are no counterexamples to conjecture (i) < 5.12 * 10^10. - Jud McCranie, Jul 23 2017
The conjectures appeared as Conjecture 3.31 in the linked 2017 paper. - Zhi-Wei Sun, Nov 30 2018

Examples

			a(10) = 1 since 10 = 1^2 + 9 with sigma(1^2) + phi(9) = 1 + 6 = 7 prime.
a(25) = 1 since 25 = 2^2 + 21 with sigma(2^2) + phi(21) = 7 + 12 = 19 prime.
a(34) = 1 since 34 = 4^2 + 18 with sigma(4^2) + phi(18) = 31 + 6 = 37 prime.
a(46) = 1 since 46 = 2^2 + 42 with sigma(2^2) + phi(42) = 7 + 12 = 19 prime.
a(106) = 1 since 106 = 3^2 + 97 with sigma(3^2) + phi(97) = 13 + 96 = 109 prime.
a(163) = 1 since 163 = 3^2 + 154 with sigma(3^2) + phi(154) = 13 + 60 = 73 prime.
a(265) = 1 since 265 = 11^2 + 144 with sigma(11^2) + phi(144) = 133 + 48 = 181 prime.
a(1789) = 1 since 1789 = 1^2 + 1788 with sigma(1^2) + phi(1788) = 1 + 592 = 593 prime.
a(1157) = 3, since 1157 = 10^2 + 1057 with sigma(10^2) + phi(1057) = 217 + 900 = 1117 prime, 1157 = 21^2 + 716 with sigma(21^2) + phi(716) = 741 + 356 = 1097 prime, and 1157 = 24^2 + 581 with sigma(24^2) + phi(581) = 1651 + 492 = 2143 prime. In this example, none of 10, 21 and 24 is a prime power.
		

Crossrefs

Programs

  • Mathematica
    sigma[n_]:=Sum[If[Mod[n,d]==0,d,0],{d,1,n}]
    a[n_]:=Sum[If[PrimeQ[sigma[k^2]+EulerPhi[n-k^2]],1,0],{k,1,Sqrt[n/2]}]
    Table[a[n],{n,1,100}]
  • PARI
    a(n)=sum(k=1,sqrtint(n\2),isprime(sigma(k^2)+eulerphi(n-k^2))) \\ Charles R Greathouse IV, Dec 12 2013

A233547 a(n) = |{0 < k < n/2: phi(k)*phi(n-k) - 1 and phi(k)*phi(n-k) + 1 are both prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 12 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5.
(ii) For any n > 3, sigma(k)*phi(n-k) - 1 and sigma(k)*phi(n-k) + 1 are both prime for some 0 < k < n, where sigma(k) is the sum of all (positive) divisors of k.
(iii) For any n > 5 not equal to 35, there is a positive integer k < n such that phi(k)*phi(n-k) - 1 is a Sophie Germain prime.
Note that part (i) implies the twin prime conjecture. We have verified it for n up to 10^7.

Examples

			a(6) = 1 since phi(1)*phi(5) = 1*4 = 4 with 4 - 1 and 4 + 1 twin primes.
a(8) = 1 since phi(1)*phi(7) = 1*6 = 6 with 6 - 1 and 6 + 1 twin primes.
a(16) = 1 since phi(2)*phi(14) = 1*6 = 6 with 6 - 1 and 6 + 1 twin primes.
a(17) = 1 since phi(3)*phi(14) = 2*6 = 12 with 12 - 1 and 12 + 1 twin primes.
a(19) = 1 since phi(1)*phi(18) = 1*6 = 6 with 6 - 1 and 6 + 1 twin primes.
a(23) = 1 since phi(2)*phi(21) = 1*12 = 12 with 12 - 1 and 12 + 1 twin primes.
a(25) = 1 since phi(11)*phi(14) = 10*6 = 60 with 60 - 1 and 60 + 1 twin primes.
a(26) = 1 since phi(7)*phi(19) = 6*18 = 108 with 108 - 1 and 108 + 1 twin primes.
a(42) = 1 since phi(14)*phi(28) = 6*12 = 72 with 72 - 1 and 72 +1 twin primes.
a(52) = 1 since phi(14)*phi(38) = 6*18 = 108 with 108 - 1 and 108 + 1 twin primes.
		

Crossrefs

Programs

  • Mathematica
    TQ[n_]:=PrimeQ[n-1]&&PrimeQ[n+1]
    a[n_]:=Sum[If[TQ[EulerPhi[k]*EulerPhi[n-k]],1,0],{k,1,(n-1)/2}]
    Table[a[n],{n,1,100}]

A233654 |{prime p < n: n - p = sigma(k) for some k > 0}|, where sigma(k) is the sum of all (positive) divisors of k.

Original entry on oeis.org

0, 0, 1, 1, 1, 3, 1, 3, 3, 3, 3, 2, 2, 4, 4, 3, 5, 4, 4, 6, 4, 3, 5, 3, 6, 5, 5, 1, 4, 4, 7, 5, 6, 4, 8, 3, 8, 5, 5, 2, 9, 5, 10, 8, 8, 4, 10, 3, 11, 6, 10, 2, 8, 4, 11, 5, 8, 3, 12, 5, 13, 7, 7, 3, 13, 3, 14, 7, 7, 5, 12, 3, 14, 9, 11, 6, 12, 2, 16, 7, 11, 5, 12, 3, 18, 8, 12, 2, 11, 3, 19, 6, 11, 4, 13, 4, 17, 8, 10, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Dec 14 2013

Keywords

Comments

Conjecture: (i) Let n > 1 be an integer. Then we have a(2*n) > 0. Also, 2*n + 1 can be written as p + sigma(k), where p is a Sophie Germain prime and k is a positive integer.
(ii) Each odd number greater than one can be written as sigma(k^2) + phi(m), where k and m are positive integers, and phi(.) is Euler's totient function.
That a(2*n+1) > 0 for n > 1 is a consequence of Goldbach's conjecture, for, if 2*n = p + q with p and q both prime, then 2*n + 1 = p + sigma(q) = q + sigma(p).

Examples

			a(3) = 1 since 3 = 2 + 1 = 2 + sigma(1) with 2 prime.
a(7) = 1 since 7 = 3 + 4 = 3 + sigma(3) with 3 prime.
a(10) = 3 since 10 = 2 + 8 = 2 + sigma(7) with 2 prime, 10 = 3 + 7 = 3 + sigma(4) with 3 prime, and 10 = 7 + 3 = 7 + sigma(2) with 7 prime.
a(13) = 2 since 13 = 5 + 8 = 5 + sigma(7) with 5 prime, and 13 = 7 + 6 = 7 + sigma(5) with 7 prime.
a(28) = 1 since 28 = 13 + 15 = 13 + sigma(8) with 13 prime.
a(36) = 3 since 36 = 5 + 31 = 5 + sigma(16) = 5 + sigma(25) with 5 prime, 36 = 23 + 13 = 23 + sigma(9) with 23 prime, and 36 = 29 + 7 = 29 + sigma(4) with 29 prime.
a(148) = 1 since 148 = 109 + 39 = 109 + sigma(18) with 109 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[n-Part[S[n],i]],1,0],{i,1,Length[S[n]]}]
    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}]

A234963 Number of ways to write n = k + m with k > 0 and m > 2 such that C(2*sigma(k) + phi(m), sigma(k) + phi(m)/2) - 1 is prime, where sigma(k) is the sum of all positive divisors of k and phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 01 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n >= 180.
Clearly, this implies that there are infinitely many primes of the form C(2*n,n) - 1. We have verified the conjecture for n up to 10000.
Note that every n = 400, ..., 9123 can be written as k + m with k > 0 and m > 0 such that f(k, m) = sigma(k) + phi(m) is even and C(f(k, m) + 2, f(k, m)/2 + 1) + 1 is prime, but this fails for n = 9124.

Examples

			a(5) = 1 since 5 = 1 + 4 with C(2*sigma(1) + phi(4), sigma(1) + phi(4)/2) - 1 = C(4, 2) - 1 = 5 prime.
a(28) = 1 since 28 = 2 + 26 with C(2*sigma(2) + phi(26), sigma(2) + phi(26)/2) - 1 = C(18, 9) - 1 = 48619 prime.
		

Crossrefs

Programs

  • Mathematica
    sigma[n_] := DivisorSigma[1, n];
    f[n_,k_] := Binomial[2*sigma[k] + EulerPhi[n-k], sigma[k] + EulerPhi[n-k]/2] - 1;
    a[n_] := Sum[If[PrimeQ[f[n,k]], 1, 0], {k, 1, n-3}];
    Table[a[n], {n, 1, 100}]

A232442 a(n) = |{0 < k < n: m*prime(m) - 1 and m*prime(m) + 1 are both prime with m = sigma(k) + phi(n-k)}|, where sigma(k) is the sum of all positive divisors of k and phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 14 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 214.
This implies that there are infinitely many twin prime pairs of the special form {m*prime(m) - 1, m*prime(m) + 1}.
We have verified the conjecture for n up to 10^5.

Examples

			a(25) = 1 since sigma(6) + phi(19) = 12 + 18 = 30 with {30*prime(30) - 1, 30*prime(30) + 1} = {3389, 3391} a twin prime pair.
a(100) = 1 since sigma(75) + phi(25) = 124 + 20 = 144 with {144*prime(144) - 1, 144*prime(144) + 1} = {119087, 119089} a twin prime pair.
		

Crossrefs

Programs

  • Mathematica
    sigma[n_]:=DivisorSigma[1,n]
    q[n_]:=PrimeQ[n*Prime[n]-1]&&PrimeQ[n*Prime[n]+1]
    f[n_,k_]:=sigma[k]+EulerPhi[n-k]
    a[n_]:=Sum[If[q[f[n,k]],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]
Showing 1-7 of 7 results.