login
A306385
a(n) is the maximum number of distinct distances possible between points in a hyperrectangular grid the sum of whose dimensions is n.
0
1, 2, 3, 4, 5, 7, 9, 12, 15, 18, 23, 28, 33, 40, 47, 56, 65, 74, 85, 98, 111, 127, 145, 163, 181, 199, 217, 238, 261, 284, 309, 338, 368, 398, 428, 458, 488, 518, 555, 592, 631, 673, 715, 757, 804, 852, 900, 948, 997, 1052, 1107, 1163, 1222, 1281, 1340, 1407, 1474, 1541, 1608, 1675
OFFSET
1,2
PROG
(PARI)
b(v)={prod(k=1, #v, sum(i=0, v[k]-1, x^(i^2)))}
c(v)={sum(i=1, #v, v[i]<>0)}
a(n)={my(m=1); if(n>1, forpart(p=n, m=max(m, c(Vec(b(p)))), [2, n])); m} \\ Andrew Howroyd, Aug 11 2024
CROSSREFS
Sequence in context: A030741 A190269 A304632 * A039853 A062188 A122129
KEYWORD
nonn
AUTHOR
Lorraine Lee, Feb 20 2019
EXTENSIONS
a(44)-a(45) from Lorraine Lee, Aug 11 2024
a(46) onwards from Andrew Howroyd, Aug 11 2024
STATUS
approved