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

A262979 Number of ordered ways to write n as x^4 + phi(y^2) + z*(3*z-1)/2 with x >= 0 and y > 0, where phi(.) is Euler's totient function given by A000010.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 06 2015

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0.
(ii) Any positive integer n can be written as x^4 + phi(y^2) + pi(z^2) (or x^4 + pi(y^2) + pi(z^2)) with y > 0 and z > 0, where pi(m) denotes the number of primes not exceeding m.

Examples

			a(5) = 1 since 5 = 1^4 + phi(2^2) + (-1)*(3*(-1)-1)/2.
a(6) = 2 since 6 = 0^4 + phi(1^2) + 2*(3*2-1)/2 = 0^4 + phi(3^2) + 0*(3*0-1)/2.
a(16) = 2 since 16 = 0^4 + phi(1^2) + (-3)*(3*(-3)-1)/2
= 1^4 + phi(4^2) + (-2)*(3*(-2)-1)/2.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=EulerPhi[n^2]
    PenQ[n_]:=IntegerQ[Sqrt[24n+1]]
    Do[r=0;Do[If[f[x]>n,Goto[aa]];Do[If[PenQ[n-f[x]-y^4],r=r+1],{y,0,(n-f[x])^(1/4)}];Label[aa];Continue,{x,1,n}];Print[n," ",r];Continue,{n,1,100}]

A262980 Number of ordered ways to write n as p + 2^k + pi(2^m), where p is prime, and k and m are nonnegative integers, and pi(x) denotes the number of primes not exceeding x.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 06 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2.
We have verified this for n up to 2*10^8.
In contrast with this conjecture, in 1971 R. Crocker proved that there are infinitely many positive odd numbers not of the form p + 2^k + 2^m, where p is prime, and k and m are positive integers.

Crossrefs

Programs

  • Maple
    a(3) = 1 since 3 = 2 + 2^0 + pi(2^0) with 2 prime.
    a(4) = 3 since 4 = 2 + 2^0 + pi(2) = 2 + 2 + pi(2^0) = 3 + 2^0 + pi(2^0) with 2 and 3 both prime.
  • Mathematica
    f[n_]:=PrimePi[2^n]
    Do[r=0;Do[If[f[x]>=n,Goto[aa]];Do[If[PrimeQ[n-f[x]-2^y],r=r+1],{y,0,Log[2,n-f[x]]}];Continue,{x,0,n}];Label[aa];Print[n," ",r];Continue,{n,1,100}]

A262985 Number of ordered ways to write n as 2^x + phi(y^2) + z*(z+1)/2 with x, y and z positive integers, where phi(.) is Euler's totient function given by A000010.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 06 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3.
We have verified this for n up to 1.3*10^8.

Examples

			a(4) = 1 since 4 = 2 + phi(1^2) + 1*2/2.
a(5) = 1 since 5 = 2 + phi(2^2) + 1*2/2.
a(8) = 1 since 8 = 2^2 + phi(1^2) + 2*3/2.
a(36) = 2 since 36 = 2 + phi(3^2) + 7*8/2 = 2^5 + phi(1^2) + 2*3/2.
		

Crossrefs

Programs

  • Mathematica
     f[n_]:=EulerPhi[n^2]
    TQ[n_]:=n>0&&IntegerQ[Sqrt[8n+1]]
    Do[r=0;Do[If[f[x]>=n,Goto[aa]];Do[If[TQ[n-f[x]-2^y],r=r+1], {y,1,Log[2,n-f[x]]}]; Label[aa];Continue,{x,1,n}];Print[n," ",r];Continue,{n,1,100}]
Showing 1-3 of 3 results.