OFFSET
0
COMMENTS
Inspired by a problem in the GCHQ Puzzle Book.
REFERENCES
GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See Problem 22, page 129.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..11324 (150 rows)
EXAMPLE
The triangle begins:
1,
1,1,
1,1,1,
1,1,1,1,
1,1,1,1,1,
1,1,0,1,1,1,
0,0,0,0,0,1,1,
1,1,0,1,0,1,1,1,
1,1,1,1,0,1,1,1,1,
1,1,0,1,0,1,1,1,1,1,
1,1,1,1,0,1,0,1,1,1,1,
...
MATHEMATICA
iName[n_]:=iName[n]=StringDelete[IntegerName[n, "Words"], Except[LetterCharacter]];
A362448row[n_]:=Table[Boole[StringContainsQ[iName[n], Characters[iName[k]]]], {k, 0, n}];
Array[A362448row, 15, 0] (* Paolo Xausa, Oct 17 2023 *)
PROG
(Python)
from num2words import num2words as n2w
def w(n): return [c for c in n2w(n).replace(" and", "") if c.isalpha()]
def T(n, k): return int(set(w(n)) & set(w(k)) != set())
print([T(n, k) for n in range(13) for k in range(n+1)]) # Michael S. Branicky, Apr 23 2023
CROSSREFS
KEYWORD
AUTHOR
N. J. A. Sloane, Apr 23 2023
EXTENSIONS
a(66) and beyond from Michael S. Branicky, Apr 23 2023
STATUS
approved