OFFSET
1,3
COMMENTS
For n>2, a(n+1) - a(n) = either 2 or 3 or 5 (conjecture; checked up to a(n) = 2^32).
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 1..10000
MATHEMATICA
triQ[n_] := IntegerQ@ Sqrt[8n + 1]; fQ[n_] := Union[ triQ@# & /@ Range[n^2 + 1, n^2 + n - 1]] == {False}; Join[{0, 1}, Select[ Range@ 200, fQ]] (* Robert G. Wilson v, Jan 22 2016 *)
PROG
(Python)
t = prev = 0
for n in range(1000000):
sq = n*n
ob = sq + n
s = 0
while 1:
tn = t*(t+1)/2
if tn > sq:
if tn < ob:
s = 1
break
t+=1
t-=1
if s==0:
print str(n)+', ',
#d = n-prev
#if d!=2 and d!=3 and d!=5: print n, d
#prev = n
(PARI) isokt(n) = for (k=n^2+1, n^2+n-1, if (ispolygonal(k, 3), return (0))); return(1); \\ Michel Marcus, Aug 16 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Aug 16 2014
STATUS
approved