OFFSET
1,1
COMMENTS
The Dyck natural numbers form a subset of the Dyck language in which each word uniquely represents a nonnegative integer. The representation arises from a recursive generalization of prime factorization defined by the standard RPF natural spelling function gamma_{N_r} (here shortened to simply "gamma" for readability), according to Definition 2.11 in arXiv:2102.02777: gamma(0) = epsilon, where epsilon denotes the empty string (length = 0) and gamma(1) = "()".
For n > 1, write n as a product of powers of consecutive primes from 2 up to and including the greatest prime factor gpf(n).
Each exponential term prime(k)^m is enclosed in parentheses, and if m > 0 it is replaced recursively by gamma(m).
After all replacements, discard all non-parenthesis symbols; the remaining parentheses form gamma(n).
In this sequence, the Dyck natural numbers are encoded in base-2 by substituting 1 for "(" and 0 for ")".
Since gamma(0) = epsilon (the empty string), there are no symbols to be mapped to binary digits to yield a(0); thus the first term of this sequence corresponds to gamma(1) rather than gamma(0), and the sequence accordingly has an offset of 1.
Replacing 1 -> U and 0 -> D, this sequence corresponds to the set of nontrivial Dyck paths d that avoid DUDD and do not end with DUD. See Theorem 2.7 in arXiv:2102.02777.
LINKS
Ralph L. Childress, Table of n, a(n) for n = 1..3570
Ralph L. Childress, Recursive Prime Factorizations: Dyck Words as Representations of Numbers, arXiv:2102.02777 [cs.FL], 2021. See especially sections 2.1 and 2.3, as well as Table 1.
EXAMPLE
a(1) = 10 because the Dyck natural number evaluating to 1 is ().
a(2) = 1100 because the Dyck natural number evaluating to 2 is (()).
a(3) = 101100 because the Dyck natural number evaluating to 3 is ()(()).
a(4) = 111000 because the Dyck natural number evaluating to 4 is ((())).
PROG
(Python)
from sympy import factorint, primerange
def a(n):
return gamma(n).replace("(", "1").replace(")", "0")
def gamma(n): # Standard RPF natural spelling function (Def. 2.11 in arXiv:2102.02777)
if n == 0:
return("")
elif n == 1:
return("()")
retVal = ""
for i in reversed(list_of_prime_powers(n)):
if i == 0:
retVal = "()" + retVal
elif i == 1:
retVal = "(())" + retVal
else:
retVal = "(" + gamma(i) + ")" + retVal
return retVal
def list_of_prime_powers(n) -> list[int]:
factors = factorint(n)
gpf = max(factors.keys())
primes = list(primerange(2, gpf + 1))
return [factors.get(p, 0) for p in primes]
print([a(n) for n in range(1, 23)])
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ralph L. Childress, Nov 14 2025
STATUS
approved
