%I #33 Dec 25 2021 19:12:19
%S 0,1,1,1,1,3,1,2,3,1,1,1,3,1,1,3,3,1,3,3,3,3,5,1,1,1,5,1,1,3,1,3,1,7,
%T 1,3,3,1,1,3,7,1,1,3,3,1,3,3,1,1,3,3,1,3,7,1,3,7,1,7,3,3,1,1,3,3,1,1,
%U 3,3,7,5,3,3,1,5,3,3,7,3,1,1,3,3,3,7,1,3,1,3,1
%N a(n) is the number of indices i in the range 0 <= i <= n-1 such that A003215(n) - A003215(i) is an oblong number (A002378), where A003215 are the hex numbers.
%C There are very few even terms in the data (3 up to 10000). They are obtained for indices coming from A001921. For odd terms see A350120.
%C a(n) = 1 for n in A111251.
%H Michel Marcus, <a href="/A350090/b350090.txt">Table of n, a(n) for n = 0..10000</a>
%F a(n) = A000005(A003215(n)) - 1. - _Jinyuan Wang_, Dec 19 2021
%e For n=5, the 5 numbers hex(5)-hex(i), for i=0 to 4, are (90, 84, 72, 54, 30) out of which 90, 72 and 30 are oblong, so a(5) = 3.
%t obQ[n_] := IntegerQ @ Sqrt[4*n + 1]; hex[n_] := 3*n*(n + 1) + 1; a[n_] := Module[{h = hex[n]}, Count[Range[0, n - 1], _?(obQ[h - hex[#]] &)]]; Array[a, 100, 0] (* _Amiram Eldar_, Dec 14 2021 *)
%o (PARI) hex(n) = 3*n*(n+1)+1; \\ A003215
%o isob(n) = my(m=sqrtint(n)); m*(m+1)==n; \\ A002378
%o a(n) = my(h=hex(n)); sum(k=0, n-1, isob(h - hex(k)));
%o (PARI) a(n) = numdiv(3*n*n + 3*n + 1) - 1; \\ _Jinyuan Wang_, Dec 19 2021
%Y Cf. A002378, A003215.
%Y Cf. also A001921, A111251, A350120.
%K nonn
%O 0,6
%A _Klaus Purath_ and _Michel Marcus_, Dec 14 2021
%E Edited by _N. J. A. Sloane_, Dec 25 2021