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.

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

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

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

A262750 Least positive integer z such that n - phi(z^2) = x^2 + y^2 for some integers x and y with x*y*z even and phi(k^2) < n for all 0 < k < z, or 0 if no such z exists, where phi(.) is Euler's totient function given by A000010.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Sep 30 2015

Keywords

Comments

Conjecture: a(n) <= sqrt(n) except for n = 3, 8, 13, 32.
The conjecture in A262747 implies that a(n) > 0 for all n > 0.

Examples

			a(68) = 8 since 68 - phi(8^2) = 68 - 32 = 36 = 0^2 + 6^2 with 0*6*8 even and all those phi(k^2) (k = 1,...,7) smaller than 68.
a(5403) = 67 since 5403 - phi(67^2) = 5403 - 4422 = 981 = 9^2 + 30^2 with 9*30*67 even and all those phi(k^2) (k = 1,...,5403) smaller than 5403.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=EulerPhi[n^2]
    SQ[n_]:=IntegerQ[Sqrt[n]]
    Do[Do[If[f[x]>n,Goto[aa]]; Do[If[SQ[n-f[x]-y^2]&&(Mod[x*y, 2]==0||Mod[n-f[x]-y^2, 2]==0),Print[n," ",x];Goto[bb]], {y, 0, Sqrt[(n-f[x])/2]}]; Continue, {x, 1, n}]; Label[aa];Print[n," ",0];Label[bb]; Continue, {n,1,100}]

A234308 a(n) = |{0 < k <= n/2: phi(k^2)*phi(n-k) - 1 is a Sophie Germain prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 22 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 4.
(ii) If n > 3, then phi(k^2)*phi(n-k) - 1 and phi(k^2)*phi(n-k) + 1 are both prime for some 0 < k < n, and also phi(j)^2*phi(n-j) - 1 and phi(j)^2*phi(n-j) + 1 are both prime for some 0 < j < n.
(iii) If n > 9 is not equal to 14, then |phi(k) - phi(n-k)|/2 is prime for some 0 < k < n, and also |phi(j) - phi(n-j)| - 1 and |phi(j) - phi(n-j)| + 1 are both prime for some 0 < j < n.
(iv) If n > 5, then sigma(k)*phi(n-k) + 1 is a square for some 0 < k < n, where sigma(k) is the sum of all positive divisors of k.
Note that part (i) of the conjecture implies that there are infinitely many Sophie Germain primes. We have verified part (i) for n up to 3*10^6.

Examples

			a(5) = 1 since phi(2^2)*phi(3) - 1 = 3 is a Sophie Germain prime.
a(10) = 1 since phi(1^2)*phi(9) - 1 = 5 is a Sophie Germain prime.
a(12) = 1 since phi(6^2)*phi(6) - 1 = 23 is a Sophie Germain prime.
a(30) = 1 since phi(2^2)*phi(28) - 1 = 23 is a Sophie Germain prime.
a(60) = 1 since phi(4^2)*phi(56) - 1 = 191 is a Sophie Germain prime.
a(75) = 1 since phi(14^2)*phi(61) - 1 = 5039 is a Sophie Germain prime.
a(95) = 1 since phi(30^2)*phi(65) - 1 = 11519 is a Sophie Germain prime.
a(106) = 1 since phi(22^2)*phi(84) - 1 = 5279 is a Sophie Germain prime.
a(110) = 1 since phi(9^2)*phi(101) - 1 = 5399 is a Sophie Germain prime.
a(156) = 1 since phi(27^2)*phi(129) - 1 = 40823 is a Sophie Germain prime.
		

Crossrefs

Programs

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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 28 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 100.
(ii) For any integer n > 4, there is a positive integer k < n with phi(k)^2 + prime(n-k)^2 prime.
Note that phi(k^2) (k = 1, 2, 3, ...) are pairwise distinct and this can be easily proved by induction.

Examples

			a(16) = 1 since 16 = 3^2 + 7 with phi(3^2) + prime(7) = 6 + 17 = 23 prime.
a(611) = 1 since 611 = 22^2 + 127 with phi(22^2) + prime(127) = 220 + 709 = 929 prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_,k_]:=PrimeQ[EulerPhi[k^2]+Prime[n-k^2]]
    a[n_]:=Sum[If[p[n,k],1,0],{k,1,Sqrt[n-1]}]
    Table[a[n],{n,1,100}]
Showing 1-7 of 7 results.