OFFSET
0,6
COMMENTS
LINKS
Michel Marcus, Table of n, a(n) for n = 0..10000
FORMULA
EXAMPLE
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.
MATHEMATICA
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 *)
PROG
(PARI) hex(n) = 3*n*(n+1)+1; \\ A003215
isob(n) = my(m=sqrtint(n)); m*(m+1)==n; \\ A002378
a(n) = my(h=hex(n)); sum(k=0, n-1, isob(h - hex(k)));
(PARI) a(n) = numdiv(3*n*n + 3*n + 1) - 1; \\ Jinyuan Wang, Dec 19 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Klaus Purath and Michel Marcus, Dec 14 2021
EXTENSIONS
Edited by N. J. A. Sloane, Dec 25 2021
STATUS
approved