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 A000360 #129 Mar 13 2020 08:36:15 %S A000360 1,0,1,1,1,1,2,0,2,2,2,1,3,1,2,1,2,2,4,1,4,3,3,1,4,2,4,2,3,2,3,0,3,3, %T A000360 4,2,6,3,5,2,5,4,7,2,6,4,4,1,5,3,6,3,6,4,6,1,5,4,5,2,5,2,3,1,3,3,6,2, %U A000360 7,5,6,2,8,5,9,4,8,5,7,1,7,6,9,4,11,6,9,3,8,6,10,3,8,5,5,1,6,4,8,4,9,6,9,2 %N A000360 Distribution of nonempty triangles inside a fractal rep-4-tile. %C A000360 a(n) = Running count of congruent nonempty triangles along lines perpendicular to the base of the Gosper-Lafitte triangle. %C A000360 Also, a(n) = Sum of the coefficients of the terms with an even exponent in the Stern polynomial B(n+1,t), or in other words, the sum of the even-indexed terms (the leftmost is at index 0) of the irregular triangle A125184, starting from its second row. - _Antti Karttunen_, Apr 20 2017 %C A000360 Back in May 1995, it was proved that a(n) = modulo 3 mapping, (+1,-1,+0)/2, of the Stern-Brocot sequence A002487, dropping its 1st term. - _M. Jeremie Lafitte (Levitas)_, Apr 23 2017 %D A000360 M. J. Lafitte, Sur l'Effet Noah en Géométrie, rapport à l'INPI, mars 1995. %H A000360 T. D. Noe, <a href="/A000360/b000360.txt">Table of n, a(n) for n = 0..10000</a> %H A000360 S. Klavzar, U. Milutinovic and C. Petr, <a href="http://dx.doi.org/10.1016/j.aam.2006.01.003">Stern polynomials</a>, Adv. Appl. Math. 39 (2007) 86-95. %H A000360 M. J. Lafitte, <a href="/A000360/a000360_1.pdf">Ensembles Auto-Similaires d'Intérieur Non-Vide</a>, Preprint Hiver 1997, Chaire de Géometrie, Département de Mathématiques, Ecole Polytechnique Fédérale de Lausanne, Switzerland. [Cached copy, with permission] %H A000360 M. J. Lafitte, <a href="/A000360/a000360.png">Fractal triangle underlying A000360, A000361, A000876</a> %H A000360 M. J. Lafitte, <a href="/A000360/a000360.pdf">Notes on A000360, A000361, A000876</a> [Based on a latex file sent by M. Jeremie Lafitte (Levitas) to NJAS in 1995 - see file of emails below] %H A000360 M. J. Lafitte, <a href="/A000360/a000360.tex">Latex source for the pdf file</a> [Sent by MJL to NJAS in 1995 - see file of emails below] %H A000360 M. J. Lafitte and N. J. A. Sloane, <a href="/A000360/a000360.txt">Emails, 1995-2007</a> (The three sequences mentioned in this correspondence are now A000360, A000361, A000876) %F A000360 a(3n) = (A002487(3n+1) + 1)/2, a(3n+1) = (A002487(3n+2) - 1)/2, a(3n+2) = A002487(3n+3)/2. - _M. Jeremie Lafitte (Levitas)_, Apr 23 2017 %F A000360 a(0) = 1, a(2n) = a(n) + a(n-1), a(2n+1) = a(n) + 1 - (n-1 mod 3). - _Ralf Stephan_, Oct 05 2003; Note: according to Ralf Stephan, this formula was found empirically. It follows from that found for the Stern-Brocot sequence A002487 and the first formula. - _Antti Karttunen_, Apr 21 2017, _M. Jeremie Lafitte (Levitas)_, Apr 23 2017 %F A000360 From _Antti Karttunen_, Apr 07 2017: (Start) %F A000360 Ultimately equivalent to the above formulae, we have: %F A000360 a(n) = A001222(A284553(1+n)). %F A000360 a(n) = A002487(1+n) - A284556(1+n). %F A000360 a(n) = b(1+n), with b from a mutual recurrence pair: b(0) = 0, b(1) = 1, b(2n) = c(n), b(2n+1) = b(n) + b(n+1), c(0) = c(1) = 0, c(2n) = b(n), c(2n+1) = c(n) + c(n+1). [c(n) = A284556(n), b(n)+c(n) = A002487(n).] %F A000360 (End) %t A000360 a[0] = 1; a[n_?EvenQ] := a[n] = a[n/2] + a[n/2-1]; a[n_?OddQ] := a[n] = a[(n-1)/2] - Mod[(n-1)/2-1, 3] + 1; Table[a[n], {n, 0, 103}] (* _Jean-François Alcover_, Jan 20 2015, after _Ralf Stephan_ *) %o A000360 (Haskell) %o A000360 import Data.List (transpose) %o A000360 a000360 n = a000360_list !! n %o A000360 a000360_list = 1 : concat (transpose %o A000360 [zipWith (+) a000360_list $ drop 2 a057078_list, %o A000360 zipWith (+) a000360_list $ tail a000360_list]) %o A000360 -- _Reinhard Zumkeller_, Mar 22 2013 %o A000360 (Scheme, with memoization-macro definec): %o A000360 (define (A000360 n) (A000360with_prep_0 (+ 1 n))) %o A000360 (definec (A000360with_prep_0 n) (cond ((<= n 1) n) ((even? n) (A284556 (/ n 2))) (else (+ (A000360with_prep_0 (/ (- n 1) 2)) (A000360with_prep_0 (/ (+ n 1) 2)))))) %o A000360 (definec (A284556 n) (cond ((<= n 1) 0) ((even? n) (A000360with_prep_0 (/ n 2))) (else (+ (A284556 (/ (- n 1) 2)) (A284556 (/ (+ n 1) 2)))))) %o A000360 ;; _Antti Karttunen_, Apr 07 2017 %o A000360 (PARI) a(n) = if(n==0, 1, if(n%2, a((n - 1)/2) - ((n - 1)/2 - 1)%3 + 1, a(n/2) + a(n/2 - 1))); \\ _Indranil Ghosh_, Apr 20 2017 %Y A000360 Cf. A002487, A000361, A000876. %Y A000360 Cf. A001222, A057078, A125184, A284553, A284556, A284565 (bisection). %Y A000360 Cf. also mutual recurrence pair A287729, A287730. %K A000360 nonn,nice,easy,eigen,look %O A000360 0,7 %A A000360 _M. Jeremie Lafitte (Levitas)_ %E A000360 More terms from _David W. Wilson_, Aug 30 2000 %E A000360 Original relation to the Stern-Brocot sequence A002487 reformulated by _M. Jeremie Lafitte (Levitas)_, Apr 23 2017