OFFSET
0,7
COMMENTS
a(n) = Running count of congruent nonempty triangles along lines perpendicular to the base of the Gosper-Lafitte triangle.
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
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
REFERENCES
M. J. Lafitte, Sur l'Effet Noah en Géométrie, rapport à l'INPI, mars 1995.
LINKS
T. D. Noe, Table of n, a(n) for n = 0..10000
S. Klavzar, U. Milutinovic and C. Petr, Stern polynomials, Adv. Appl. Math. 39 (2007) 86-95.
M. J. Lafitte, Ensembles Auto-Similaires d'Intérieur Non-Vide, Preprint Hiver 1997, Chaire de Géometrie, Département de Mathématiques, Ecole Polytechnique Fédérale de Lausanne, Switzerland. [Cached copy, with permission]
M. J. Lafitte, Fractal triangle underlying A000360, A000361, A000876
M. J. Lafitte, Notes on A000360, A000361, A000876 [Based on a latex file sent by M. Jeremie Lafitte (Levitas) to NJAS in 1995 - see file of emails below]
M. J. Lafitte, Latex source for the pdf file [Sent by MJL to NJAS in 1995 - see file of emails below]
M. J. Lafitte and N. J. A. Sloane, Emails, 1995-2007 (The three sequences mentioned in this correspondence are now A000360, A000361, A000876)
FORMULA
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
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
From Antti Karttunen, Apr 07 2017: (Start)
Ultimately equivalent to the above formulae, we have:
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).]
(End)
MATHEMATICA
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 *)
PROG
(Haskell)
import Data.List (transpose)
a000360 n = a000360_list !! n
a000360_list = 1 : concat (transpose
[zipWith (+) a000360_list $ drop 2 a057078_list,
zipWith (+) a000360_list $ tail a000360_list])
-- Reinhard Zumkeller, Mar 22 2013
(Scheme, with memoization-macro definec):
(define (A000360 n) (A000360with_prep_0 (+ 1 n)))
(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))))))
(definec (A284556 n) (cond ((<= n 1) 0) ((even? n) (A000360with_prep_0 (/ n 2))) (else (+ (A284556 (/ (- n 1) 2)) (A284556 (/ (+ n 1) 2))))))
;; Antti Karttunen, Apr 07 2017
(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
CROSSREFS
KEYWORD
AUTHOR
EXTENSIONS
More terms from David W. Wilson, Aug 30 2000
Original relation to the Stern-Brocot sequence A002487 reformulated by M. Jeremie Lafitte (Levitas), Apr 23 2017
STATUS
approved