login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A270004 Run-length encoding of iterated Scrabble function. 1

%I #53 Dec 01 2021 05:17:38

%S 12,1,4,2,1,1,1,2,1,3,2,1,1,2,1,3,4,1,1,1,3,1,2,3,3,3,1,1,1,5,6,3,1,2,

%T 4,3,1,2,1,1,1,1,3,2,2,1,1,5,2,1,1,3,2,7,1,4,1,4,1,4,1,1,1,1,1,3,1,2,

%U 1,4,2,1,1,4,1,1,8,2,2,3,3,2,2,3,1,3,3,2,1,1,2,2,2,3,1,2,3,7,1,1,5,3,1,1,6

%N Run-length encoding of iterated Scrabble function.

%C Number of identical consecutive integers in A290205.

%H Michael Turniansky, <a href="/A270004/b270004.txt">Table of n, a(n) for n = 0..455</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Scrabble">Scrabble</a>

%o (Python)

%o from num2words import num2words

%o tp = {"aeilnorstu": 1, "dg": 2, "bcmp":3, "fhvwy":4, "k":5, "jx":8, "qz":10}

%o def pts(c): return ([tp[s] for s in tp if c in s]+[0])[0]

%o def A113172(n): return sum(map(pts, num2words(n).replace(" and", "")))

%o def A290205(n):

%o while n not in {12, 4, 7, 8, 9}: n = A113172(n)

%o return 12 if n == 12 else 4

%o def aupton(terms):

%o alst, prev, k, rl = [], A290205(0), 1, 1

%o while len(alst) < terms:

%o while A290205(k) == prev: k += 1; rl += 1

%o alst.append(rl); rl = 0; prev = 12 if prev == 4 else 4

%o return alst

%o print(aupton(105)) # _Michael S. Branicky_, Dec 01 2021

%Y Cf. A113172, A290205.

%K nonn,word

%O 0,1

%A _Michael Turniansky_, Jul 24 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:34 EDT 2024. Contains 371971 sequences. (Running on oeis4.)