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.

A281864 Number of sets of exactly four positive integers <= n having a square element sum.

This page as a plain text file.
%I A281864 #18 Mar 06 2019 17:42:57
%S A281864 0,0,2,5,8,14,23,34,49,69,93,123,160,204,255,315,383,462,554,658,775,
%T A281864 904,1046,1205,1384,1581,1797,2031,2282,2556,2857,3183,3535,3913,4316,
%U A281864 4748,5211,5706,6235,6798,7393,8025,8696,9406,10159,10956,11793,12673,13599
%N A281864 Number of sets of exactly four positive integers <= n having a square element sum.
%H A281864 Alois P. Heinz, <a href="/A281864/b281864.txt">Table of n, a(n) for n = 4..4000</a>
%e A281864 a(6) = 2: {1,4,5,6}, {2,3,5,6}.
%e A281864 a(7) = 5: {1,2,6,7}, {1,3,5,7}, {1,4,5,6}, {2,3,4,7}, {2,3,5,6}.
%e A281864 a(8) = 8: {1,2,5,8}, {1,2,6,7}, {1,3,4,8}, {1,3,5,7}, {1,4,5,6}, {2,3,4,7}, {2,3,5,6}, {4,6,7,8}.
%p A281864 b:= proc(n, i, t) option remember;
%p A281864       `if`(i<t, 0, `if`(n=0, `if`(t=0, 1, 0),
%p A281864       `if`(t<1 or n<t*(t+1)/2 or n>(t+1)*(2*i-t)/2, 0,
%p A281864       `if`(i>n, 0, b(n-i, i-1, t-1))+b(n, i-1, t))))
%p A281864     end:
%p A281864 a:= proc(n) option remember; `if`(n<0, 0, a(n-1)+add(
%p A281864        b(j^2-n, n-1, 3), j=isqrt(n-6)..isqrt(4*n-6)))
%p A281864     end:
%p A281864 seq(a(n), n=4..60);
%t A281864 Table[Count[Subsets[Range[n],{4}],_?(IntegerQ[Sqrt[Total[#]]]&)],{n,4,60}] (* _Harvey P. Dale_, Mar 06 2019 *)
%Y A281864 Column k=4 of A281871.
%K A281864 nonn
%O A281864 4,3
%A A281864 _Alois P. Heinz_, Feb 01 2017