[go: up one dir, main page]

login
Numbers k such that the last letter of k is the same as the first letter of k+1 when written in English.
1

%I #11 Jun 14 2023 10:33:58

%S 0,18,28,38,79,81,83,85,97,102,122,132,142,152,162,172,182,192,208,

%T 228,238,248,258,268,278,288,298,308,328,338,348,358,368,378,388,398,

%U 799,801,803,805,809,812,821,823,825,829,831,833,835,839,841,843,845,849

%N Numbers k such that the last letter of k is the same as the first letter of k+1 when written in English.

%D GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See Puzzle 31, page 37.

%H Michael S. Branicky, <a href="/A363659/b363659.txt">Table of n, a(n) for n = 1..10000</a>

%o (Python)

%o from num2words import num2words as n2w

%o def ok(n): return n2w(n)[-1] == n2w(n+1)[0]

%o print([k for k in range(850) if ok(k)]) # _Michael S. Branicky_, Jun 14 2023

%K nonn,word

%O 1,2

%A _Sean A. Irvine_, Jun 14 2023