R«Ṛ$‘r⁸ṬUÐeYR«Ṛ$‘r⁸ṬUÐe0YE? A full program accepting an integer which prints the output as defined in the OP using 0 and 1 for * and # respectively.
R«Ṛ$‘r⁸ṬUÐeYR«Ṛ$‘r⁸ṬUÐe0YE? - Main Link: integer, n R - range -> [1,2,3,4,...,n] $ - last two links as a monad: Ṛ - reverse -> [n,...,4,3,2,1] « - minimum (vectorises) -> [1,2,3,4,...,4,3,2,1] ‘ - increment (vectorises) -> [2,3,4,5,...,5,4,3,2] ⁸ - chain's left argument, n r - inclusive range (vectorises) -> [[2,3,...,n],[3,4,...n],[4,5,...n],[5,...n],...,[5,...n],[4,5,...n],[3,4,...n],[2,3,...,n]] Ṭ - untruth (vectorises) -> [[0,1,1,...,1],[0,0,1,1,...,1],[0,0,0,1,...,1],[0,0,0,0,1,...,1],...,[0,0,0,0,1,...,1],[0,0,0,1,...,1],[0,0,1,1,...,1],[0,1,1,...,1]] Ðe - apply to entries with even indices: U - upend -> [[0,1,1,...,1],[1,1,...,1],[0,0,0,1,...,1],[1,...,1,0,0,0,0],...] ? - if... E - ...condition: all equal? (only true when n=1, where we have [1,1]) 0 - ...then: zero Y - ...else: join with newline characters - implicit print