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-10 of 14 results. Next

A234309 a(n) = |{2 < k <= n/2: 2^{phi(k)} + 2^{phi(n-k)} - 1 is prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 23 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5.
(ii) For any integer n > 1, 2^k +2^{phi(n-k)} - 1 is prime for some 0 < k < n, and 2^{sigma(j)} + 2^{phi(n-j)} - 1 is prime for some 0 < j < n, where sigma(j) is the sum of all positive divisors of j.
As phi(k) is even for any k > 2, part (i) of the conjecture implies that there are infinitely many primes of the form 4^a + 4^b - 1 with a and b positive integers (cf. A234310). Note that any Mersenne prime greater than 3 has the form 2^{2a+1} - 1 = 4^a + 4^a - 1.

Examples

			a(6) = 1 since 2^{phi(3)} + 2^{phi(3)} - 1 = 2^2 + 2^2 - 1 = 7 is prime.
a(7) = 1 since 2^{phi(3)} + 2^{phi(4)} - 1 = 2^2 + 2^2 - 1 = 7 is prime.
a(8) = 2 since 2^{phi(3)} + 2^{phi(5)} - 1 = 2^2 + 2^4 - 1 = 19 and 2^{phi(4)} + 2^{phi(4)} - 1 = 2^2 + 2^2 - 1 = 7 are both prime.
		

Crossrefs

Programs

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

A234475 Number of ways to write n = k + m with 2 < k <= m such that q(phi(k)*phi(m)/4) + 1 is prime, where phi(.) is Euler's totient function and q(.) is the strict partition function (A000009).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 26 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 5.
This implies that there are infinitely many primes p with p - 1 a term of A000009.

Examples

			a(6) = 1 since 6 = 3 + 3 with q(phi(3)*phi(3)/4) + 1 = q(1) + 1 = 2 prime.
a(76) = 1 since 76 = 18 + 58 with q(phi(18)*phi(58)/4) + 1 = q(42) + 1 = 1427 prime.
a(197) = 1 since 197 = 4 + 193 with q(phi(4)*phi(193)/4) + 1 = q(96) + 1 = 317789.
a(356) = 1 since 356 = 88 + 268 with q(phi(88)*phi(268)/4) + 1 = q(1320) + 1 = 35940172290335689735986241 prime.
		

Crossrefs

Programs

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

A233542 Number of ways to write n = k^2 + m with k > 0 and m > 0 such that phi(k^2)*phi(m) - 1 is prime, where phi(.) is Euler's totient function (A000010).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 12 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5.
(ii) Any integer n > 7 can be written as k^2 + m with k > 0 and m > 0 such that phi(k)^2*phi(m) - 1 is prime.
(iii) If n > 1 is not equal to 36, then n can be written as k^2 + m with k > 0 and m > 0 such that sigma(k)^2*phi(m) + 1 is prime, where sigma(k) is the sum of all (positive) divisors of k.
We have verified part (i) of the conjecture for n up to 2*10^7.

Examples

			a(6) = 1 since 6 = 1^2 + 5 with phi(1^2)*phi(5) - 1 = 1*4 - 1 = 3 prime.
a(7) = 1 since 7 = 2^2 + 3 with phi(2^2)*phi(3) - 1 = 2*2 - 1 = 3 prime.
a(23) = 1 since 23 = 4^2 + 7 with phi(4^2)*phi(7) - 1 = 8*6 - 1 = 47 prime.
a(42) = 1 since 42 = 6^2 + 6 with phi(6^2)*phi(6) - 1 = 12*2 - 1 = 23 prime.
a(49) = 1 since 49 = 2^2 + 45 with phi(2^2)*phi(45) - 1 = 2*24 - 1 = 47 prime.
a(83) = 1 since 83 = 9^2 + 2 with phi(9^2)*phi(2) - 1 = 54*1 - 1 = 53 prime.
a(188) = 1 since 188 = 6^2 + 152 with phi(6^2)*phi(152) - 1 = 12*72 - 1 = 863 prime.
a(327) = 1 since 327 = 5^2 + 302 with phi(5^2)*phi(302) - 1 = 20*150 - 1 = 2999 prime.
a(557) = 1 since 557 = 12^2 + 413 with phi(12^2)*phi(413) - 1 = 48*348 - 1 = 16703 prime.
		

Crossrefs

Programs

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

A234246 a(n) = |{0 < k < n: k*phi(n-k) + 1 is a square}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 21 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 if n is not a divisor of 6. The only values of n with a(n) = 1 are 4, 5, 8, 9, 12, 13, 24, 33, 49.
(ii) If n >= 60, then k + phi(n-k) is a square for some 0 < k < n. If n > 60, then sigma(k) + phi(n-k) is a square for some 0 < k < n, where sigma(k) is the sum of all positive divisors of k.
(iii) If n > 7 is not equal to 10 or 20, then phi(k)*phi(n-k) + 1 is a square for some 0 < k < n.
(iv) If n > 7 is not equal to 10 or 19, then (phi(k) + phi(n-k))/2 is a triangular number for some 0 < k < n.
Note that (n - 1)*phi(1) + 1 = n. So a(n) > 0 if n is a square.

Examples

			a(4) = 1 since 3*phi(1) + 1 = 2^2.
a(5) = 1 since 3*phi(2) + 1 = 2^2.
a(8) = 1 since 4*phi(4) + 1 = 3^2.
a(9) = 1 since 8*phi(1) + 1 = 3^2.
a(12) = 1 since 2*phi(10) + 1 = 3^2.
a(13) = 1 since 4*phi(9) + 1 = 5^2.
a(14) = 2 since 2*phi(12) + 1 = 3^2 and 6*phi(8) + 1 = 5^2.
a(24) = 1 since 12*phi(12) + 1 = 7^2.
a(33) = 1 since 3*phi(30) + 1 = 5^2.
a(49) = 1 since 48*phi(1) + 1 = 7^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    a[n_]:=Sum[If[SQ[k*EulerPhi[n-k]+1],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

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

A233918 a(n) = |{0 < k <= n/2: (phi(k) + phi(n-k))/2 is prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 21 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5.
(ii) If n > 5 is not equal to 19, then phi(k) + phi(n-k) - 1 and phi(k) + phi(n-k) + 1 are both prime for some 0 < k < n.
(iii) If n > 5, then (phi(k)/2)^2 + (phi(n-k)/2)^2 is prime for some 0 < k < n.
(iv) If n > 8, then (sigma(k) + phi(n-k))/2 is prime for some 0 < k < n, where sigma(k) is the sum of all positive divisors of k.

Examples

			a(6) = 1 since (phi(3) + phi(3))/2 = 2 is prime.
a(7) = 1 since (phi(3) + phi(4))/2 = 2 is prime.
a(10) = 1 since (phi(4) + phi (6))/2 = 2 is prime.
a(13) = 1 since (phi(3) + phi(10))/2 = 3 is prime.
a(20) = 1 since (phi(4) + phi(16))/2 = 5 is prime.
		

Crossrefs

Programs

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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 21 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 4.
(ii) If n > 3 is different from 9 and 29, then k*sigma(n-k) - 1 and k*sigma(n-k) + 1 are both prime for some 0 < k < n.
Obviously, either of the two parts implies the twin prime conjecture. We have verified part (i) for n up to 10^8.

Examples

			a(5) = 1 since 2*phi(3) - 1 = 3 and 2*phi(3) + 1 = 5 are both prime.
a(7) = 1 since 3*phi(4) - 1 = 5 and 3*phi(4) + 1 = 7 are both prime.
a(18) = 1 since 5*phi(13) - 1 = 59 and 5*phi(13) + 1 = 61 are both prime.
a(91) = 1 since 13*phi(78) - 1 = 311 and 13*phi(78) + 1 = 313 are both prime.
a(101) = 1 since 6*phi(95) - 1 = 431 and 6*phi(95) + 1 = 433 are both prime.
		

Crossrefs

Programs

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

A233566 a(n) = |{0 < p < n: p and p*phi(n-p) - 1 are both prime}|, where phi(.) is Euler's totient function (A000010).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 13 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3. Also, for any n > 2 there is a prime p < n with p^2*phi(n-p) - 1 prime.

Examples

			a(4) = 1 since 3 and 3*phi(4-3) - 1 = 2 are both prime.
a(5) = 2 since 2 and 2*phi(5-2) - 1 = 3 are both prime, and also 3 and 3*phi(5-3) - 1 = = 2 are both prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[Prime[k]*EulerPhi[n-Prime[k]]-1],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,100}]

A233549 Number of ways to write n = p + q (q > 0) with p and (phi(p)*phi(q))^4 + 1 prime, where phi(.) is Euler's totient function (A000010).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 12 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2.
(ii) If n > 2 is not equal to 26, then there is a prime p < n with (phi(p)*phi(n-p))^2 + 1 prime.
(iii) If n > 3 is different from 9 and 16, then there is a prime p < n with ((p+1)*phi(n-p))^2 + 1 prime.
Part (i) of the conjecture implies that there are infinitely many primes of the form x^4 + 1. We have verified it for n up to 10^7.

Examples

			a(11) = 1 since 11 = 2 + 9 with 2 and (phi(2)*phi(9))^4 + 1 = 6^4 + 1 = 1297 both prime.
a(13) = 1 since 13 = 5 + 8 with 5 and (phi(5)*phi(8))^4 + 1 = 16^4 + 1 = 65537 both prime.
a(258) = 1 since 258 = 167 + 91 with 167 and (phi(167)*phi(91))^4 + 1 = (166*72)^4 + 1 = 20406209352892417 both prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[((Prime[k]-1)*EulerPhi[n-Prime[k]])^4+1],1,0],{k,1,PrimePi[n-1]}]
    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}]
Showing 1-10 of 14 results. Next