login
A362448
Triangle T(n,k) (n >= 0, 0 <= k <= n) read by rows: T(n,k) = 1 if the English names for n and k have a letter in common, otherwise 0.
2
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, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1
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
Cf. A362447.
Sequence in context: A014791 A014332 A014655 * A111024 A015586 A015700
KEYWORD
nonn,tabl,word
AUTHOR
N. J. A. Sloane, Apr 23 2023
EXTENSIONS
a(66) and beyond from Michael S. Branicky, Apr 23 2023
STATUS
approved