This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A173964 #14 Jun 20 2017 22:36:41 %S A173964 1,2,1,2,3,2,3,1,2,3,4,3,4,2,3,4,1,2,3,4,5,4,5,3,4,5,2,3,4,5,1,2,3,4, %T A173964 5,6,5,6,4,5,6,3,4,5,6,2,3,4,5,6,1,2,3,4,5,6,7,6,7,5,6,7,4,5,6,7,3,4, %U A173964 5,6,7,2,3,4,5,6,7,1,2,3,4,5,6,7,8 %N A173964 Sequence derived from a memorization technique. %C A173964 To memorize a poem composed of several verses, the following technique can be used. -Memorize verse 1. -Memorize verse 2. -Memorize (revise) verse 1, and then verse 2. -Memorize verse 3. -Memorize (revise) verse 2, and then verse 3. -Memorize (revise) verse 1, then verse 2, and then verse 3. -Memorize verse 4. -Memorize (revise) verse 3, and then verse 4. -Memorize (revise) verse 2, then verse 3, and then verse 4. -Memorize (revise) verse 1, then verse 2, then verse 3, and then verse 4. Etc. Listing down the verses in the order they are memorized or revised gives the sequence. %C A173964 The sequence is self-similar: striking out the n first occurrences of each integer n gives the initial sequence. %C A173964 The sequence can be created by writing down the strings 12, 123, 1234, 12345, etc, on separate rows, and then following each string with its last substring of length 2, then last substring of length 3, last substring of length 4, etc, stopping before the whole string is repeated. - _Andrew Woods_, Aug 03 2011 %C A173964 The first appearance of n >= 1 is at a(1+(n-1)*n*(n+1)/6). - _Andrew Woods_, Aug 03 2011 %C A173964 For n > 1: a(A000292(n)+1) = n. %H A173964 Andrew Woods, <a href="/A173964/b173964.txt">Table of n, a(n) for n = 1..10000</a> %p A173964 S := n -> (1/6)*n*(n+1)*(n+2): invS := n -> ceil((1/3)*(81*n+3*sqrt(-3+729*n^2))^(1/3)+1/(81*n+3*sqrt(-3+729*n^2))^(1/3)-1): %p A173964 A := n -> (1/2)*n*(n+1): invA := n -> floor(-1/2+(1/2)*sqrt(1+8*n)): %p A173964 A173964 := n -> invS(n)-invA(n-1-S(invS(n)-1))+n-1-S(invS(n)-1)-A(invA(n-1-S(invS(n)-1))); %o A173964 (Haskell) %o A173964 a173964 n = a173964_list !! (n-1) %o A173964 a173964_list = concat $ [1] : f [[1]] where %o A173964 f xss = yss ++ f yss where %o A173964 yss = [y] : map (++ [y]) xss %o A173964 y = head (head xss) + 1 %o A173964 -- _Reinhard Zumkeller_, Nov 16 2013 %K A173964 nonn %O A173964 1,2 %A A173964 Ibrahima Faye (ifaye2001(AT)yahoo.fr), Feb 22 2010