|
|
A362447
|
|
Array A(n,k) (n>=0, k>=0) read by antidiagonals: A(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, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
EXAMPLE
|
The top left corner of the array is:
1,1,1,1,1,1,0,1,1,1,1,...
1,1,1,1,1,1,0,1,1,1,1,...
1,1,1,1,1,0,0,0,1,0,1,...
1,1,1,1,1,1,0,1,1,1,1,...
1,1,1,1,1,1,0,0,0,0,0,...
1,1,0,1,1,1,1,1,1,1,1,...
0,0,0,0,0,1,1,1,1,1,0,...
1,1,0,1,0,1,1,1,1,1,1,...
1,1,1,1,0,1,1,1,1,1,1,...
1,1,0,1,0,1,1,1,1,1,1,...
1,1,1,1,0,1,0,1,1,1,1,...
...
The initial antidiagonals are:
1,
1,1,
1,1,1,
1,1,1,1,
1,1,1,1,1,
1,1,1,1,1,1,
0,1,1,1,1,1,0,
1,0,0,1,1,0,0,1,
1,1,0,1,1,1,0,1,1,
1,1,0,0,1,1,0,0,1,1,
...
|
|
MATHEMATICA
|
iName[n_]:=iName[n]=StringDelete[IntegerName[n, "Words"], Except[LetterCharacter]];
A362447list[dmax_]:=Table[Boole[StringContainsQ[iName[n-k], Characters[iName[k]]]], {n, 0, dmax-1}, {k, 0, n}];
A362447list[20] (* Generates 20 antidiagonals *) (* 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 A(n, k): return int(set(w(n)) & set(w(k)) != set())
print([A(ad-i, i) for ad in range(13) for i in range(ad+1)]) # Michael S. Branicky, Apr 23 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|