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.

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

A330861 Number of ways to represent n as a sum of 2 triangular numbers and a perfect square.

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Apr 28 2020

Keywords

Comments

The range of the two triangular numbers and the square is the nonnegative numbers.

Examples

			a(0)=1 because there is one representation 0 = T(0)+T(0)+0^2.
a(1)=2 because there are 2 representations 1 = T(0)+T(0)+1^2 = T(0)+T(1)+0^2.
a(4)=3 because there are 3 representations 4 = T(0)+T(0)+2^2 = T(0)+T(2)+1^2 = T(1)+T(2)+0^2.
		

Crossrefs

Cf. A115288 (greedy inverse).

Programs

  • Maple
    A330861 := proc(n)
        local a,t1idx,t2idx,t1,t2;
        a := 0 ;
        for t1idx from 0 do
            t1 := A000217(t1idx) ;
            if t1 > n then
                break;
            end if;
            for t2idx from t1idx do
                t2 := A000217(t2idx) ;
                if t1+t2 > n then
                    break;
                end if;
                if issqr(n-t1-t2) then
                    a := a+1 ;
                end if;
            end do:
        end do:
        a ;
    end proc:

A115289 a(n) is the smallest number representable in exactly n ways as a sum of one triangular number and 2 squares (each of them >= 0).

Original entry on oeis.org

0, 1, 5, 10, 19, 26, 55, 46, 53, 116, 86, 128, 173, 145, 200, 170, 221, 235, 236, 305, 341, 326, 491, 425, 548, 431, 676, 530, 536, 635, 656, 851, 905, 695, 1118, 950, 1040, 1171, 1241, 1031, 1076, 1115, 1325, 1661, 1943, 1391, 1531, 1691, 1790, 1670, 2291, 2081
Offset: 1

Views

Author

Giovanni Resta, Jan 19 2006

Keywords

Examples

			a(4)=10 since 10 can be expressed in 4 ways,
10=T(4)+0^2+0^2 = T(3)+0^2+2^2 = T(1)+0^2+3^2 = T(0)+1^2+3^2 and none of the numbers from 0 to 9 can be expressed in 4 ways.
		

Crossrefs

Programs

  • Mathematica
    V = Table[0, {i, 5000}]; T[n]:=n(n+1)/2; Do[a = T[i]+j^2+k^2; If[a<5000, V[[a+1]]++ ], {i, 0, 100}, {j, 0, 71}, {k, 0, j}]; Table[Position[V, z][[1, 1]]-1, {z, 60}]
Showing 1-5 of 5 results.