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

A160325 Number of ways to express n=0,1,2,... as the sum of a triangular number, an even square and a pentagonal number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 08 2009

Keywords

Comments

In April 2009, Zhi-Wei Sun conjectured that a(n)>0 for every n=0,1,2,3,... Note that pentagonal numbers are more sparse than squares. It is known that any positive integer can be written as the sum of a triangular number, a square and an even square (or an odd square).

Examples

			For n=15 the a(15)=5 solutions are 3+0+12, 6+4+5, 10+0+5, 10+4+1, 15+0+0.
		

Crossrefs

Programs

  • Mathematica
    SQ[x_]:=x>-1&&IntegerPart[Sqrt[x]]^2==x RN[n_]:=Sum[If[SQ[8(n-4y^2-(3z^2-z)/2)+1],1,0], {y,0,Sqrt[n/4]},{z,0,Sqrt[n-4y^2]}] Do[Print[n," ", RN[n]],{n,0,60000}]

Formula

a(n) = |{: x,y,z=0,1,2,... & x(x+1)/2+4y^2+(3z^2-z)/2}|.

Extensions

More terms copied from author's b-file by Hagen von Eitzen, Jul 20 2009

A160326 Number of ways to express n=0,1,2,... as the sum of two squares and a pentagonal number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 08 2009

Keywords

Comments

In April 2009, Zhi-Wei Sun conjectured that a(n)>0 for every n=0,1,2,3,... Note that pentagonal numbers are more sparse than squares. The Gauss-Legendre theorem asserts that n is the sum of three squares if and only if it is not of the form 4^a(8b+7) (a,b=0,1,2,...).

Examples

			For n=5 the a(5)=5 solutions are 0+0+5, 1+4+0, 4+1+0, 0+4+1, 4+0+1.
		

Crossrefs

Programs

  • Mathematica
    SQ[x_]:=x>-1&&IntegerPart[Sqrt[x]]^2==x RN[n_]:=Sum[If[SQ[n-y^2-(3z^2-z)/2],1,0], {y,0,Sqrt[n]},{z,0,Sqrt[n-y^2]}] Do[Print[n," ", RN[n]],{n,0,50000}]

Formula

a(n) = |{: x,y=0,1,2,... & x^2+y^2+(3z^2-z)/2=n}|.

A240088 The number of ways of writing n as an ordered sum of a triangular number (A000217), a square (A000290) and a pentagonal number (A000326).

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Mar 31 2014

Keywords

Comments

0 and 1 are triangular numbers, square numbers and pentagonal numbers.
It is conjectured that a(n) is always positive - this is one of the conjectures in Conjecture 1.1 of Sun (2009). - N. J. A. Sloane, Apr 01 2014
Note that both the conjecture in A160325 and the conjecture in A160324 imply that a(n) is always positive. - Zhi-Wei Sun, Apr 01 2014
a(n) > 0 for all n < 10^10. - Robert G. Wilson v, Aug 20 2016
Least number to be represented k ways, k >= 1: 0, 3, 1, 5, 10, 19, 15, 22, 31, 51, 61, 37, 82, 71, 126, 96, 92, 136, 162, 187, 206, 276, 191, 261, 236, 247, 317, 302, 401, 292, 422, 547, 456, 544, 551, 612, 591, 577, 521, 666, 742, 726, 682, 877, 796, 1052, 961, 1046, 1171, 1027, ..., . A275999.
Greatest number (conjectured) to be represented k ways, k >= 1: 0, 18, 168, 78, 243, 130, 553, 455, 515, 658, 865, 945, 633, 1918, 2258, 1385, 1583, 2828, 2135, 2335, 2785, 4533, 3168, 3478, 2790, 3868, 4193, 7328, 4953, 5278, 6390, 8148, 8015, 4585, 9160, 10485, 7613, 12333, 12025, 10178, 9923, 9720, 12558, 11340, 17420, 11753, 14893, 16155, 16415, 14343, ..., .
Conjectured lists of numbers that are represented in k >= 1 ways:
1: 0;
2: 3, 18;
3: 1, 2, 4, 8, 9, 13, 14, 35, 98, 168;
4: 5, 6, 7, 21, 25, 30, 34, 39, 43, 48, 63, 78;
5: 10, 11, 12, 17, 20, 23, 28, 33, 69, 193, 203, 230, 243;
6: 19, 24, 32, 44, 53, 55, 74, 90, 111, 130;
7: 15, 16, 27, 29, 40, 46, 56, 60, 62, 68, 73, 84, 85, 95, 108, 113, 123, 135, 139, 163, 165, 273, 553;
8: 22, 26, 42, 45, 47, 49, 59, 65, 83, 88, 89, 93, 112, 119, 125, 134, 140, 144, 186, 205, 233, 244, 320, 405, 455;
9: 31, 36, 38, 41, 50, 52, 58, 100, 109, 124, 160, 214, 249, 308, 358, 515; ..., .

Crossrefs

Programs

  • Maple
    # requires Maple 17 and up
    with(SignalProcessing):
    N:= 10000;  # to get terms up to a(N)
    A:= Array(0..N,datatype=float);
    B:= Array(0..N,datatype=float);
    C:= Array(0..N,datatype=float);
    for i from 0 to floor(sqrt(N)) do A[i^2]:= 1 od:
    for i from 0 to floor((1+sqrt(1+8*N))/2) do B[i*(i-1)/2]:= 1 od:
    for i from 0 to floor((1+sqrt(1+24*N))/6) do C[i*(3*i-1)/2]:= 1 od:
    R:= Convolution(Convolution(A,B),C);
    R:= evalhf(map(round,R));
    # Note that a(i) = R[i+1] for i from 0 to N
    # Robert Israel, Apr 01 2014
  • Mathematica
    p = Table[n (3n - 1)/2, {n, 0, 26}]; s = Table[n^2, {n, 0, 32}]; t = Table[n (n + 1)/2, {n, 0, 45}]; a = Sort@ Flatten@ Table[ p[[i]] + s[[j]] + t[[k]], {i, 26}, {j, 32}, {k, 45}]; Table[ Count[a, n], {n, 0, 105}]

A287616 Number of ways to write n as x(x+1)/2 + y(3y+1)/2 + z(5z+1)/2 with x,y,z nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 27 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 1, 2, 4, 7, 9, 22.
It was proved in arXiv:1502.03056 that each n = 0,1,2,... can be written as x(x+1)/2 + y(3y+1)/2 + z(5z+1)/2 with x,y,z integers. The author would like to offer 135 US dollars as the prize for the first proof of the conjecture that a(n) is always positive.
See over 400 similar conjectures in the linked a-file.

Examples

			a(4) = 1 since 4 = 1*(1+1)/2 + 0*(3*0+1)/2 + 1*(5*1+1)/2.
a(7) = 1 since 7 = 0*(0+1)/2 + 2*(3*2+1)/2 + 0*(5*0+1)/2.
a(9) = 1 since 9 = 3*(3+1)/2 + 0*(3*0+1)/2 + 1*(5*1+1)/2.
a(22) = 1 since 22 = 5*(5+1)/2 + 2*(3*2+1)/2 + 0*(5*0+1)/2.
		

Crossrefs

Programs

  • Mathematica
    TQ[n_]:=TQ[n]=IntegerQ[Sqrt[8n+1]];
    Do[r=0;Do[If[TQ[n-x(3x+1)/2-y(5y+1)/2],r=r+1],{x,0,(Sqrt[24n+1]-1)/6},{y,0,(Sqrt[40(n-x(3x+1)/2)+1]-1)/10}];Print[n," ",r],{n,0,80}]

A085263 Number of ways to write n as the sum of a squarefree number (A005117) and a positive square (A000290).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jun 23 2003

Keywords

Comments

a(A085265(n))>0; a(A085266(n))=1; a(A085267(n))>1.
a(A085264(n))=n and a(i)<>n for i < A085264(n).
First occurrence of k: 2, 6, 11, 23, 30, 38, 62, 71, 83, 110, 138, 155, 182, 203, 227, 263, 302, 327, 383, 435, 447, 503, 542, 602, 635, ..., . Conjecture: For each k above, there is a finite number of terms; for example, only the two numbers 1 and 13 cannot be represented as the sum of a squarefree number and a square. The number of k terms beginning with 0: 2, 9, 19, 27, 38, 36, 57, 63, 62, 74, 94, ..., . - Robert G. Wilson v, May 16 2014

Examples

			a(11)=3:
11 = 1 + 10 = A000290(1) + A005117(7)
   = 4 + 7  = A000290(2) + A005117(6)
   = 9 + 2  = A000290(3) + A005117(2).
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Count[ SquareFreeQ@# & /@ (n - Range[1, Floor[ Sqrt[ n]]]^2), True]; Array[f, 105] (* Robert G. Wilson v, May 16 2014 *)
  • PARI
    a(n) = sum(k=1, n-1, issquare(k) * issquarefree(n-k)); \\ Michel Marcus, Oct 30 2020

Formula

a(n+1) = Sum_{k=1..n} A008966(k)*A010052(n-k+1). - Reinhard Zumkeller, Nov 04 2009
a(n) < sqrt(n). - Robert G. Wilson v, May 17 2014
G.f.: (Sum_{i>=1} x^(i^2))*(Sum_{j>=1} mu(j)^2*x^j). - Ilya Gutkovskiy, Feb 06 2017

A242442 Number of ways of writing n, a positive integer, as an unordered sum of a triangular number (A000217), an odd square (A016754) and a pentagonal number (A000326).

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, May 14 2014

Keywords

Comments

It is conjectured that only 18 cannot be so represented. See Sun, p. 4, Remark 1.2 (b).

Crossrefs

Programs

  • Mathematica
    planeFigurative[n_, r_] := (n - 2) Binomial[r, 2] + r; s = Sort@ Flatten@ Table[ planeFigurative[3, i] + planeFigurative[4, j] + planeFigurative[5, k], {i, 0, 20}, {j, 1, 11, 2}, {k, 0, 8}]; Table[ Count[s, n], {n, 0, 104}]

A242443 Number of ways of writing n, a positive integer, as an unordered sum of a triangular number (A000217), an even square (A016742) and a generalized pentagonal number (A001318).

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, May 14 2014

Keywords

Comments

It is conjectured (1.1) and then proved by theorem 1.2 that all positive integers can be so represented [Sun, pp. 4-5].

Crossrefs

Programs

  • Mathematica
    planeFigurative[n_, r_] := pf[n, r] = (n - 2) Binomial[r, 2] + r; s = Sort@ Table[ planeFigurative[3, i] + planeFigurative[3, j] + planeFigurative[3, k], {i, 0, 14}, {j, 0, 10, 2}, {k, -8, 8}]; Table[ Count[s, n], {n, 0, 50}]

A254668 Number of ways to write n as the sum of a square, a second pentagonal number, and a hexagonal number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 04 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n. Also, a(n) = 1 only for n = 0, 5, 13, 14, 20, 112, 125.
Compare this conjecture with the conjecture in A160324.
The conjecture that a(n) > 0 for all n = 0,1,2,... appeared in Conjecture 1.2(ii) of the author's JNT paper in the links. - Zhi-Wei Sun, Oct 03 2016

Examples

			a(20) = 1 since 20 = 2^2 + 3*(3*3+1)/2 + 1*(2*1-1).
a(112) = 1 since 112 = 7^2 + 6*(3*6+1)/2 + 2*(2*2-1).
a(125) = 1 since 125 = 5^2 + 8*(3*8+1)/2 + 0*(2*0-1).
		

Crossrefs

Programs

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

A165141 The least positive integer that can be written in exactly n ways as the sum of a square, a pentagonal number and a hexagonal number.

Original entry on oeis.org

3, 9, 1, 6, 16, 36, 50, 37, 66, 82, 167, 121, 162, 236, 226, 276, 302, 446, 478, 532, 457, 586, 677, 521, 666, 852, 976, 877, 1006, 1046, 1277, 1381, 1857, 1556, 1507, 1657, 1832, 1732, 2336, 2299, 2007, 2677, 2326, 2117, 2591, 2502, 2516, 2592, 3106, 3557
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 05 2009

Keywords

Comments

On Sep 04 2009, Zhi-Wei Sun conjectured that the sequence A160324 contains every positive integer, i.e., for each positive integer n there exists a positive integer s which can be written in exactly n ways as the sum of a square, a pentagonal number and a hexagonal number. Based on this conjecture we create the current sequence. It seems that 0.9 < a(n)/n^2 < 1.6 for n > 33. Zhi-Wei Sun conjectured that a(n)/n^2 has a limit c with 1.1 < c < 1.2. On Sun's request, his friend Qing-Hu Hou produced a list of a(n) for n = 1..913 (see the b-file).

Examples

			For n=5 the a(5)=16 solutions are 0^2+1+15 = 1^2+0+15 = 2^2+12+0 = 3^2+1+6 = 4^2+0+0 = 16.
		

Crossrefs

Programs

Formula

a(n) = min{m>0: m=x^2+(3y^2-y)/2+(2z^2-z) has exactly n solutions with x,y,z=0,1,2,...}.

A374406 Number of ways to write n as an ordered sum of a triangular number, a square and a hexagonal number.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Jul 08 2024

Keywords

Crossrefs

Formula

G.f.: (Sum_{k>=0} x^(k*(k+1)/2)) * (Sum_{k>=0} x^(k^2)) * (Sum_{k>=0} x^(k*(2*k-1))).
Showing 1-10 of 11 results. Next