login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A001140
Describe the previous term! (method A - initial term is 4).
15
4, 14, 1114, 3114, 132114, 1113122114, 311311222114, 13211321322114, 1113122113121113222114, 31131122211311123113322114, 132113213221133112132123222114, 11131221131211132221232112111312111213322114, 31131122211311123113321112131221123113111231121123222114
OFFSET
1,1
COMMENTS
Method A = 'frequency' followed by 'digit'-indication.
A001155, A001140, A001141, A001143, A001145, A001151 and A001154 are all identical apart from the last digit of each term (the seed). This is because digits other than 1, 2 and 3 never arise elsewhere in the terms (other than at the end of each of them) of look-and-say sequences of this type (as is mentioned by Carmine Suriano in A006751). - Chayim Lowen, Jul 16 2015
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
The term after 3114 is obtained by saying "one 3, two 1's, one 4", which gives 132114.
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, 4 ][ [ n ] ];
Table[ FromDigits[ F[ n ] ], {n, 1, 11} ] (* Zerinvary Lajos, Mar 21 2007 *)
PROG
(Haskell) cf. Josh Triplett's program for A005051.
import Data.List (group)
a001140 n = a001140_list !! (n-1)
a001140_list = 4 : map say a001140_list where
say = read . concatMap saygroup . group . show
where saygroup s = (show $ length s) ++ [head s]
-- Reinhard Zumkeller, Dec 15 2012
(Perl)
# This outputs the first n elements of the sequence, where n is given on the command line.
$s = 4;
for (2..shift @ARGV) {
print "$s, ";
$s =~ s/(.)\1*/(length $&).$1/eg;
}
print "$s\n";
## Arne 'Timwi' Heizmann (timwi(AT)gmx.net), Mar 12 2008
KEYWORD
nonn,base,easy,nice
STATUS
approved