Search: 1114
|
| |
|
|
A045918
|
|
Describe n. Also called the "Say What You See" or "Look and Say" sequence LS(n).
|
|
+20
41
|
|
|
|
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1110, 21, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1210, 1211, 22, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1310, 1311, 1312, 23, 1314, 1315, 1316, 1317, 1318, 1319, 1410, 1411, 1412
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
0,1
|
|
|
COMMENTS
|
a(111111111) = a((10^10 - 1)/9) = 101 is the first term with an odd number of digits; 3-digit terms are unambiguous, but already the 2nd 4-digit term is LS( 12 ) = 1112 = LS( 2*(10^111-1)/9 ) ("hundred eleven 2's"). The smallest n such that LS(n) = LS(k) for some k < n (i.e. the largest n such that the restriction of LS to [0..n-1] is injective) appears to be 10*(10^11 - 1)/9 : LS(eleven '1's, one '0') = 11110 = LS(one '1', eleven '0's). - M. F. Hasler, Nov 14 2006
A121993 gives numbers m such that a(m) < m. - Reinhard Zumkeller, Jan 25 2014
|
|
|
REFERENCES
|
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.
|
|
|
LINKS
|
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Kevin Watkins, Abstract Interpretation Using Laziness: Proving Conway's Lost Cosmological Theorem,
Kevin Watkins, Proving Conway's Lost Cosmological Theorem, POP seminar talk, CMU, Dec 2006
Eric Weisstein's World of Mathematics, Look and Say Sequence
Wikipedia, Look-and-say sequence
|
|
|
EXAMPLE
|
23 has "one 2, one 3", so a(23) = 1213.
|
|
|
MAPLE
|
LS:=n-> if n>9 then LS(op(convert(n, base, 10))) else for i from 2 to nargs do if args[i] <> n then RETURN(( LS( args[i..nargs] )*10^length(i-1) + i-1)*10 + n ) fi od: 10*nargs + n fi; # M. F. Hasler, Nov 14 2006
|
|
|
MATHEMATICA
|
LookAndSayA[n_] := FromDigits@ Flatten@ IntegerDigits@ Flatten[ Through[{Length, First}[#]] & /@ Split@ IntegerDigits@ n] (* Robert G. Wilson v, Jan 27 2012 *)
|
|
|
PROG
|
(PARI) A045918(a)={my(c=1); for(j=2, #a=Vec(Str(a)), if(a[j-1]==a[j], a[j-1]=""; c++, a[j-1]=Str(c, a[j-1]); c=1)); a[#a]=Str(c, a[#a]); eval(concat(a))} \\ M. F. Hasler, Jan 27 2012
(Haskell) see Watkins link, p. 3.
import Data.List (unfoldr, group); import Data.Tuple (swap)
a045918 0 = 10
a045918 n = foldl (\v d -> 10 * v + d) 0 $ say $ reverse $ unfoldr
(\x -> if x == 0 then Nothing else Just $ swap $ divMod x 10) n
where say = concat . map code . group
code xs = [toInteger $ length xs, head xs]
-- Reinhard Zumkeller, Aug 09 2012
(Python)
from re import finditer
def A045918(n):
....return int(''.join([str(len(m.group(0)))+m.group(0)[0] for m in finditer(r'(\d)\1*', str(n))]))
# Chai Wah Wu, Dec 03 2014
|
|
|
CROSSREFS
|
Cf. A005150. See also A056815.
|
|
|
KEYWORD
|
nonn,base
|
|
|
AUTHOR
|
N. J. A. Sloane
|
|
|
EXTENSIONS
|
Added Mma program from A056815. - N. J. A. Sloane, Feb 02 2012
|
|
|
STATUS
|
approved
|
| |
|
|
| |
| |
|
|
|
2, 6, 18, 31, 43, 94, 106, 151, 211, 331, 394, 526, 694, 751, 886, 919, 1114, 1324
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
1,1
|
|
|
LINKS
|
Table of n, a(n) for n=1..18.
|
|
|
MAPLE
|
A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic', 'quotients') ; nops(%[2]) ; else 0 ; fi; end: read("transforms") ; a26 := [seq(A146326(n), n=1..1400)] ; RECORDS(a26)[2] ; [From R. J. Mathar, Sep 06 2009]
|
|
|
MATHEMATICA
|
$MaxExtraPrecision = 300; s = 10; aa = {}; Do[k = ContinuedFraction[(1 + Sqrt[n])/2, 1000]; If[Length[k] < 190, AppendTo[aa, 0], m = 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; s = s + 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; AppendTo[aa, m]], {n, 1, 1024}]; Print[aa]; bb = {}; m = 0; Do[If[aa[[k]] > m, AppendTo[bb, k]; m = aa[[k]]], {k, 1, Length[aa]}]; bb (*Artur Jasinski*)
|
|
|
CROSSREFS
|
A000290, A078370, A146326-A146345, A146348-A146360, A146363.
|
|
|
KEYWORD
|
nonn
|
|
|
AUTHOR
|
Artur Jasinski, Oct 30 2008
|
|
|
EXTENSIONS
|
19 replaced by 18. 394 inserted. 4 more terms added - R. J. Mathar, Sep 06 2009
|
|
|
STATUS
|
approved
|
| |
|
|
| |
|
|
A052221
|
|
Numbers whose sum of digits is 7.
|
|
+20
34
|
|
|
|
7, 16, 25, 34, 43, 52, 61, 70, 106, 115, 124, 133, 142, 151, 160, 205, 214, 223, 232, 241, 250, 304, 313, 322, 331, 340, 403, 412, 421, 430, 502, 511, 520, 601, 610, 700, 1006, 1015, 1024, 1033, 1042, 1051, 1060, 1105, 1114, 1123, 1132, 1141, 1150, 1204
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
1,1
|
|
|
COMMENTS
|
A007953(a(n)) = 7; number of repdigits = #{7,1111111} = A242627(7) = 2. - Reinhard Zumkeller, Jul 17 2014
|
|
|
LINKS
|
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
|
|
|
MATHEMATICA
|
Select[Range[1500], Total[IntegerDigits[#]]==7&] (* Harvey P. Dale, Apr 11 2012 *)
|
|
|
PROG
|
(MAGMA) [n: n in [1..1500] | &+Intseq(n) eq 7 ]; // Vincenzo Librandi, Mar 08 2013
(Haskell)
a052221 n = a052221_list !! (n-1)
a052221_list = filter ((== 7) . a007953) [0..]
-- Reinhard Zumkeller, Jul 17 2014
|
|
|
CROSSREFS
|
Cf. A007953.
Cf. A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052219 (5), A052220 (6), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225(14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).
A242614, A242627.
|
|
|
KEYWORD
|
nonn,base,easy
|
|
|
AUTHOR
|
Henry Bottomley, Feb 01 2000
|
|
|
EXTENSIONS
|
Offset changed from Bruno Berselli, Mar 07 2013
|
|
|
STATUS
|
approved
|
| |
|
|
| |
|
|
A217089
|
|
Numbers n such that (n^97-1)/(n-1) is prime.
|
|
+20
25
|
|
|
|
12, 90, 104, 234, 271, 339, 420, 421, 428, 429, 464, 805, 909, 934, 1054, 1114, 1116, 1128, 1144, 1159, 1193, 1364, 1788, 2086, 2215, 2254, 2448, 2461, 2593, 2595, 2771, 2787, 2829, 2859, 2952, 3029, 3075, 3144, 3250, 3265, 3268, 3301, 3701, 3752, 3875, 4026
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
1,1
|
|
|
LINKS
|
Vincenzo Librandi, Table of n, a(n) for n = 1..300
|
|
|
MATHEMATICA
|
Select[Range[2, 1000], PrimeQ[(#^97 - 1)/(# - 1)] &] (* T. D. Noe, Sep 26 2012 *)
|
|
|
CROSSREFS
|
Cf. A002384, A049409, A100330, A162862, A217070-A217088.
|
|
|
KEYWORD
|
nonn
|
|
|
AUTHOR
|
Tim Johannes Ohrtmann, Sep 26 2012
|
|
|
EXTENSIONS
|
More terms from T. D. Noe, Sep 26 2012
|
|
|
STATUS
|
approved
|
| |
|
|
| |
|
|
A047842
|
|
Describe n (ignoring missing digits).
|
|
+20
23
|
|
|
|
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1011, 21, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1012, 1112, 22, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1013, 1113, 1213, 23, 1314, 1315, 1316, 1317, 1318, 1319, 1014, 1114, 1214, 1314, 24, 1415, 1416
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
0,1
|
|
|
COMMENTS
|
Digit count of n. The digit count numerically summarizes the frequency of digits 0 through 9 in that order when they occur in a number. - Lekraj Beedassy, Jan 11 2007
Numbers which are digital permutations of one another have the same digit count. Compare with first entries of "Look And Say " or LS sequence A045918. As in the latter, a(n) has first odd-numbered-digit entry occurring at n=1111111111 with digit count 101, but a(n) has first ambiguous term 1011. For digit count invariants, i.e. n such that a(n)=n, see A047841. - Lekraj Beedassy, Jan 11 2007
|
|
|
LINKS
|
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
|
|
|
FORMULA
|
a(a(n)) = A235775(n).
a(A010785(n)) = A244112(A010785(n)). - Reinhard Zumkeller, Nov 11 2014
|
|
|
EXAMPLE
|
a(31)=1113 because (one 1, one 3) make up 31.
101 contains one 0 and two 1's, so a(101)=1021.
a(131)=2113.
|
|
|
MATHEMATICA
|
dc[n_] :=FromDigits@Flatten@Select[Table[{DigitCount[n, 10, k], k}, {k, 0, 9}], #[[1]] > 0 &]; Table[dc[n], {n, 0, 46}] (* Ray Chandler *)
|
|
|
PROG
|
(Haskell)
import Data.List (sort, group); import Data.Function (on)
a047842 :: Integer -> Integer
a047842 n = read $ concat $
zipWith ((++) `on` show) (map length xs) (map head xs)
where xs = group $ sort $ map (read . return) $ show n
-- Reinhard Zumkeller, Jan 15 2014
(Python)
def A047842(n):
....s, x = '', str(n)
....for i in range(10):
........y = str(i)
........c = str(x.count(y))
........if c != '0':
............s += c+y
....return int(s) # Chai Wah Wu, Jan 03 2015
|
|
|
CROSSREFS
|
Cf. A005151, A047841, A047843, A127354, A127355.
Cf. A235775.
Cf. A244112, A010785.
|
|
|
KEYWORD
|
nonn,easy,base,nice
|
|
|
AUTHOR
|
N. J. A. Sloane.
|
|
|
EXTENSIONS
|
Edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar
|
|
|
STATUS
|
approved
|
| |
|
|
| |
|
|
A279420
|
|
Numbers k such that k^2 has an odd number of digits and the middle digit is 0.
|
|
+20
22
|
|
|
|
10, 20, 30, 100, 105, 138, 145, 155, 179, 195, 200, 205, 217, 226, 241, 243, 245, 247, 249, 251, 253, 255, 257, 259, 274, 283, 295, 300, 305, 1000, 1005, 1010, 1015, 1020, 1025, 1030, 1049, 1054, 1068, 1082, 1091, 1100, 1114, 1127, 1136, 1149, 1158, 1162, 1175
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
1,1
|
|
|
LINKS
|
Lars Blomberg, Table of n, a(n) for n = 1..10000
|
|
|
EXAMPLE
|
10^2 = 1(0)0, 195^2 = 38(0)25, 1000^2 = 100(0)000.
The sequences of squares starts: 100, 400, 900, 10000, 11025, 19044, 21025, 24025, 32041, 38025, 40000, ...
|
|
|
MATHEMATICA
|
Select[Range@ 1175, Function[w, And[OddQ@ Length@ w, First@ Take[w, {Ceiling[Length[w]/2]}] == 0]]@ IntegerDigits[#^2] &] (* Michael De Vlieger, Dec 12 2016 *)
|
|
|
PROG
|
(PARI) isok(n) = my(d=digits(n^2)); (#d % 2) && (d[#d\2 + 1] == 0); \\ Michel Marcus, Dec 18 2016
|
|
|
CROSSREFS
|
Cf. A279421-A279429.
|
|
|
KEYWORD
|
nonn,base,easy
|
|
|
AUTHOR
|
Lars Blomberg, Dec 12 2016
|
|
|
STATUS
|
approved
|
| |
|
|
| |
|
|
A252532
|
|
T(n,k)=Number of (n+2)X(k+2) 0..3 arrays with every 3X3 subblock row and diagonal sum equal to 0 2 3 6 or 7 and every 3X3 column and antidiagonal sum not equal to 0 2 3 6 or 7
|
|
+20
17
|
|
|
|
750, 730, 595, 621, 337, 460, 719, 341, 334, 535, 778, 462, 466, 426, 546, 932, 706, 626, 610, 676, 649, 1200, 1000, 1120, 790, 1114, 964, 823, 1498, 1468, 1760, 1592, 1676, 1748, 1344, 1036, 1968, 2420, 2404, 2440, 4420, 2504, 2332, 2312, 1328, 2708, 3480
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
1,1
|
|
|
COMMENTS
|
Table starts
..750..730..621...719...778....932...1200....1498....1968....2708.....3473
..595..337..341...462...706...1000...1468....2420....3480....5240.....8872
..460..334..466...626..1120...1760...2404....4304....6832....9416....16864
..535..426..610...790..1592...2440...3160....6368....9760...12640....25472
..546..676.1114..1676..4420...7184..11456...31136...50560...83840...232192
..649..964.1748..2504..7136..13184..19232...54656..102272..150656...427520
..823.1344.2332..3160.10720..18656..25280...85760..149248..202240...686080
.1036.2312.4244..6704.30752..54464..91648..433664..763904.1341440..6471680
.1328.3336.6760.10016.49792.101888.153856..760832.1580032.2410496.11886592
.1756.4800.9112.12640.77696.145792.202240.1243136.2332672.3235840.19890176
|
|
|
LINKS
|
R. H. Hardin, Table of n, a(n) for n = 1..612
|
|
|
FORMULA
|
Empirical for column k:
k=1: a(n) = 4*a(n-3) -3*a(n-6) -4*a(n-9) +4*a(n-12) for n>23
k=2: a(n) = 6*a(n-3) -8*a(n-6) for n>10
k=3: a(n) = 6*a(n-3) -8*a(n-6) for n>8
k=4: a(n) = 4*a(n-3) for n>5
k=5: a(n) = 12*a(n-3) -32*a(n-6) for n>8
k=6: a(n) = 12*a(n-3) -32*a(n-6) for n>8
k=7: a(n) = 8*a(n-3) for n>5
Empirical for row n:
n=1: a(n) = 4*a(n-3) -3*a(n-6) -4*a(n-9) +4*a(n-12) for n>39
n=2: a(n) = 6*a(n-3) -8*a(n-6) for n>10
n=3: a(n) = 6*a(n-3) -8*a(n-6) for n>8
n=4: a(n) = 4*a(n-3) for n>5
n=5: a(n) = 12*a(n-3) -32*a(n-6) for n>8
n=6: a(n) = 12*a(n-3) -32*a(n-6) for n>8
n=7: a(n) = 8*a(n-3) for n>5
|
|
|
EXAMPLE
|
Some solutions for n=4 k=4
..2..2..3..2..2..3....1..1..0..1..1..0....3..2..2..3..2..2....0..2..1..0..1..1
..3..2..2..3..2..2....2..0..0..3..0..0....3..0..3..3..0..3....0..2..0..0..3..3
..3..0..3..3..0..3....1..0..1..1..0..1....2..2..3..2..2..3....1..1..0..1..1..0
..2..2..3..2..2..3....1..1..0..1..1..0....3..2..2..3..2..2....0..1..1..0..1..1
..3..2..2..3..2..2....3..0..0..2..0..0....3..1..3..3..0..3....0..3..0..0..3..0
..0..0..3..3..1..3....1..0..1..1..0..1....2..2..3..2..2..3....1..1..0..1..1..0
|
|
|
KEYWORD
|
nonn,tabl
|
|
|
AUTHOR
|
R. H. Hardin, Dec 18 2014
|
|
|
STATUS
|
approved
|
| |
|
|
| |
|
|
A007534
|
|
Even numbers that are not the sum of a pair of twin primes.
(Formerly M1306)
|
|
+20
16
|
|
|
|
2, 4, 94, 96, 98, 400, 402, 404, 514, 516, 518, 784, 786, 788, 904, 906, 908, 1114, 1116, 1118, 1144, 1146, 1148, 1264, 1266, 1268, 1354, 1356, 1358, 3244, 3246, 3248, 4204, 4206, 4208
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
1,1
|
|
|
COMMENTS
|
Conjectured to be complete (although if this were proved it would prove the "twin primes conjecture"!).
No other n < 10^9. - T. D. Noe, Apr 10 2007
Of these 35, the only 5 which are two times a prime (or in A001747) are 4 = 2 * 2, 94 = 2 * 47, 514 = 2 * 257, 1114 = 2 * 557, 1354 = 2 * 677. - Jonathan Vos Post, Mar 06 2010
|
|
|
REFERENCES
|
Harvey Dubner, Twin Prime Conjectures, Journal of Recreational Mathematics, Vol. 30 (3), 1999-2000.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
D. Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, 132.
|
|
|
LINKS
|
Table of n, a(n) for n=1..35.
Harvey Dubner, Twin Prime Conjectures, Journal of Recreational Mathematics, Vol. 30 (3), 1999-2000.
Eric Weisstein's World of Mathematics, Twin Primes
Dan Zwillinger, A Goldbach Conjecture Using Twin Primes, Math. Comp. 33, No.147 (1979), p.1071.
Index entries for sequences related to Goldbach conjecture
|
|
|
EXAMPLE
|
The twin primes < 100 are 3, 5, 7, 11, 13, 17, 19, 29, 31, 41, 43, 59, 61, 71, 73. 94 is in the sequence because no combination of any two numbers from the set just enumerated can be summed to make 94.
|
|
|
MATHEMATICA
|
p = Select[ Range[ 4250 ], PrimeQ[ # ] && PrimeQ[ # + 2 ] & ]; q = Union[ Join[ p, p + 2 ] ]; Complement[ Table[ n, {n, 2, 4250, 2} ], Union[ Flatten[ Table[ q[ [ i ] ] + q[ [ j ] ], {i, 1, 223}, {j, 1, 223} ] ] ] ]
Complement[Range[2, 4220, 2], Union[Total/@Tuples[Union[Flatten[ Select[ Partition[ Prime[ Range[500]], 2, 1], #[[2]]-#[[1]]==2&]]], 2]]] (* Harvey P. Dale, Oct 09 2013 *)
|
|
|
PROG
|
(Haskell)
import qualified Data.Set as Set (map, null)
import Data.Set (empty, insert, intersection)
a007534 n = a007534_list !! (n-1)
a007534_list = f [2, 4..] empty 1 a001097_list where
f xs'@(x:xs) s m ps'@(p:ps)
| x > m = f xs' (insert p s) p ps
| Set.null (s `intersection` Set.map (x -) s) = x : f xs s m ps'
| otherwise = f xs s m ps'
-- Reinhard Zumkeller, Nov 27 2011
|
|
|
CROSSREFS
|
Cf. A051345.
Cf. A129363 (number of partitions of 2n into the sum of two twin primes).
Cf. A179825.
|
|
|
KEYWORD
|
nonn,nice
|
|
|
AUTHOR
|
N. J. A. Sloane, Robert G. Wilson v
|
|
|
STATUS
|
approved
|
| |
|
|
| |
|
|
A252384
|
|
T(n,k)=Number of (n+2)X(k+2) 0..3 arrays with every 3X3 subblock row and diagonal sum equal to 0 3 5 6 or 7 and every 3X3 column and antidiagonal sum not equal to 0 3 5 6 or 7
|
|
+20
16
|
|
|
|
578, 897, 540, 1359, 555, 588, 1966, 647, 529, 651, 3020, 771, 632, 570, 785, 4682, 1067, 663, 616, 637, 904, 7109, 1496, 963, 744, 799, 764, 1051, 10880, 1928, 1341, 1091, 916, 984, 903, 1290, 16510, 2662, 1610, 1475, 1305, 1097, 1114, 1117, 1543
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
1,1
|
|
|
COMMENTS
|
Table starts
..578..897.1359.1966.3020.4682.7109.10880.16510.24980.37998.57542.86746.131187
..540..555..647..771.1067.1496.1928..2662..3856..5074..7024.10213.13505..18776
..588..529..632..663..963.1341.1610..2376..3331..4097..6077..8560.10605..15764
..651..570..616..744.1091.1475.1880..2734..3712..4817..7023..9576.12499..18249
..785..637..799..916.1305.1894.2310..3280..4791..5934..8451.12386.15413..21987
..904..764..984.1097.1667.2356.2769..4222..5992..7136.10911.15524.18561..28419
.1051..903.1114.1361.2031.2778.3495..5195..7123..9045.13466.18506.23568..35117
.1290.1117.1541.1791.2598.3836.4601..6665..9875.11932.17313.25696.31116..45188
.1543.1470.2007.2270.3526.5035.5840..9089.13006.15176.23653.33887.39610..61778
.1902.1843.2417.2976.4492.6189.7723.11638.16053.20114.30334.41885.52547..79278
|
|
|
LINKS
|
R. H. Hardin, Table of n, a(n) for n = 1..579
|
|
|
FORMULA
|
Empirical for column k:
k=1: a(n) = 5*a(n-3) -8*a(n-6) +5*a(n-9) -a(n-12) for n>22
k=2: a(n) = 4*a(n-3) -4*a(n-6) +a(n-9) for n>15
k=3: a(n) = 4*a(n-3) -4*a(n-6) +a(n-9) for n>12
k=4: a(n) = 4*a(n-3) -4*a(n-6) +a(n-9) for n>12
k=5: a(n) = 4*a(n-3) -4*a(n-6) +a(n-9) for n>12
k=6: a(n) = 4*a(n-3) -4*a(n-6) +a(n-9) for n>12
k=7: a(n) = 4*a(n-3) -4*a(n-6) +a(n-9) for n>12
Empirical for row n:
n=1: [linear recurrence of order 65] for n>79
n=2: [order 21] for n>30
n=3: a(n) = 4*a(n-3) -4*a(n-6) +a(n-9) for n>17
n=4: a(n) = 4*a(n-3) -4*a(n-6) +a(n-9) for n>14
n=5: a(n) = 4*a(n-3) -4*a(n-6) +a(n-9) for n>14
n=6: a(n) = 4*a(n-3) -4*a(n-6) +a(n-9) for n>15
n=7: a(n) = 4*a(n-3) -4*a(n-6) +a(n-9) for n>14
|
|
|
EXAMPLE
|
Some solutions for n=4 k=4
..0..0..0..3..0..0....0..1..2..0..1..2....3..2..0..3..0..0....1..2..3..1..2..0
..0..2..1..3..2..1....0..0..0..0..0..0....2..1..0..2..1..0....0..0..3..0..0..0
..2..0..1..2..0..1....2..1..0..2..1..0....3..1..2..3..1..2....1..0..2..1..0..2
..0..0..0..3..0..0....0..1..2..0..1..2....3..0..0..3..0..0....1..2..3..1..2..0
..0..2..1..3..2..1....0..0..0..0..0..0....2..1..0..2..1..0....0..0..3..0..0..0
..2..0..1..2..0..1....2..1..0..2..3..0....3..1..2..3..1..1....1..0..2..1..0..2
|
|
|
KEYWORD
|
nonn,tabl
|
|
|
AUTHOR
|
R. H. Hardin, Dec 17 2014
|
|
|
STATUS
|
approved
|
| |
|
|
| |
|
|
A001140
|
|
Describe the previous term! (method A - initial term is 4).
|
|
+20
15
|
|
|
|
4, 14, 1114, 3114, 132114, 1113122114, 311311222114, 13211321322114, 1113122113121113222114, 31131122211311123113322114, 132113213221133112132123222114, 11131221131211132221232112111312111213322114, 31131122211311123113321112131221123113111231121123222114
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
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
|
T. D. Noe, Table of n, a(n) for n=1..20
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]
|
|
|
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)
|
|
|
CROSSREFS
|
Cf. A001155, A005150, A006751, A006715, A001141, A001143, A001145, A001151, A001154.
|
|
|
KEYWORD
|
nonn,base,easy,nice
|
|
|
AUTHOR
|
N. J. A. Sloane
|
|
|
STATUS
|
approved
|
| |
|
Search completed in 0.691 seconds
|