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!)
A001151 Describe the previous term! (method A - initial term is 8). 17
8, 18, 1118, 3118, 132118, 1113122118, 311311222118, 13211321322118, 1113122113121113222118, 31131122211311123113322118, 132113213221133112132123222118 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Method A = 'frequency' followed by 'digit'-indication.
a(n+1) - a(n) is divisible by 10^5 for n > 5. - Altug Alkan, Dec 04 2015
REFERENCES
S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 452-455.
I. Vardi, Computational Recreations in Mathematica. Addison-Wesley, Redwood City, CA, 1991, p. 4.
LINKS
J. H. Conway, The weird and wonderful chemistry of audioactive decay, in T. M. Cover and Gopinath, eds., Open Problems in Communication and Computation, Springer, NY 1987, pp. 173-188.
S. R. Finch, Conway's Constant [Broken link]
S. R. Finch, Conway's Constant [From the Wayback Machine]
EXAMPLE
E.g. the term after 3118 is obtained by saying "one 3, two 1's, one 8", which gives 132118.
MAPLE
freq := proc(i, L)
local f, p ;
if i > nops(L) or i < 1 then
return 0 ;
end if;
f := 1 ;
for p from i to 2 by -1 do
if op(p, L) = op(p-1, L) then
f := f+1 ;
else
return f;
end if;
end do:
f ;
end proc:
read("transforms"):
rle := proc(n)
local inL, i, outL, f ;
inL := convert(n, base, 10) ;
i := nops(inL) ;
outL := [] ;
while i>0 do
f := freq(i, inL) ;
if f = 0 then
break;
else
outL := [op(outL), f, op(i, inL)] ;
i := i-f ;
end if;
end do:
digcatL(outL) ;
end proc:
A001151 := proc(n)
option remember ;
if n = 1 then
8;
else
rle(procname(n-1)) ;
end if;
end proc:
seq(A001151(n), n=1..10) ; # R. J. Mathar, Feb 11 2021
MATHEMATICA
RunLengthEncode[x_List] := (Through[{First, Length}[ #1]] &) /@ Split[x]; LookAndSay[n_, d_: 1] := NestList[Flatten[Reverse /@ RunLengthEncode[ # ]] &, {d}, n - 1]; F[n_] := LookAndSay[n, 8][[n]]; Table[FromDigits[F[n]], {n, 1, 11}] (* Zerinvary Lajos, Jul 08 2009 *)
CROSSREFS
Sequence in context: A171371 A092692 A338474 * A177367 A138492 A022512
KEYWORD
nonn,base,easy,nice
AUTHOR
STATUS
approved

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 19 05:02 EDT 2024. Contains 371782 sequences. (Running on oeis4.)