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.

A354521 a(n) is the position of the first letter in the US English name of n that can also be found in the English name of n+1.

This page as a plain text file.
%I A354521 #47 Oct 01 2022 19:44:40
%S A354521 2,1,1,3,1,2,1,2,1,1,2,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
%T A354521 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,
%U A354521 1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
%N A354521 a(n) is the position of the first letter in the US English name of n that can also be found in the English name of n+1.
%C A354521 Spaces and punctuation are ignored when determining the position of the letter.
%C A354521 a(n) is well-defined as n and n+1 always share a letter (see formulas). - _Michael S. Branicky_, Aug 20 2022
%F A354521 For n > 1000, a(n) = 1 unless n = b + 1000^e - 1 (for e >= 1, 1 <= b <= 999) in which case a(n) = a(b). Subsequently, 1 <= a(n) <= 3. - _Michael S. Branicky_, Aug 20 2022
%e A354521 For n = 4, a(4) = 1 since the 1st letter of 'four' can also be found in 'five'.
%e A354521 For n = 59, a(59) = 2 since the 2nd letter of 'fifty-nine' can be found in 'sixty'.
%o A354521 (Python)
%o A354521 from num2words import num2words as n2w
%o A354521 def a(i):
%o A354521     w1 = n2w(i).replace(' ','').replace('-','')
%o A354521     w2 = n2w(i+1).replace(' ','').replace('-','')
%o A354521     for j in range(len(w1)):
%o A354521         if w1[j] in w2:
%o A354521             return j+1
%K A354521 nonn,easy,word
%O A354521 0,1
%A A354521 _Ray G. Opao_, Aug 16 2022