OFFSET
1,1
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Bernd C. Kellner and Jonathan Sondow, On Carmichael and polygonal numbers, Bernoulli polynomials, and sums of base-p digits, Integers 21 (2021), #A52, 21 pp.; arXiv preprint, arXiv:1902.10672 [math.NT], 2019-2021.
Bernd C. Kellner, On primary Carmichael numbers, Integers 22 (2022), #A38, 39 pp.; arXiv preprint, arXiv:1902.11283 [math.NT], 2019-2022.
Wikipedia, Polygonal number.
FORMULA
Squarefree P(s,n) = (n^2*(s-2)-n*(s-4))/2 with s >= 3 and n >= 3.
EXAMPLE
P(3,3) = 6 which is squarefree, so a(1) = 6.
MATHEMATICA
mx = 250; n = s = 3; lst = {};
While[s < Floor[mx/3] + 2, a = (n^2 (s - 2) - n (s - 4))/2;
If[a < mx + 1, AppendTo[lst, a], (s++; n = 2)]; n++]; lst = Union@lst;
Select[lst, SquareFreeQ]
PROG
(PARI) isok(n) = if (!issquarefree(n), return (0)); for(s=3, n\3+1, ispolygonal(n, s) && return(s)); \\ Michel Marcus, Mar 24 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernd C. Kellner and Jonathan Sondow, Mar 21 2019
STATUS
approved