The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A119632 Lengths of successive runs in A160357, where a run here means a string of alternating terms. 9
 1, 1, 3, 1, 11, 1, 4, 10, 1, 4, 28, 1, 10, 24, 1, 8, 1, 2, 1, 1, 4, 1, 9, 4, 1, 2, 36, 1, 12, 4, 1, 2, 1, 3, 28, 1, 10, 52, 1, 18, 1, 32, 1, 12, 15, 38, 1, 14, 32, 1, 12, 1, 44, 1, 16, 1, 148, 1, 50, 7, 22, 1, 8, 3, 4, 1, 2, 70, 1, 24, 1, 114, 1, 42, 1, 200, 1, 68, 6, 1, 2, 13 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS Gives a highly compressed version of A005132. The encoding of Recamán's sequence a(n) = A005132 using A119632 is easy - A119632 counts runs of alternating i(n)'s, where i(n) = (a(n)-a(n-1)/n = A160357(n). Note that i(n) is always +1 or -1.  Each run ends when i(n) = i(n+1). Here is pseudo-code to reconstruct Recamán's sequence from A119632, which we will call I(n):         a(0) = 0         n = 1         i = 1         for k = 1..                 for j = 1..I(k) {                         a(n) = a(n-1) + n*i                         n = n+1                         i = -i                 }                 i = -i         } The gzipped file attached to A119632 represents the first 1470117206801829 terms of A005132. The longest run of alternating i(n)'s (maximal value found so far in A119632) is 232144588914. There are 64094657 runs encoded in the gzipped file. LINKS Allan Wilks, Table of n, a(n) for n = 1..100000 Allan Wilks, The first 64094657 terms (gzipped). (A large file. This encodes the first 1470117206801829 terms of A005132!) EXAMPLE A160357 begins 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, 1, -1, 1, -1, 1, -1, 1, 1; 1; ..., where semicolons demark the successive runs. CROSSREFS Cf. A005132, A160357. Sequence in context: A048953 A200652 A276391 * A201131 A277790 A134761 Adjacent sequences:  A119629 A119630 A119631 * A119633 A119634 A119635 KEYWORD nonn AUTHOR N. J. A. Sloane and Allan Wilks, Jun 10 2006 EXTENSIONS Entry expanded by N. J. A. Sloane, Jul 15 2011. I am having trouble uploading the gzipped file. STATUS approved

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

Last modified October 1 07:48 EDT 2020. Contains 337442 sequences. (Running on oeis4.)