|
|
A216267
|
|
Numbers that are both tetrahedral and pronic.
|
|
0
|
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
MATHEMATICA
|
t = {}; Do[tet = n (n + 1) (n + 2)/6; s = Floor[Sqrt[tet]]; If[s^2 + s == tet, AppendTo[t, tet]], {n, 0, 1000}]; t (* T. D. Noe, Mar 18 2013 *)
With[{nn=50000}, Intersection[Binomial[Range[0, nn]+2, 3], Table[n(n+1), {n, nn}]]] (* Harvey P. Dale, Apr 04 2016 *)
|
|
PROG
|
(Python)
def rootPronic(a):
sr = 1L<<33
while a < sr*(sr+1):
sr>>=1
b = sr>>1
while b:
s = sr+b
if a >= s*(s+1):
sr = s
b>>=1
return sr
for i in range(1<<20):
a = i*(i+1)*(i+2)/6
t = rootPronic(a)
if a == t*(t+1):
print a,
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|