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.

A308566 Number of ways to write n as w^2 + x*(x+1) + 4^y*5^z with w,x,y,z nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jun 07 2019

Keywords

Comments

Recall an observation of Euler: {w^2 + x*(x+1): w,x = 0,1,2,...} = {a*(a+1)/2 + b*(b+1)/2: a,b = 0,1,...}.
Conjecture: a(n) > 0 for all n > 0. Equivalently, each n = 1,2,3,... can be written as a*(a+1)/2 + b*(b+1)/2 + 4^c*5^d with a,b,c,d nonnegative integers.
See also A308584 for a similar conjecture.
We have verified a(n) > 0 for all n = 1..5*10^8.
a(n) > 0 for 0 < n < 10^10. - Giovanni Resta, Jun 08 2019

Examples

			a(1) = 1 with 1 = 0^2 + 0*1 + 4^0*5^0.
a(2) = 1 with 2 = 1^2 + 0*1 + 4^0*5^0.
a(3) = 1 with 3 = 0^2 + 1*2 + 4^0*5^0.
a(9) = 1 with 9 = 2^2 + 0*1 + 4^0*5^1.
a(303) = 1 with 303 = 16^2 + 6*7 + 4^0*5^1.
a(585) = 1 with 585 = 5^2 + 15*16 + 4^3*5^1.
a(37863) = 2 with 37863 = 166^2 + 101*102 + 4^0*5^1 = 179^2 + 26*27 + 4^5*5^1.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    tab={};Do[r=0;Do[If[SQ[n-4^k*5^m-x(x+1)],r=r+1],{k,0,Log[4,n]},{m,0,Log[5,n/4^k]},{x,0,(Sqrt[4(n-4^k*5^m)+1]-1)/2}];tab=Append[tab,r],{n,1,100}];Print[tab]

A308584 Number of ways to write n as a*(a+1)/2 + b*(b+1)/2 + 5^c*8^d, where a,b,c,d are nonnegative integers with a <= b.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jun 08 2019

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0. Equivalently, each n = 1,2,3,... can be written as w^2 + x*(x+1) + 5^y*8^z with w,x,y,z nonnegative integers.
We have verified a(n) > 0 for all n = 1..4*10^8.
See also A308566 for a similar conjecture.
a(n) > 0 for all 0 < n < 10^10. - Giovanni Resta, Jun 10 2019

Examples

			a(13) = 1 with 13 = 3*4/2 + 3*4/2 + 5^0*8^0.
a(48) = 1 with 48 = 5*6/2 + 7*8/2 + 5^1*8^0.
a(87) = 1 with 87 = 1*2/2 + 12*13/2 + 5^0*8^1.
a(90) = 1 with 90 = 4*5/2 + 10*11/2 + 5^2*8^0.
a(423) = 1 with 423 = 9*10/2 + 22*23/2 + 5^3*8^0.
a(517) = 1 with 517 = 17*18/2 + 24*25/2 + 5^0*8^2.
a(985) = 1 with 985 = 19*20/2 + 34*35/2 + 5^2*8^1.
a(2694) = 1 with 2694 = 7*8/2 + 68*69/2 + 5^1*8^2.
a(42507) = 1 with 42507 = 178*179/2 + 223*224/2 + 5^2*8^2.
a(544729) = 1 with 544729 = 551*552/2 + 857*858/2 + 5^5*8^1.
a(913870) = 1 with 913870 = 559*560/2 + 700*701/2 + 5^3*8^4.
a(1843782) = 1 with 1843782 = 808*809/2 + 1668*1669/2 + 5^6*8^1.
		

Crossrefs

Programs

  • Mathematica
    TQ[n_]:=TQ[n]=IntegerQ[Sqrt[8n+1]];
    tab={};Do[r=0;Do[If[TQ[n-5^k*8^m-x(x+1)/2],r=r+1],{k,0,Log[5,n]},{m,0,Log[8,n/5^k]},{x,0,(Sqrt[4(n-5^k*8^m)+1]-1)/2}];tab=Append[tab,r],{n,1,100}];Print[tab]

A308547 Number of ways to write n as a^2 + 2*b^2 + 2^c*3^d, where a,b,c,d are nonnegative integers.

Original entry on oeis.org

1, 2, 3, 4, 4, 4, 4, 4, 5, 7, 5, 8, 6, 5, 6, 4, 6, 8, 7, 10, 8, 6, 4, 8, 8, 8, 10, 10, 6, 9, 6, 4, 10, 9, 11, 14, 8, 8, 9, 10, 8, 11, 8, 9, 13, 6, 5, 8, 9, 10, 11, 13, 7, 14, 8, 10, 13, 9, 11, 16, 7, 7, 13, 4, 12, 12, 10, 12, 10, 13, 5, 14, 13, 9, 17, 12, 7, 12, 6, 10
Offset: 1

Views

Author

Zhi-Wei Sun, Jun 06 2019

Keywords

Comments

As 3*(a^2 + 2*b^2 + 2^c*3^d) = (a+2*b)^2 + 2*(a-b)^2 + 2^c*3^(d+1), we have a(3*n) > 0 if a(n) > 0.
The first positive integer n with a(n) = 0 is 139571911. We also have a(142991573) = 0.

Examples

			a(1) = 1 with 1 = 0^2 + 2*0^2 + 2^0*3^0.
a(2) = 2 with 2 = 0^2 + 2*0^2 + 2^1*3^0 = 1^2 + 2*0^2 + 2^0*3^0.
a(1117) = 2 with 1117 = 10^2 + 2*12^2 + 2^0*3^6 = 19^2 + 2*18^2 + 2^2*3^3.
a(78373) = 1 with 78373 = 271^2 + 2*48^2 + 2^2*3^4.
a(448159) = 1 with 448159 = 610^2 + 2*195^2 + 2^0*3^2.
a(82816213) = 2 with 82816213 = 4353^2 + 2*5651^2 + 2^1*3^0 = 3681^2 + 2*5885^2 + 2^1*3^0.
a(90685253) = 2 with 90685253 = 7007^2 + 2*4560^2 + 2^2*3^0 = 607^2 + 2*6720^2 + 2^2*3^0.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    tab={};Do[r=0;Do[If[SQ[n-3^k*2^m-2x^2],r=r+1],{k,0,Log[3,n]},{m,0,Log[2,n/3^k]},{x,0,Sqrt[(n-3^k*2^m)/2]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A308403 Number of ways to write n as 6^i + 3^j + A008347(k), where i, j and k > 0 are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 25 2019

Keywords

Comments

Conjecture 1: a(n) > 0 for all n > 2. In other words, each n = 3,4,... can be written as 6^i + 3^j + prime(k) - prime(k-1) + ... + (-1)^(k-1)*prime(1), where i, j and k > 0 are nonnegative integers.
Conjecture 2: If {a,b} is among {2,m} (m = 3..14), {3,4}, {3,5}, then any integer n > 2 can be written as a^i + b^j + A008347(k) with i, j and k > 0 nonnegative integers.
Using Qing-Hu Hou's program, we have verified Conjectures 1 and 2 for n up to 10^9 and 10^7 respectively. - Zhi-Wei Sun, May 28 2019
Conjecture 1 verified up to 10^10. Conjecture 2 holds up to 10^10 for all cases except {2, 12} since 4551086841 cannot be written as 2^i + 12^j + A008347(k). - Giovanni Resta, May 28 2019

Examples

			a(3) = 1 with 3 - (6^0 + 3^0) = 1 = A008347(2).
a(4) = 1 with 4 - (6^0 + 3^0) = 2 = A008347(1).
a(24) = 1 with 24 - (6^0 + 3^0) = 22 = A008347(13).
a(234) = 1 with 234 - (6^1 + 3^3) = 201 = A008347(90).
a(1134) = 1 with 1134 - (6^2 + 3^0) = 1097 = A008347(322).
a(4330) = 1 with 4330 - (6^3 + 3^0) = 4113 = A008347(1016).
a(5619) = 1 with 5619 - (6^1 + 3^3) = 5586 = A008347(1379).
a(6128) = 1 with 6128 - (6^0 + 3^0) = 6126 = A008347(1499).
a(16161) = 1 with 16161 - (6^3 + 3^0) = 15944 = A008347(3445).
a(133544) = 1 with 133544 - (6^0 + 3^8) = 126982 = A008347(22579).
		

Crossrefs

Programs

  • Mathematica
    Pow[n_]:=Pow[n]=n>0&&IntegerQ[Log[3,n]];
    s[0]=0;s[n_]:=s[n]=Prime[n]-s[n-1];
    tab={};Do[r=0;Do[If[s[k]>=n,Goto[bb]];Do[If[Pow[n-s[k]-6^m],r=r+1],{m,0,Log[6,n-s[k]]}];Label[bb],{k,1,2n-1}];tab=Append[tab,r],{n,1,100}];Print[tab]

A308950 Number of ways to write n as (p-1)/6 + 2^a*3^b, where p is a prime, and a and b are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jul 02 2019

Keywords

Comments

Conjecture: Let r be 1 or -1. Then, any integer n > 1 can be written as (p-r)/6 + 2^a*3^b, where p is a prime, and a and b are nonnegative integers; in other words, 6*n+r can be written as p + 2^k*3^m, where p is a prime, and k and m are positive integers.
We have verified this for all n = 2..10^9.
Conjecture verified up to n = 10^11. - Giovanni Resta, Jul 03 2019

Examples

			a(2) = 1 since 2 = (7-1)/6 + 2^0*3^0 with 7 prime.
a(3) = 2 since 3 = (13-1)/6 + 2^0*3^0 = (7-1)/6 + 2^1*3^0 with 13 and 7 prime.
		

Crossrefs

Programs

  • Mathematica
    tab={};Do[r=0;Do[If[PrimeQ[6(n-2^a*3^b)+1],r=r+1],{a,0,Log[2,n]},{b,0,Log[3,n/2^a]}];tab=Append[tab,r],{n,1,100}];Print[tab]
Showing 1-5 of 5 results.