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 13 results. Next

A303656 Number of ways to write n as a^2 + b^2 + 3^c + 5^d, where a,b,c,d are nonnegative integers with a <= b.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 27 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1. In other words, any integer n > 1 can be written as the sum of two squares, a power of 3 and a power of 5.
It has been verified that a(n) > 0 for all n = 2..2*10^10.
It seems that any integer n > 1 also can be written as the sum of two squares, a power of 2 and a power of 3.
The author would like to offer 3500 US dollars as the prize for the first proof of his conjecture that a(n) > 0 for all n > 1. - Zhi-Wei Sun, Jun 05 2018
Jiao-Min Lin (a student at Nanjing University) has verified a(n) > 0 for all 1 < n <= 2.4*10^11. - Zhi-Wei Sun, Jul 30 2022

Examples

			a(2) = 1 with 2 = 0^2 + 0^2 + 3^0 + 5^0.
a(5) = 1 with 5 = 0^2 + 1^2 + 3^1 + 5^0.
a(25) = 1 with 25 = 1^2 + 4^2 + 3^1 + 5^1.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    f[n_]:=f[n]=FactorInteger[n];
    g[n_]:=g[n]=Sum[Boole[Mod[Part[Part[f[n],i],1],4]==3&&Mod[Part[Part[f[n],i],2],2]==1],{i,1,Length[f[n]]}]==0;
    QQ[n_]:=QQ[n]=(n==0)||(n>0&&g[n]);
    tab={};Do[r=0;Do[If[QQ[n-3^k-5^m],Do[If[SQ[n-3^k-5^m-x^2],r=r+1],{x,0,Sqrt[(n-3^k-5^m)/2]}]],{k,0,Log[3,n]},{m,0,If[n==3^k,-1,Log[5,n-3^k]]}];tab=Append[tab,r],{n,1,90}];Print[tab]

A304081 Number of ways to write n as p + 2^k + (1+(n mod 2))*5^m, where p is an odd prime, and k and m are nonnegative integers with 2^k + (1+(n mod 2))*5^m squarefree.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 06 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 7.
This has been verified for n up to 2*10^10.
See also A303821, A303934, A303949, A304031 and A304122 for related information, and A304034 for a similar conjecture.
The author would like to offer 2500 US dollars as the prize to the first proof of the conjecture, and 250 US dollars as the prize to the first explicit counterexample. - Zhi-Wei Sun, May 08 2018

Examples

			a(6) = 1 since 6 = 3 + 2^1 + 5^0 with 3 an odd prime and 2^1 + 5^0 = 3 squarefree.
a(15) = 1 since 15 = 5 + 2^3 + 2*5^0 with 5 an odd prime and 2^3 + 2*5^0 = 2*5 squarefree.
a(35) = 1 since 35 = 29 + 2^2 + 2*5^0 with 29 an odd prime and 2^2 + 2*5^0 = 2*3 squarefree.
a(91) = 1 since 91 = 17 + 2^6 + 2*5^1 with 17 an odd prime and 2^6 + 2*5^1 = 2*37 squarefree.
a(9574899) = 1 since 9574899 = 9050609 + 2^19 + 2*5^0 with 9050609 an odd prime and 2^19 + 2*5^0 = 2*5*13*37*109 squarefree.
a(6447154629) = 2 since 6447154629 = 6447121859 + 2^15 + 2*5^0 with 6447121859 prime and 2^15 + 2*5^0 = 2*5*29*113 squarefree, and 6447154629 = 5958840611 + 2^15 + 2*5^12 with 5958840611 prime and 2^15 + 2*5^12 = 2*17*41*433*809 squarefree.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=n>2&&PrimeQ[n];
    tab={};Do[r=0;Do[If[SquareFreeQ[2^k+(1+Mod[n,2])*5^m]&&PQ[n-2^k-(1+Mod[n,2])*5^m],r=r+1],{k,0,Log[2,n]},{m,0,If[2^k==n,-1,Log[5,(n-2^k)/(1+Mod[n,2])]]}];tab=Append[tab,r],{n,1,90}];Print[tab]

A304034 Number of ways to write n as p + 2^k + (1+(n mod 2))*3^m with p prime, where k and m are positive integers with 2^k + (1+(n mod 2))*3^m squarefree.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 06 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 11.
This has been verified for n up to 10^10.
See also A304081 for a similar conjecture.

Examples

			a(8) = 1 since 8 = 3 + 2^1 + 3^1 with 3 prime and 2^1 + 3^1 = 5 squarefree.
a(13) = 1 since 13 = 3 + 2^2 + 2*3^1 with 3 prime and 2^2 + 2*3^1 = 2*5 squarefree.
a(19) = 1 since 19 = 5 + 2^3 + 2*3^1 with 5 prime and 2^3 + 2*3^1 = 2*7 squarefree.
a(23) = 1 since 23 = 13 + 2^2 + 2*3^1 with 13 prime and 2^2 + 2*3 = 2*5 squarefree.
		

Crossrefs

Programs

  • Mathematica
    tab={};Do[r=0;Do[If[SquareFreeQ[2^k+(1+Mod[n,2])*3^m]&&PrimeQ[n-2^k-(1+Mod[n,2])*3^m],r=r+1],{k,1,Log[2,n]},{m,1,If[2^k==n,-1,Log[3,(n-2^k)/(1+Mod[n,2])]]}];tab=Append[tab,r],{n,1,90}];Print[tab]

A303821 Number of ways to write 2*n as p + 2^x + 5^y, where p is a prime, and x and y are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 01 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1. Moreover, for any integer n > 4, we can write 2*n as p + 2^x + 5^y, where p is an odd prime, and x and y are positive integers.
This has been verified for n up to 10^10.
See also A303934 and A304081 for further refinements, and A303932 and A304034 for similar conjectures.

Examples

			a(2) = 1 since 2*2 = 2 + 2^0 + 5^0 with 2 prime.
a(3) = 1 since 2*3 = 3 + 2^1 + 5^0 with 3 prime.
a(5616) = 2 since 2*5616 = 9059 + 2^11 + 5^3 = 10979 + 2^7 + 5^3 with 9059 and 10979 both prime.
		

Crossrefs

Programs

  • Mathematica
    tab={};Do[r=0;Do[If[PrimeQ[2n-2^k-5^m],r=r+1],{k,0,Log[2,2n-1]},{m,0,Log[5,2n-2^k]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A303932 Number of ways to write 2*n as p + 2^k + 3^m, where p is a prime with 11 a quadratic residue modulo p, and k and m are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 02 2018

Keywords

Comments

Conjecture 1. a(n) > 0 for all n > 1, i.e., any even number greater than two can be written as the sum of a power 2, a power of 3 and a prime p with 11 a quadratic residue modulo p.
Conjecture 2. For any integer n > 2, we can write 2*n as p + 2^k + 3^m, where p is a prime with 11 a quadratic nonresidue modulo p, and k and m are nonnegative integers.
We have verified Conjectures 1 and 2 for n up to 5*10^8.

Examples

			a(2) = 1 since 2*2 = 2 + 2^0 + 3^0 with 11 a quadratic residue modulo the prime 2.
a(3) = 1 since 2*3 = 2 + 2^0 + 3^1 with 11 a quadratic residue modulo the prime 2.
a(10) = 1 since 2*10 = 7 + 2^2 + 3^2 with 11 a quadratic residue modulo the prime 7.
a(14) = 1 since 2*14 = 19 + 2^3 + 3^0 with 11 a quadratic residue modulo the prime 19.
a(17) = 1 since 2*17 = 5 + 2^1 + 3^3 with 11 a quadratic residue modulo the prime 5.
a(38) = 1 since 2*38 = 37 + 2^1 + 3^3 with 11 a quadratic residue modulo the prime 37.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PQ[n]=n==2||(n>2&&PrimeQ[n]&&JacobiSymbol[11,n]==1);
    tab={};Do[r=0;Do[If[PQ[2n-2^k-3^m],r=r+1],{k,0,Log[2,2n-1]},{m,0,Log[3,2n-2^k]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A303934 Number of ways to write 2*n as p + 2^k + 5^m with p prime and 2^k + 5^m squarefree, where k and m are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 03 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This has been verified for all n = 2..10^10.
Note that a(n) <= A303821(n).

Examples

			a(2) = 1 since 2*2 = 2 + 2^0 + 5^0 with 2 prime and 2^0 + 5^0 squarefree.
a(3) = 1 since 2*3 = 3 + 2^1 + 5^0 with 3 prime and 2^1 + 5^0 squarefree.
		

Crossrefs

Programs

  • Mathematica
    tab={};Do[r=0;Do[If[SquareFreeQ[2^k+5^m]&&PrimeQ[2n-2^k-5^m],r=r+1],{k,0,Log[2,2n-1]},{m,0,Log[5,2n-2^k]}];tab=Append[tab,r],{n,1,90}];Print[tab]

A304031 Number of ways to write 2*n as p + 2^k + 5^m with p prime and 2^k + 5^m a product of at most three distinct primes, where k and m are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 04 2018

Keywords

Comments

a(n) > 0 for all 1 < n <= 10^10 with the only exception n = 3114603841, and 2*3114603841 = 6219442049 + 2^3 + 5^10 with 6219442049 prime and 2^3 + 5^10 = 3*17*419*457 squarefree.
Note that a(n) <= A303934(n) <= A303821(n).

Examples

			a(3) = 1 since 2*3 = 3 + 2^1 + 5^0 with 3 = 2^1 + 5^0  prime.
a(7) = 2 since 2*7 = 7 + 2^1 + 5^1 with 7 = 2^1 + 5^1 prime, and 2*7 = 11 + 2^1 + 5^0 with 11 and 2^1 + 5^0 both prime.
a(42908) = 2 since 2*42908 = 85751 + 2^6 + 5^0 with 85751 prime and 2^6 + 5^0 = 5*13, and 2*42908 = 69431 + 2^14 + 5^0 with 69431 prime and 2^14 + 5^0 = 5*29*113.
		

Crossrefs

Programs

  • Mathematica
    qq[n_]:=qq[n]=SquareFreeQ[n]&&Length[FactorInteger[n]]<=3;
    tab={};Do[r=0;Do[If[qq[2^k+5^m]&&PrimeQ[2n-2^k-5^m],r=r+1],{k,0,Log[2,2n-1]},{m,0,Log[5,2n-2^k]}];tab=Append[tab,r],{n,1,90}];Print[tab]

A303949 Number of ways to write 2*n+1 as p + 2*(2^k+5^m) with p prime and 2^k+5^m a product of at most three distinct primes, where k and m are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 05 2018

Keywords

Comments

4787449 is the first value of n > 2 with a(n) = 0, and 2*4787449+1 = 9574899 has the unique representation as p + 2*(2^k+5^m): 9050609 + 2*(2^18+5^0) with 9050609 prime and 2^18+5^0 = 5*13*37*109.
See also A303934 and A304081 for related conjectures.

Examples

			a(3) = 1 since 2*3+1 = 3 + 2*(2^0+5^0) with 3 prime.
		

Crossrefs

Programs

  • Mathematica
    qq[n_]:=qq[n]=SquareFreeQ[n]&&Length[FactorInteger[n]]<=3;
    tab={};Do[r=0;Do[If[SquareFreeQ[2^k+5^m]&&PrimeQ[2n+1-2(2^k+5^m)],r=r+1],{k,0,Log[2,n]},{m,0,Log[5,n+1/2-2^k]}];tab=Append[tab,r],{n,1,90}];Print[tab]

A304032 Number of ways to write 2*n as p + 2^k + 3^m with p prime and 2^k + 3^m a product of at most two distinct primes, where k and m are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 04 2018

Keywords

Comments

The even number 58958 cannot be written as p + 2^k + 3^m with p and 2^k + 3^m both prime.
Clearly, a(n) <= A303702(n). We note that a(n) > 0 for all n = 2..5*10^8.
See also A304034 for a related conjecture.

Examples

			a(3) = 1 since 2*3 = 3 + 2^1 + 3^0 with 3 = 2^1 + 3^0 prime.
		

References

  • J. R. Chen, On the representation of a larger even integer as the sum of a prime and the product of at most two primes, Sci. Sinica 16(1973), 157-176.

Crossrefs

Programs

  • Mathematica
    qq[n_]:=qq[n]=SquareFreeQ[n]&&Length[FactorInteger[n]]<=2;
    tab={};Do[r=0;Do[If[qq[2^k+3^m]&&PrimeQ[2n-2^k-3^m],r=r+1],{k,0,Log[2,2n-1]},{m,0,Log[3,2n-2^k]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A304122 Squarefree numbers of the form 2^k + 5^m, where k is a positive integer and m is a nonnegative integer.

Original entry on oeis.org

3, 5, 7, 13, 17, 21, 29, 33, 37, 41, 57, 65, 69, 89, 127, 129, 133, 141, 157, 253, 257, 281, 381, 517, 537, 627, 629, 633, 641, 689, 753, 881, 1049, 1137, 1149, 1649, 2049, 2053, 2073, 2173, 3127, 3129, 3133, 3157, 3189, 3253, 3637, 4097, 4101, 4121
Offset: 1

Views

Author

Zhi-Wei Sun, May 07 2018

Keywords

Comments

The conjecture in A304081 has the following equivalent version: Any even number greater than 4 can be written as the sum of a prime and a term of the current sequence, and also any odd number greater than 8 can be written as the sum of a prime and twice a term of the current sequence.

Examples

			a(1) = 3 since 3 = 2^1 + 5^0 is squarefree.
a(6) = 21 since 21 = 2^4 + 5^1 = 3*7 is squarefree.
		

Crossrefs

Programs

  • Mathematica
    V={}; Do[If[SquareFreeQ[2^k+5^m],V=Append[V,2^k+5^m]],{k,1,12},{m,0,5}];
    LL:=LL=Sort[DeleteDuplicates[V]];
    a[n_]:=a[n]=LL[[n]];
    Table[a[n],{n,1,50}]
Showing 1-10 of 13 results. Next