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

A082657 Integers expressible as the sum of a square and a triangular number in just one way.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 11, 12, 14, 16, 17, 21, 24, 25, 29, 30, 32, 35, 36, 39, 42, 44, 49, 50, 51, 53, 54, 56, 57, 65, 66, 71, 72, 74, 75, 77, 78, 80, 81, 84, 95, 96, 101, 104, 105, 107, 110, 116, 117, 119, 120, 122, 126, 128, 129, 131, 137, 141, 149, 150, 152, 153, 156, 161
Offset: 1

Views

Author

Jason Earls, May 17 2003

Keywords

Comments

It is assumed here that 0 is a square but not a triangular number. - Amiram Eldar, Dec 08 2019

Crossrefs

Programs

  • Mathematica
    aQ[n_] := Length @ Solve[x^2 + y (y + 1)/2 == n && x >= 0 && y > 0, {x, y}, Integers] == 1; Select[Range[161], aQ] (* Amiram Eldar, Dec 08 2019 *)

A082658 Integers expressible as the sum of a square and a triangular number in exactly two distinct ways.

Original entry on oeis.org

7, 15, 22, 26, 28, 31, 40, 45, 52, 55, 59, 61, 67, 79, 85, 87, 92, 94, 100, 102, 103, 106, 114, 115, 124, 130, 140, 142, 147, 155, 157, 159, 166, 175, 178, 180, 184, 187, 189, 190, 191, 197, 202, 205, 206, 210, 211, 214, 220, 224, 231, 232, 240, 241, 246, 247
Offset: 1

Views

Author

Jason Earls, May 17 2003

Keywords

Comments

It is assumed here that 0 is a square but not a triangular number. - Amiram Eldar, Dec 08 2019

Examples

			a(4) = 26 because 26 = 1 + 25; 26 = 10 + 16.
		

Crossrefs

Programs

  • Mathematica
    aQ[n_] := Length @ Solve[x^2 + y (y + 1)/2 == n && x >= 0 && y > 0, {x, y}, Integers] == 2; Select[Range[250], aQ] (* Amiram Eldar, Dec 08 2019 *)

Extensions

Name clarified by Amiram Eldar, Dec 08 2019

A082659 Integers expressible as the sum of a square and a triangular number in exactly three distinct ways.

Original entry on oeis.org

10, 19, 46, 64, 82, 109, 121, 127, 154, 169, 217, 253, 257, 262, 271, 316, 352, 361, 379, 397, 400, 451, 460, 478, 487, 496, 505, 514, 529, 586, 620, 640, 649, 667, 694, 721, 757, 767, 856, 865, 910, 937, 961, 964, 991, 1045, 1054, 1072, 1099, 1104, 1135, 1153
Offset: 1

Views

Author

Jason Earls, May 17 2003

Keywords

Comments

It is assumed here that 0 is a square but not a triangular number. - Amiram Eldar, Dec 08 2019

Examples

			a(5) = 82 because 82 = 1 + 81; 82 = 66 + 16; 82 = 78 + 4.
		

Crossrefs

Programs

  • Mathematica
    aQ[n_] := Length @ Solve[x^2 + y (y + 1)/2 == n && x >= 0 && y > 0, {x, y}, Integers] == 3; Select[Range[1200], aQ] (* Amiram Eldar, Dec 08 2019 *)

Extensions

Name clarified by Amiram Eldar, Dec 08 2019

A101428 Number of ways to write n as an ordered sum of a triangular number (A000217) and a square (A000290).

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 1, 2, 0, 1, 3, 1, 1, 0, 1, 2, 2, 1, 0, 3, 0, 1, 2, 0, 1, 2, 2, 0, 2, 1, 1, 2, 1, 0, 0, 1, 2, 4, 0, 1, 2, 0, 1, 0, 1, 2, 3, 0, 0, 2, 1, 1, 2, 1, 1, 2, 1, 1, 0, 2, 0, 2, 0, 0, 4, 1, 1, 2, 0, 0, 4, 1, 1, 0, 1, 1, 0, 1, 1, 2, 1, 2, 3, 0, 1, 2, 0, 2, 0, 0, 0, 4, 2, 0, 2, 1, 1, 0, 0, 0, 3, 1, 2, 2, 1
Offset: 0

Views

Author

R. J. Mathar, Jan 03 2009

Keywords

Comments

0 is both a triangular number and a square number.
First occurrence of k beginning at 0: 8, 2, 1, 10, 37, 136, 235, 1549, 631, 2314, 2116, 11026, 3997, 148240, 19045, 20827, 25876, 893116, 67951, ?19?, 35974, 187444, 1542655, 354061, 131905, ?25?, ?26?, 835399, 323767, ?29?, 611560, ?31?, 515629, ?33?, ?34?, ?35?, 1187146, ?37?, ?38?, ?39?, 1474939, ..., . - Robert G. Wilson v, Mar 30 2014
Variant of A082660 (which allows only positive triangular numbers). - R. J. Mathar, Apr 28 2020
a(n) is the number of representations of 8*n + 1 as 2*A^2 + B^2 with A even and B odd and both nonnegative integers. - Vladimir Pletser, Aug 30 2025

Examples

			Examples: n=1 gives the a(1)=2 cases 1=1+0=0+1; a(26)=2 because 26=25+1=16+10.
		

Crossrefs

Programs

  • Maple
    A000217 := proc(n) n*(n+1)/2 ; end:
    A101428 := proc(n)
    local a,y,t ;
    a := 0 ;
    for y from 0 do
    t := A000217(y) ;
    if n-t < 0 then
    RETURN(a) ;
    else
    if issqr(n-t) then
    a := a+1 ;
    fi;
    fi;
    od:
    end:
    for n from 0 to 100 do printf("%a,",A101428(n)) ; od:
  • Mathematica
    t = FoldList[#1 + #2 &, 0, Range@ 15]; s = Range[0, 10]^2, a = Sort@ Flatten@ Table[ s[[j]] + t[[k]], {j, 15}, {k, 11}]; Table[Count[a, n], {n, 0, 104}] (* or *)
    triQ[n_] := IntegerQ@ Sqrt[8n + 1]; f[n_] := Block[{c = k = 0, lmt = 2 + Floor[Sqrt[n]]}, While[k < lmt, If[ triQ[n - k^2], c++]; k++]; c]; Array[f, 105, 0] (* Robert G. Wilson v, Mar 30 2014 *)

Formula

G.f.: sum(i>=0, x^(i^2) ) * sum(i>=0, x^(i*(i+1)/2) ). - Ralf Stephan, May 17 2014
Showing 1-4 of 4 results.