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

A255160 Least positive integer m with A254885(m) = n.

Original entry on oeis.org

1, 3, 10, 11, 19, 35, 55, 46, 71, 136, 86, 131, 200, 170, 221, 275, 271, 235, 236, 401, 341, 326, 491, 478, 586, 431, 731, 716, 536, 635, 775, 851, 821, 695, 1040, 950, 1241, 1171, 1160, 1031, 1306, 1115, 1801, 1460, 1706, 1391, 1531, 1685, 1790, 1670, 2081, 1745, 2161, 2021, 1976, 2330, 2350, 2216, 2645, 2615
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 15 2015

Keywords

Comments

Conjecture: a(n) exists for any n > 0. Moreover, no term a(n) is congruent to 2 or 4 or 7 modulo 10.

Examples

			 a(3) = 10 since 10 is the least positive integer which can be written as the sum of two squares and a positive triangular number in exactly 3 ways. In fact, 10 = 0^2 + 0^2 + 4*5/2 = 0^2 + 2^2 + 3*4/2 = 0^2 + 3^2 + 1*2/2.
		

Crossrefs

Programs

  • Mathematica
    TQ[n_]:=n>0&&IntegerQ[Sqrt[8n+1]]
    Do[Do[m=0;Label[aa];m=m+1;r=0;Do[If[TQ[m-x^2-y^2],r=r+1;If[r>n,Goto[aa]]],{x,0,Sqrt[m/2]},{y,x,Sqrt[m-x^2]}];If[r==n,Print[n," ",m];Goto[bb],
    Goto[aa]]];Label[bb];Continue,{n,1,60}]

A262813 Number of ordered ways to write n as x^3 + y^2 + z*(z+1)/2 with x >= 0, y >=0 and z > 0.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 03 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 9, 21, 35, 98, 152, 306.
This has been verified for all n = 1..2*10^7.
Conjecture verified up to 10^11. - Mauro Fiorentini, Jul 18 2023
If z >= 0, a(n) = 1 only for n = 21, 35, 98, 306. - Mauro Fiorentini, Jul 20 2023
In contrast with the conjecture, in 2015 the author refined a result of Euler by proving that any positive integer can be written as the sum of two squares and a positive triangular number.
See also A262815, A262816 and A262941 for similar conjectures.

Examples

			a(1) = 1 since 1 = 0^3 + 0^2 + 1*2/2.
a(2) = 2 since 2 = 0^3 + 1^2 + 1*2/2 = 1^3 + 0^2 + 1*2/2.
a(6) = 2 since 6 = 0^3 + 0^2 + 3*4/2 = 1^3 + 2^2 + 1*2/2.
a(9) = 1 since 9 = 2^3 + 0^2 + 1*2/2.
a(21) = 1 since 21 = 0^3 + 0^2 + 6*7/2.
a(35) = 1 since 35 = 0^3 + 5^2 + 4*5/2.
a(98) = 1 since 98 = 3^3 + 4^2 + 10*11/2.
a(152) = 1 since 152 = 0^3 + 4^2 + 16*17/2.
a(306) = 1 since 306 = 1^3 + 13^2 + 16*17/2.
		

Crossrefs

Programs

  • Mathematica
    TQ[n_]:=n>0&&IntegerQ[Sqrt[8n+1]]
    Do[r=0;Do[If[TQ[n-x^3-y^2],r=r+1],{x,0,n^(1/3)},{y,0,Sqrt[n-x^3]}];Print[n," ",r];Continue,{n,1,100}]

A262941 Number of ordered pairs (x,y) with x >= 0 and y > 0 such that n - x^4 - y*(y+1)/2 is an even square or twice a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 04 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0. In other words, any positive integer n can be written as x^4 + 2^k*y^2 + z*(z+1)/2, where k is 1 or 2, and x,y,z are integers with z > 0.
This has been verified for n up to 2*10^6. We also guess that a(n) = 1 only for n = 1, 2, 13, 16, 50, 59, 239, 493, 1156, 1492, 1984, 3332.
See also A262944, A262945, A262954, A262955, A262956 for similar conjectures.

Examples

			a(1)    = 1 since    1 = 0^4 +    0^2 +  1*2/2  with  0 even.
a(2)    = 1 since    2 = 1^4 +    0^2 +  1*2/2  with  0 even.
a(13)   = 1 since   13 = 1^4 + 2* 1^2 +  4*5/2.
a(16)   = 1 since   16 = 1^4 +    0^2 +  5*6/2  with  0 even.
a(50)   = 1 since   50 = 1^4 +    2^2 +  9*10/2 with  2 even.
a(59)   = 1 since   59 = 0^4 +    2^2 + 10*11/2 with  2 even.
a(239)  = 1 since  239 = 0^4 + 2* 2^2 + 21*22/2 with  2 even.
a(493)  = 1 since  493 = 2^4 +   18^2 + 17*18/2 with 18 even.
a(1156) = 1 since 1156 = 1^4 + 2*24^2 +  2*3/2  with 24 even.
a(1492) = 1 since 1492 = 2^4 + 2* 7^2 + 52*53/2.
a(1984) = 1 since 1984 = 5^4 +   18^2 + 45*46/2 with 18 even.
a(3332) = 1 since 3332 = 5^4 +   52^2 +  2*3/2  with 52 even.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n/2]]||IntegerQ[Sqrt[n/4]]
    Do[r=0;Do[If[SQ[n-x^4-y(y+1)/2],r=r+1],{x,0,n^(1/4)},{y,1,(Sqrt[8(n-x^4)+1]-1)/2}];Print[n," ",r];Continue,{n,1,100}]

A262944 Number of ordered pairs (x,y) with x >= 0 and y > 0 such that n - x^4 - y*(y+1)/2 is a square or a pentagonal number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 05 2015

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 9, 63, 69, 489, 714, 1089.
(ii) For any positive integer n, there are integers x >= 0 and y > 0 such that n - x^4 - y*(y+1)/2 is twice a square or twice a pentagonal number.
(iii) For any positive integer n, there are integers x >= 0 and y > 0 such that n - 2*x^4 - y*(y+1)/2 is a square or a pentagonal number.
See also A262941 and A262945 for similar conjectures.

Examples

			a(1) = 1 since 1 = 0^4 + 1*2/2 + p_5(0), where p_5(n) denotes the pentagonal number n*(3*n-1)/2.
a(9) = 1 since 9 = 1^4 + 2*3/2 + p_5(2).
a(63) = 1 since 63 = 0^4 + 7*8/2 + p_5(5).
a(69) = 1 since 69 = 2^4 + 7*8/2 + 5^2.
a(489) = 1 since 489 = 3^4 + 12*13/2 + p_5(15).
a(714) = 1 since 714 = 4^4 + 18*19/2 + p_5(14).
a(1089) = 1 since 1089 = 4^4 + 38*39/2 + p_5(8).
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]||(IntegerQ[Sqrt[24n+1]]&&Mod[Sqrt[24n+1]+1,6]==0)
    Do[r=0;Do[If[SQ[n-x^4-y(y+1)/2],r=r+1],{x,0,n^(1/4)},{y,1,(Sqrt[8(n-x^4)+1]-1)/2}];Print[n," ",r];Continue,{n,1,100}]

A262785 Number of ordered ways to write n as x^2 + y^2 + p*(p+d)/2, where 0 <= x <= y, d is 1 or -1, and p is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 01 2015

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 9, 34, 45, 49, 72, 97, 241, 337, 538.
(ii) Any integer n > 9 can be written as x^2 + y^2 + z*(z+1), where x,y,z are nonnegative integers with z-1 or z+1 prime.
In 2015, the author refined a result of Euler by proving that any positive integer can be written as the sum of two squares and a positive triangular number.

Examples

			a(1) = 1 since 1 = 0^2 + 0^2 + 2*(2-1)/2 with 2 prime.
a(2) = 1 since 2 = 0^2 + 1^2 + 2*(2-1)/2 with 2 prime.
a(3) = 3 since 3 = 0^2 + 0^2 + 2*(2+1)/2 = 0^2 + 0^2 + 3*(3-1)/2 = 1^2 + 1^2 + 2*(2-1)/2 with 2 and 3 both prime.
a(9) = 1 since 9 = 2^2 + 2^2 + 2*(2-1)/2 with 2 prime.
a(34) = 1 since 34 = 2^2 + 3^2 + 7*(7-1)/2 with 7 prime.
a(45) = 1 since 45 = 1^2 + 4^2 + 7*(7+1)/2 with 7 prime.
a(49) = 1 since 49 = 3^2 + 5^2 + 5*(5+1)/2 with 5 prime.
a(72) = 1 since 72 = 1^2 + 4^2 + 11*(11-1)/2 with 11 prime.
a(97) = 1 since 97 = 1^2 + 9^2 + 5(5+1)/2 with 5 prime.
a(241) = 1 since 241 = 1^2 + 15^2 + 5*(5+1)/2 with 5 prime.
a(337) = 1 since 337 = 5^2 + 6^2 + 23*(23+1)/2 with 23 prime.
a(538) = 1 since 538 = 3^2 + 8^2 + 31*(31-1)/2 with 31 prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    f[d_,n_]:=Prime[n](Prime[n]+(-1)^d)/2
    Do[r=0;Do[If[SQ[n-f[d,k]-x^2],r=r+1],{d,0,1},{k,1,PrimePi[(Sqrt[8n+1]-(-1)^d)/2]},{x,0,Sqrt[(n-f[d,k])/2]}];Print[n," ",r];Continue,{n,1,100}]

A255191 Number of solutions to the equation n = x^2 + y*(y+1)/2 + z*(z+1)/2 (x,y,z=0,1,...) with x == Floor[sqrt(n)] (mod 2) and y <= z.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 16 2015

Keywords

Comments

By Dickson's book in the reference, E. Lionnet observed in 1872 that any nonnegative integer can be written as the sum of a square and two triangular numbers.
We have a(n) > 0 for all n. This follows from Theorem 1(i) and Lemma 2 of Sun's reference in 2007. Note that if n = m*(m+1) with m a nonnegative integer then floor(sqrt(n)) = m.

Examples

			a(14) = 1 since 14 = 1^2 + 2*3/2 + 4*5/2 with floor(sqrt(14)) == 1 (mod 2).
a(44) = 1 since 44 = 4^2 + 0*1/2 + 7*8/2 with floor(sqrt(44)) == 4 (mod 2).
a(63) = 1 since 63 = 5^2 + 4*5/2 + 7*8/2 with floor(sqrt(63)) == 5 (mod 2).
		

References

  • L. E. Dickson, History of the Theory of Numbers, vol. II, AMS Chelsea Publ., 1999, p. 24.

Crossrefs

Programs

  • Mathematica
    TQ[n_]:=IntegerQ[Sqrt[8n+1]]
    Do[r=0;Do[If[Mod[Floor[Sqrt[n]]-x,2]==0&&TQ[n-x^2-y*(y+1)/2], r=r+1],{x,0,Sqrt[n]},{y,0,(Sqrt[4(n-x^2)+1]-1)/2}];
    Print[n," ",r];Label[aa];Continue,{n,0,100}]
Showing 1-6 of 6 results.