cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A362443 Numbers k with property that the set of letters in the English name for k does not contain two letters that are adjacent in the alphabet.

This page as a plain text file.
%I A362443 #11 Apr 23 2023 07:27:51
%S A362443 0,2,3,4,6,7,9,10,11,19,20,23,29,40,42,50,52,90,99
%N A362443 Numbers k with property that the set of letters in the English name for k does not contain two letters that are adjacent in the alphabet.
%C A362443 In other words, k such that row k of the triangle A073029, when converted to a set, does not contain two consecutive numbers.
%C A362443 Since hundred, thousand, million, all contain two consecutive letters, there are no other terms.
%D A362443 GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See pages 99 and 286.
%e A362443 3 is a term because the set {20, 8, 18, 5} (from t,h,r,e,e) does not contain two consecutive numbers.
%e A362443 But 5 is not a term, since e and f are adjacent in the alphabet.
%o A362443 (Python)
%o A362443 from num2words import num2words as n2w
%o A362443 def ok(n):
%o A362443     w = sorted(c for c in set(n2w(n).replace(" and", "")) if c.isalpha())
%o A362443     return min(ord(w[i+1])-ord(w[i]) for i in range(len(w)-1)) > 1
%o A362443 print([k for k in range(100) if ok(k)]) # _Michael S. Branicky_, Apr 22 2023
%Y A362443 Cf. A073029.
%K A362443 nonn,word,fini,full
%O A362443 1,2
%A A362443 _N. J. A. Sloane_, Apr 22 2023
%E A362443 Terms 0 and 50 inserted by _Michael S. Branicky_, Apr 22 2023