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.
%I A101428 #24 Aug 30 2025 15:56:42 %S A101428 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, %T A101428 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, %U A101428 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 %N A101428 Number of ways to write n as an ordered sum of a triangular number (A000217) and a square (A000290). %C A101428 0 is both a triangular number and a square number. %C A101428 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 %C A101428 Variant of A082660 (which allows only positive triangular numbers). - _R. J. Mathar_, Apr 28 2020 %C A101428 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 %H A101428 G. C. Greubel, <a href="/A101428/b101428.txt">Table of n, a(n) for n = 0..1000</a> %F A101428 G.f.: sum(i>=0, x^(i^2) ) * sum(i>=0, x^(i*(i+1)/2) ). - _Ralf Stephan_, May 17 2014 %e A101428 Examples: n=1 gives the a(1)=2 cases 1=1+0=0+1; a(26)=2 because 26=25+1=16+10. %p A101428 A000217 := proc(n) n*(n+1)/2 ; end: %p A101428 A101428 := proc(n) %p A101428 local a,y,t ; %p A101428 a := 0 ; %p A101428 for y from 0 do %p A101428 t := A000217(y) ; %p A101428 if n-t < 0 then %p A101428 RETURN(a) ; %p A101428 else %p A101428 if issqr(n-t) then %p A101428 a := a+1 ; %p A101428 fi; %p A101428 fi; %p A101428 od: %p A101428 end: %p A101428 for n from 0 to 100 do printf("%a,",A101428(n)) ; od: %t A101428 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 *) %t A101428 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 *) %Y A101428 Cf. A000925, A115171, A115172, A115173, A115174, A115175, A115176, A115177, A144642. %K A101428 nonn,changed %O A101428 0,2 %A A101428 _R. J. Mathar_, Jan 03 2009