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

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]

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]
Showing 1-2 of 2 results.