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

A275999 Smallest nonnegative number k such that A240088(k) = n.

Original entry on oeis.org

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, 954, 1017, 1006, 1207, 1396, 1262, 1311, 1496, 1482, 1571, 1717
Offset: 1

Views

Author

Robert G. Wilson v, Aug 17 2016

Keywords

Examples

			a(1) = 0 since A240088(0) = 1, namely 0+0+0;
a(2) = 3 since A240088(3) = 2, namely 1+1+1 or 3+0+0;
a(3) = 1 since A240088(1) = 3, namely 1+0+0 or 0+1+0 or 0+0+1;
with triangular number followed by square number followed by pentagonal number.
		

Crossrefs

Cf. A240088.

Programs

  • Mathematica
    f[n_] := Block[{c = pi = 0, pn, plmt = Floor[(Sqrt[1 + 24 n] + 7)/6], ti, tlmt}, While[pi < plmt, ti = 0; pn = pi (3pi -1)/2; tlmt = Floor[(Sqrt[1 +8(n - pn)] + 1)/2] +1; While[ti < tlmt, If[IntegerQ[Sqrt[n - pn - ti (ti + 1)/2]], c++]; ti++]; pi++]; c]; t = 0*Range@ 1000; k = 0; While[k < 100001, a = f@ k; If[ t[[a]] == 0, t[[a]] = k]; k++]; t

A160324 Number of ways to express n as the sum of a square, a pentagonal number and a hexagonal number.

Original entry on oeis.org

1, 3, 3, 1, 1, 3, 4, 3, 1, 2, 4, 3, 2, 2, 2, 4, 5, 4, 2, 2, 3, 3, 5, 3, 3, 2, 3, 5, 4, 5, 2, 5, 5, 2, 2, 1, 6, 8, 5, 2, 3, 5, 4, 3, 4, 5, 3, 3, 2, 5, 7, 7, 5, 4, 7, 4, 4, 3, 4, 4, 3, 6, 3, 2, 5, 5, 9, 7, 3, 3, 6, 9, 5, 3, 1, 8, 7, 6, 2, 5, 6, 3, 10, 4, 3, 3, 8, 7, 5, 4, 1, 4, 10, 7, 5, 4, 8, 6, 2, 8, 6, 10, 7, 5
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 and hexagonal numbers are more sparse than squares and that there are infinitely many positive integers which cannot be written as the sum of three squares.
On Aug 12 2009, Zhi-Wei Sun made the following general conjecture on diagonal representations by polygonal numbers: For each integer m>2, any natural number n can be written in the form p_{m+1}(x_1)+...+p_{2m}(x_m) with x_1,...,x_m nonnegative integers, where p_k(x)=(k-2)x(x-1)/2+x (x=0,1,2,...) are k-gonal numbers. Sun has verified this with m=3 for n up to 10^6, and with m=4,5,6,7,8,9,10 for n up to 5*10^5. - Zhi-Wei Sun, Aug 15 2009
On Aug 21 2009, Zhi-Wei Sun formulated the following strong version for his conjecture on diagonal representations by polygonal numbers: For any integer m>2, each natural number n can be expressed as p_{m+1}(x_1)+p_{m+2}(x_2)+p_{m+3}(x_3)+r with x_1,x_2,x_3 nonnegative integers and r an integer among 0,...,m-3. For m=3 and m=4,5,6,7,8,9,10, Sun has verified this conjecture for n up to 10^6 and 5*10^5 respectively. Sun also guessed that for each m=3,4,... all sufficiently large integers have the form p_{m+1}(x_1)+p_{m+2}(x_2)+p_{m+3}(x_3) with x_1,x_2,x_3 nonnegative integers. For example, it seems that 387904 is the largest integer not in the form p_{20}(x_1)+p_{21}(x_2)+p_{22}(x_3). - Zhi-Wei Sun, Aug 21 2009
On Sep 04 2009, Zhi-Wei Sun conjectured that the sequence contains every positive integer. For n=1,2,3,... let s(n) denote the least nonnegative integer m such that a(m)=n. Here is the list of s(1),...,s(30): 0, 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. - Zhi-Wei Sun, Sep 04 2009
Let r be the rank (a noninteger r-polygonal number) which is the average of the number of squares, the number of pentagonal numbers and the number of hexagonal numbers less than x for sufficiently large values of x. r ~= 4.826378432581159594... a(n) ~= sqrt(n/r). - Robert G. Wilson v, Sep 03 2025

Examples

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

Crossrefs

Programs

Formula

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

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}]

A327792 a(n) is the greatest nonnegative number which has a partition into a triangular number (A000217), a square number (A000290), and a pentagonal number (A000326) in n different ways.

Original entry on oeis.org

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, 18053, 19803, 16608, 27283
Offset: 1

Views

Author

Robert G. Wilson v, Sep 25 2019

Keywords

Comments

The largest nonnegative number k such that A240088(k) = n.

Examples

			a(0) does not exist since all numbers can be represented as the sum of a triangular, square & pentagonal number.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{j, k = 1, lenq, lenr, v = {}, t = PolygonalNumber[3, Range[0, 1 + Sqrt[2 n]]], s = PolygonalNumber[4, Range[0, 1 + Sqrt[n]]], p = PolygonalNumber[5, Range[0, 2 + Sqrt[2 n/3]]]}, u = Select[Union[Join[t, s, p]], # < n + 1 &]; q = IntegerPartitions[n, {3}, u]; lenq = 1 + Length@q; While[k < lenq, j = 1; r = q[[k]]; rr = Permutations@r; lenr = 1 + Length@rr; While[j < lenr, If[ MemberQ[t, rr[[j, 1]]] && MemberQ[s, rr[[j, 2]]] && MemberQ[p, rr[[j, 3]]], AppendTo[v, rr[[j]]]]; j++]; k++]; Length@v];

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

Original entry on oeis.org

1, 3, 3, 2, 2, 2, 4, 5, 3, 2, 2, 4, 5, 3, 2, 4, 7, 4, 3, 3, 2, 7, 6, 5, 2, 2, 5, 4, 8, 6, 5, 3, 3, 6, 6, 4, 5, 7, 6, 5, 3, 6, 5, 8, 4, 3, 7, 5, 5, 4, 8, 11, 6, 4, 3, 5, 12, 7, 6, 1, 8, 7, 3, 6, 4, 6, 7, 12, 6, 5, 4, 9, 11, 11, 4, 1, 5, 8, 11, 7, 6, 9, 8, 4, 6, 7, 10, 3, 8, 4, 4, 10, 8, 9, 9, 11, 7, 7, 8, 10, 4
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*(3*k-1)/2)) * (Sum_{k>=0} x^(k*(2*k-1))).

A327793 The number of nonnegative numbers that can be partitioned into a triangular number (A000217), a square number (A000290), and a pentagonal number (A000326) in n different ways.

Original entry on oeis.org

1, 2, 10, 12, 13, 10, 23, 25, 16, 36, 31, 34, 27, 45, 36, 50, 68, 61, 53, 68, 57, 72, 60, 59, 61, 87, 85, 88, 82, 97, 91, 106, 95, 98, 127, 93, 111, 125, 127, 124, 109, 127, 152, 122, 114, 146, 147, 132, 157, 169, 118, 180, 156, 158, 163, 168, 180, 178, 190, 184, 187, 196, 207, 191, 210, 204, 207, 206, 190, 227, 231, 203, 195, 219, 264
Offset: 1

Views

Author

Robert G. Wilson v, Sep 25 2019

Keywords

Comments

The number of nonnegative numbers k such that A240088(k) = n.

Examples

			a(0) does not exist since all numbers can be represented as the sum of a triangular, square and pentagonal number;
a(1) = 1 because A240088({0}) = 1;
a(2) = 2 because A240088({3, 18}) = 2;
a(3) = 10 because A240088({1, 2, 4, 8, 9, 13, 14, 35, 98, 168}) = 3;
a(4) = 12 because A240088({5, 6, 7, 21, 25, 30, 34, 39, 43, 48, 63, 78}) = 4;
a(5) = 13 because A240088({10, 11, 12, 17, 20, 23, 28, 33, 69, 193, 203, 230, 243}) = 5;
a(6) = 10 because A240088({19, 24, 32, 44, 53, 55, 74, 90, 111, 130}) = 6;
a(7) = 23 because A240088({15, 16, 27, 29, 40, 46, 56, 60, 62, 68, 73, 84, 85, 95, 108, 113, 123, 135, 139, 163, 165, 273, 553}) = 7; etc.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{j, k = 1, lenq, lenr, v = {}, t = PolygonalNumber[3, Range[0, 1 + Sqrt[2 n]]], s = PolygonalNumber[4, Range[0, 1 + Sqrt[n]]], p = PolygonalNumber[5, Range[0, 2 + Sqrt[2 n/3]]]}, u = Select[Union[Join[t, s, p]], # < n + 1 &]; q = IntegerPartitions[n, {3}, u]; lenq = 1 + Length@q; While[k < lenq, j = 1; r = q[[k]]; rr = Permutations@r; lenr = 1 + Length@rr; While[j < lenr, If[ MemberQ[t, rr[[j, 1]]] && MemberQ[s, rr[[j, 2]]] && MemberQ[p, rr[[j, 3]]], AppendTo[v, rr[[j]]]]; j++]; k++]; Length@v];

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