OFFSET
1,1
COMMENTS
Integers that appear uniquely in the Catalan triangle, A009766.
LINKS
D. F. Bailey, Counting arrangements of 1's and-1's, Mathematics Magazine, 69 (1996): 128-131.
Nathaniel Benjamin, Grant Fickes, Eugene Fiorini, Edgar Jaramillo Rodriguez, Eric Jovinelly, Tony W. H. Wong, Primes and Perfect Powers in the Catalan Triangle, J. Int. Seq., Vol. 22 (2019), Article 19.7.6.
Eric W. Weisstein, Catalan's Triangle
MATHEMATICA
Block[{T, nn = 85}, T[n_, k_] := T[n, k] = Which[k == 0, 1, k > n, 0, True, T[n - 1, k] + T[n, k - 1]]; Rest@ Complement[Range@ nn, Union@ Flatten@ Table[T[n, k], {n, 2, nn}, {k, 2, n}]]] (* Michael De Vlieger, Feb 04 2020, after Jean-François Alcover at A009766 *)
PROG
(Python)
#prints the unique integers less than k
def Unique_Catalan_Triangle(k):
t = []
t.append([])
t[0].append(1)
for h in range(1, k):
t.append([])
t[0].append(1)
for i in range(1, k):
for j in range(0, k):
if i>j:
t[i].append(0)
else:
t[i].append(t[i-1][j] + t[i][j-1])
l = []
for r in range(0, k):
for s in range(0, k):
l.append(t[r][s])
unique = []
for n in l:
if n <= k and l.count(n) == 1 :
unique.append(n)
print sorted(unique)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
STATUS
approved