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.

A331773 a(n) = Sum_{-n

This page as a plain text file.
%I A331773 #22 Oct 19 2023 11:26:43
%S A331773 0,0,2,6,15,28,53,86,137,200,299,418,571,748,997,1282,1639,2040,2545,
%T A331773 3106,3767,4492,5401,6394,7523,8744,10225,11822,13625,15556,17743,
%U A331773 20074,22685,25456,28675,32086,35803,39724,44209,48934,54067,59456,65365
%N A331773 a(n) = Sum_{-n<i<n, -n<j<n, gcd{i,j}=2} (n-|i|)*(n-|j|)/8.
%H A331773 Paolo Xausa, <a href="/A331773/b331773.txt">Table of n, a(n) for n = 1..1000</a>
%H A331773 M. A. Alekseyev, M. Basova, and N. Yu. Zolotykh. <a href="https://doi.org/10.1137/140978090">On the minimal teaching sets of two-dimensional threshold functions</a>. SIAM Journal on Discrete Mathematics 29:1 (2015), 157-165. doi:10.1137/140978090. See p. 158.
%p A331773 VR := proc(m,n,q) local a,i,j; a:=0;
%p A331773 for i from -m+1 to m-1 do for j from -n+1 to n-1 do
%p A331773 if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;
%p A331773 [seq(VR(n,n,2)/8,n=1..50)];
%t A331773 A331773[n_]:=Sum[If[GCD[i,j]==2,If[i==j,(n-i)^2/2,(n-i)(n-j)],0],{i,2,n-1,2},{j,2,i,2}]+If[n>2,n(n-2)/2,0];Array[A331773,50] (* _Paolo Xausa_, Oct 18 2023 *)
%Y A331773 Equals A331772/8.
%K A331773 nonn
%O A331773 1,3
%A A331773 _N. J. A. Sloane_, Feb 08 2020