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-5 of 5 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

A230502 Number of ways to write n = (2-(n mod 2))*p + q + r with p <= q <= r such that p, q, r, p^2 - 2, q^2 - 2, r^2 - 2 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 21 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 6.
This is stronger than Goldbach's weak conjecture which was finally proved by H. Helfgott in 2013. It also implies that there are infinitely many primes p with p^2 - 2 also prime.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Sep 22 2023

Examples

			a(10) = 1 since 10 = 2*2 + 3 + 3 with 2, 3, 2^2 - 2 = 2, 3^2 - 2 = 7 all prime.
a(19) = 2 since 19 = 3 + 3 + 13 = 5 + 7 + 7 with 3, 13, 5, 7, 3^2 - 2 = 7, 13^2 - 2 = 167, 5^2 - 2 = 23, 7^2 - 2 = 47 all prime.
		

Crossrefs

Programs

  • Mathematica
    pp[n_]:=PrimeQ[n^2-2]
    pq[n_]:=PrimeQ[n]&&pp[n]
    a[n_]:=Sum[If[pp[Prime[i]]&&pp[Prime[j]]&&pq[n-(2-Mod[n,2])Prime[i]-Prime[j]],1,0],{i,1,PrimePi[n/(4-Mod[n,2])]},{j,i,PrimePi[(n-(2-Mod[n,2])Prime[i])/2]}]
    Table[a[n],{n,1,100}]

A230493 Number of ways to write n = (2-(n mod 2))*p + q + r with p <= q <= r such that p, q, r, 2*p^2 - 1, 2*q^2 - 1, 2*r^2 - 1 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 20 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 6.
This is stronger than Goldbach's weak conjecture which was finally proved by H. Helfgott in 2013. It also implies that there are infinitely many primes p with 2*p^2 - 1 also prime.
We have verified the conjecture for n up to 10^6.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Sep 22 2023
See also A230351, A230494 and A230502 for similar conjectures.

Examples

			a(14) = 1 since 14 = 2*2 + 3 + 7 with 2, 3, 7, 2*2^2 - 1 = 7, 2*3^2 - 1 = 17, 2*7^2 - 1 = 97 all prime.
a(19) = 1 since 19 = 3 + 3 + 13, and 3, 13, 2*3^2 - 1 = 17 and 2*13^2 - 1 = 337 are all prime.
a(53) = 1 since 53 = 3 + 7 + 43, and all the six numbers 3, 7, 43, 2*3^2 - 1 = 17, 2*7^2 - 1 = 97, 2*43^2 - 1 = 3697 are prime.
		

Crossrefs

Programs

  • Mathematica
    pp[n_]:=PrimeQ[2n^2-1]
    pq[n_]:=PrimeQ[n]&&pp[n]
    a[n_]:=Sum[If[pp[Prime[i]]&&pp[Prime[j]]&&pq[n-(2-Mod[n,2])Prime[i]-Prime[j]],1,0],{i,1,PrimePi[n/(4-Mod[n,2])]},{j,i,PrimePi[(n-(2-Mod[n,2])Prime[i])/2]}]
    Table[a[n],{n,1,100}]

A230498 a(n) is the minimal odd odious k>1, such that k^i, i=2,...,n, all are evil, and a(n)=0, if there is no such k.

Original entry on oeis.org

13, 21, 21, 47, 265, 607, 883, 883, 883, 883, 10865, 10865, 58241, 58241, 58241, 75781, 367815, 766165, 2931371, 5288671, 5288671, 14838843, 14838843, 14838843, 33417397, 737812313, 2774333869, 3513898753, 3513898753, 3513898753, 14369883465, 14369883465, 22865025261
Offset: 2

Views

Author

Keywords

Comments

A conjugate sequence to A230495 and A230496.
Conjecture: For all n, a(n) > 0.

Crossrefs

Programs

  • Mathematica
    evQ[n_] := EvenQ[DigitCount[n, 2, 1]]; evExp[n_] := Module[{e = 1, p = n^2}, If[! evQ[n], While[evQ[p], p *= n; e++]]; e]; seq[nmax_] := Module[{e, emax = 1, n = 3, s = {}}, Do[e = evExp[n]; If[e > emax, s = Join[s, ConstantArray[n, e - emax]]; emax = e], {n, 3, nmax, 2}]; s]; seq[11000] (* Amiram Eldar, Aug 03 2023 *)

Extensions

a(27)-a(34) from Amiram Eldar, Aug 03 2023

A230546 Least positive integer k <= n such that 2*k^2-1 is a prime and n - k is a square, or 0 if such an integer k does not exist.

Original entry on oeis.org

0, 2, 2, 3, 4, 2, 3, 4, 8, 6, 2, 3, 4, 10, 6, 7, 8, 2, 3, 4, 17, 6, 7, 8, 21, 10, 2, 3, 4, 21, 6, 7, 8, 18, 10, 11, 21, 2, 3, 4, 25, 6, 7, 8, 36, 10, 11, 39, 13, 25, 2, 3, 4, 18, 6, 7, 8, 22, 10, 11
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 23 2013

Keywords

Comments

By the conjecture in A230494, we should have a(n) > 0 for all n > 1.

Examples

			a(4) = 3 since neither 4 - 1 = 3 nor 4 - 2 = 2 is a square, but 4 - 3 = 1 is a square and 2*3^2 - 1 = 17 is a prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    Do[Do[If[PrimeQ[2k^2-1]&&SQ[n-k],Print[n," ",k];Goto[aa]],{k,1,n}];
    Print[n," ",0];Label[aa];Continue,{n,1,60}]
    lpik[n_]:=Module[{k=1},While[!PrimeQ[2k^2-1]||!IntegerQ[Sqrt[n-k]],k++];k]; Join[{0},Array[lpik,60,2]] (* Harvey P. Dale, Aug 04 2021 *)
Showing 1-5 of 5 results.