[go: up one dir, main page]

login
Search: a002083 -id:a002083
     Sort: relevance | references | number | modified | created      Format: long | short | data
A bisection of A002083.
+20
2
1, 1, 3, 11, 42, 165, 654, 2605, 10398, 41550, 166116, 664299, 2656866, 10626810, 42505932, 170021123, 680079282, 2720306730, 10881206124, 43524782946, 174099048684, 696396028620, 2785583782248, 11142334464693, 44569336530174, 178277343463830, 713109368541588
OFFSET
0,3
REFERENCES
H. Brocard, Query 4293, L'Intermédiaire des Mathématiciens, 23 (1916), 58-59. - N. J. A. Sloane, Mar 08 2022
FORMULA
a(0)=a(1)=1; a(2)=3; a(n) = 4*a(n-1) + ((-1)^(n-1)-3)/2 * a(floor((n-1)/2)). - Carl R. White, Oct 06 2017
MAPLE
A259858 := proc(n)
A002083(2*n+1) ;
end proc:
seq(A259858(n), n=0..30) ; # R. J. Mathar, Jul 09 2015
MATHEMATICA
a[n_] := a[n] = If[n < 3, 1 + 2 Boole@ PrimeQ@ n, 4 a[n - 1] + ((-1)^(n - 1) - 3)/2*a[Floor[(n - 1)/2]]]; Array[a, 27, 0] (* Michael De Vlieger, Oct 06 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 07 2015
STATUS
approved
Triangle read by rows, A101688 * (an infinite lower triangular matrix with A002083 as the main diagonal and the rest zeros).
+20
1
1, 0, 1, 0, 1, 1, 0, 0, 1, 2, 0, 0, 1, 2, 3, 0, 0, 0, 2, 3, 6, 0, 0, 0, 2, 3, 6, 11, 0, 0, 0, 0, 3, 6, 11, 22, 0, 0, 0, 0, 3, 6, 11, 22, 42, 0, 0, 0, 0, 0, 6, 11, 22, 42, 84, 0, 0, 0, 0, 0, 6, 11, 22, 42, 84, 165, 0, 0, 0, 0, 0, 0, 11, 22, 42, 84, 165, 330
OFFSET
1,10
COMMENTS
Row sums = A002083(n+1): (1, 1, 2, 3, 6, 11, 22, 42, 84, 165,...).
Sum of n-th row terms = rightmost term of next row.
Eigensequence of triangle A101688 = A002083 starting with offset 1: (1, 1, 2, 3, 6, 11, 22, 42,...).
FORMULA
Equals M * Q, where M = triangle A101688, Q = an infinite lower triangular matrix with (1, 1, 1, 2, 3, 6, 11, 22, 42,...) as the main diagonal and the rest zeros.
EXAMPLE
First few rows of the triangle:
1;
0, 1;
0, 1, 1;
0, 0, 1, 2;
0, 0, 1, 2, 3;
0, 0, 0, 2, 3, 6;
0, 0, 0, 2, 3, 6, 11;
0, 0, 0, 0, 3, 6, 11, 22;
0, 0, 0, 0, 3, 6, 11, 22, 42;
0, 0, 0, 0, 0, 6, 11, 22, 42, 84;
0, 0, 0, 0, 0, 6, 11, 22, 42, 84, 165;
0, 0, 0, 0, 0, 0, 11, 22, 42, 84, 165, 330;
0, 0, 0, 0, 0, 0, 11, 22, 42, 84, 165, 330, 654;
0, 0, 0, 0, 0, 0, .0, 22, 42, 84, 165, 330, 654, 1308;
0, 0, 0, 0, 0, 0, .0, 22, 42, 84, 165, 330, 654, 1308, 2605;
...
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson, Nov 15 2009
STATUS
approved
n(n+Z(n)), where Z( ) is the Narayana-Zidek-Capell sequence (A002083).
+20
0
0, 2, 6, 12, 24, 40, 72, 126, 240, 459, 940, 1936, 4104, 8671, 18508, 39300, 83616, 177055, 374652, 789811, 1662400, 3488877, 7309588, 15279406, 31886928, 66422275, 138157708, 286924599, 595102144, 1232672869
OFFSET
0,2
CROSSREFS
Cf. A002083.
KEYWORD
nonn
AUTHOR
STATUS
approved
Jacobsthal sequence (or Jacobsthal numbers): a(n) = a(n-1) + 2*a(n-2), with a(0) = 0, a(1) = 1; also a(n) = nearest integer to 2^n/3.
(Formerly M2482 N0983)
+10
713
0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, 5461, 10923, 21845, 43691, 87381, 174763, 349525, 699051, 1398101, 2796203, 5592405, 11184811, 22369621, 44739243, 89478485, 178956971, 357913941, 715827883, 1431655765, 2863311531, 5726623061, 11453246123
OFFSET
0,4
COMMENTS
Don Knuth points out (personal communication) that Jacobsthal may never have seen the actual values of this sequence. However, Horadam uses the name "Jacobsthal sequence", such an important sequence needs a name, and there is a law that says the name for something should never be that of its discoverer. - N. J. A. Sloane, Dec 26 2020
Number of ways to tile a 3 X (n-1) rectangle with 1 X 1 and 2 X 2 square tiles.
Also, number of ways to tile a 2 X (n-1) rectangle with 1 X 2 dominoes and 2 X 2 squares. - Toby Gottfried, Nov 02 2008
Also a(n) counts each of the following four things: n-ary quasigroups of order 3 with automorphism group of order 3, n-ary quasigroups of order 3 with automorphism group of order 6, (n-1)-ary quasigroups of order 3 with automorphism group of order 2 and (n-2)-ary quasigroups of order 3. See the McKay-Wanless (2008) paper. - Ian Wanless, Apr 28 2008
Also the number of ways to tie a necktie using n + 2 turns. So three turns make an "oriental", four make a "four in hand" and for 5 turns there are 3 methods: "Kelvin", "Nicky" and "Pratt". The formula also arises from a special random walk on a triangular grid with side conditions (see Fink and Mao, 1999). - arne.ring(AT)epost.de, Mar 18 2001
Also the number of compositions of n + 1 ending with an odd part (a(2) = 3 because 3, 21, 111 are the only compositions of 3 ending with an odd part). Also the number of compositions of n + 2 ending with an even part (a(2) = 3 because 4, 22, 112 are the only compositions of 4 ending with an even part). - Emeric Deutsch, May 08 2001
Arises in study of sorting by merge insertions and in analysis of a method for computing GCDs - see Knuth reference.
Number of perfect matchings of a 2 X n grid upon replacing unit squares with tetrahedra (C_4 to K_4):
o----o----o----o...
| \/ | \/ | \/ |
| /\ | /\ | /\ |
o----o----o----o... - Roberto E. Martinez II, Jan 07 2002
Also the numerators of the reduced fractions in the alternating sum 1/2 - 1/4 + 1/8 - 1/16 + 1/32 - 1/64 + ... - Joshua Zucker, Feb 07 2002
Also, if A(n), B(n), C(n) are the angles of the n-orthic triangle of ABC then A(1) = Pi - 2*A, A(n) = s(n)*Pi + (-2)^n*A where s(n) = (-1)^(n-1) * a(n) [1-orthic triangle = the orthic triangle of ABC, n-orthic triangle = the orthic triangle of the (n-1)-orthic triangle]. - Antreas P. Hatzipolakis (xpolakis(AT)otenet.gr), Jun 05 2002
Also the number of words of length n+1 in the two letters s and t that reduce to the identity 1 by using the relations sss = 1, tt = 1 and stst = 1. The generators s and t and the three stated relations generate the group S3. - John W. Layman, Jun 14 2002
Sums of pairs of consecutive terms give all powers of 2 in increasing order. - Amarnath Murthy, Aug 15 2002
Excess clockwise moves (over counterclockwise) needed to move a tower of size n to the clockwise peg is -(-1)^n*(2^n - (-1)^n)/3; a(n) is its unsigned version. - Wouter Meeussen, Sep 01 2002
Also the absolute value of the number represented in base -2 by the string of n 1's, the negabinary repunit. The Mersenne numbers (A000225 and its subsequences) are the binary repunits. - Rick L. Shepherd, Sep 16 2002
Note that 3*a(n) + (-1)^n = 2^n is significant for Pascal's triangle A007318. It arises from a Jacobsthal decomposition of Pascal's triangle illustrated by 1 + 7 + 21 + 35 + 35 + 21 + 7 + 1 = (7 + 35 + 1) + (1 + 35 + 7) + (21 + 21) = 43 + 43 + 42 = 3a(7) - 1; 1 + 8 + 28 + 56 + 70 + 56 + 28 + 8 + 1 = (1 + 56 + 28) + (28 + 56 + 1) + (8 + 70 + 8) = 85 + 85 + 86 = 3a(8)+1. - Paul Barry, Feb 20 2003
Number of positive integers requiring exactly n signed bits in the nonadjacent form representation.
Equivalently, number of length-(n-1) words with letters {0, 1, 2} where no two consecutive letters are nonzero, see example and fxtbook link. - Joerg Arndt, Nov 10 2012
Counts walks between adjacent vertices of a triangle. - Paul Barry, Nov 17 2003
Every amphichiral rational knot written in Conway notation is a palindromic sequence of numbers, not beginning or ending with 1. For example, for 4 <= n <= 12, the amphichiral rational knots are: 2 2, 2 1 1 2, 4 4, 3 1 1 3, 2 2 2 2, 4 1 1 4, 3 1 1 1 1 3, 2 3 3 2, 2 1 2 2 1 2, 2 1 1 1 1 1 1 2, 6 6, 5 1 1 5, 4 2 2 4, 3 3 3 3, 2 4 4 2, 3 2 1 1 2 3, 3 1 2 2 1 3, 2 2 2 2 2 2, 2 2 1 1 1 1 2 2, 2 1 2 1 1 2 1 2, 2 1 1 1 1 1 1 1 1 2. For the number of amphichiral rational knots for n=2*k (k=1, 2, 3, ...), we obtain the sequence 0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, ... - Slavik Jablan, Dec 26 2003
a(n+2) counts the binary sequences of total length n made up of codewords from C = {0, 10, 11}. - Paul Barry, Jan 23 2004
Number of permutations with no fixed points avoiding 231 and 132.
The n-th entry (n > 1) of the sequence is equal to the 2,2-entry of the n-th power of the unnormalized 4 X 4 Haar matrix: [1 1 1 0 / 1 1 -1 0 / 1 1 0 1 / 1 1 0 -1]. - Simone Severini, Oct 27 2004
a(n) is the number of Motzkin (n+1)-sequences whose flatsteps all occur at level 1 and whose height is less than or equal to 2. For example, a(4) = 5 counts UDUFD, UFDUD, UFFFD, UFUDD, UUDFD. - David Callan, Dec 09 2004
a(n+1) gives row sums of A059260. - Paul Barry, Jan 26 2005
If (m + n) is odd, then 3*(a(m) + a(n)) is always of the form a^2 + 2*b^2, where a and b both equal powers of 2; consequently every factor of (a(m) + a(n)) is always of the form a^2 + 2*b^2. - Matthew Vandermast, Jul 12 2003
Number of "0,0" in f_{n+1}, where f_0 = "1" and f_{n+1} = a sequence formed by changing all "1"s in f_n to "1,0" and all "0"s in f_n to "0,1". - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Sep 22 2006
All prime Jacobsthal numbers A049883[n] = {3, 5, 11, 43, 683, 2731, 43691, ...} have prime indices except for a(4) = 5. All prime Jacobsthal numbers with prime indices (all but a(4) = 5) are of the form (2^p + 1)/3 - the Wagstaff primes A000979[n]. Indices of prime Jacobsthal numbers are listed in A107036[n] = {3, 4, 5, 7, 11, 13, 17, 19, 23, 31, 43, 61, ...}. For n>1 A107036[n] = A000978[n] Numbers n such that (2^n + 1)/3 is prime. - Alexander Adamchuk, Oct 03 2006
Correspondence: a(n) = b(n)*2^(n-1), where b(n) is the sequence of the arithmetic means of previous two terms defined by b(n) = 1/2*(b(n-1) + b(n-2)) with initial values b(0) = 0, b(1) = 1; the g.f. for b(n) is B(x) := x/(1-(x^1+x^2)/2), so the g.f. A(x) for a(n) satisfies A(x) = B(2*x)/2. Because b(n) converges to the limit lim (1-x)*B(x) = 1/3*(b(0) + 2*b(1)) = 2/3 (for x --> 1), it follows that a(n)/2^(n-1) also converges to 2/3 (see also A103770). - Hieronymus Fischer, Feb 04 2006
Inverse: floor(log_2(a(n))) = n - 2 for n >= 2. Also: log_2(a(n) + a(n-1)) = n - 1 for n >= 1 (see also A130249). Characterization: x is a Jacobsthal number if and only if there is a power of 4 (= c) such that x is a root of p(x) = 9*x*(x-c) + (c-1)*(2*c+1) (see also the indicator sequence A105348). - Hieronymus Fischer, May 17 2007
This sequence counts the odd coefficients in the expansion of (1 + x + x^2)^(2^n - 1), n >= 0. - Tewodros Amdeberhan (tewodros(AT)math.mit.edu), Oct 18 2007, Jan 08 2008
2^(n+1) = 2*A005578(n) + 2*a(n) + 2*A000975(n-1). Let A005578(n), a(n), A000975(n-1) = triangle (a, b, c). Then ((S-c), (S-b), (S-a)) = (A005578(n-1), a(n-1), A000975(n-2)). Example: (a, b, c) = (11, 11, 10) = (A005578(5), a(5), A000975(4)). Then ((S-c), (S-b), (S-a)) = (6, 5, 5) = (A005578(4), a(4), A000975(3)). - Gary W. Adamson, Dec 24 2007
Sequence is identical to the absolute values of its inverse binomial transform. A similar result holds for [0,A001045*2^n]. - Paul Curtz, Jan 17 2008
From a(2) on (i.e., 1, 3, 5, 11, 21, ...) also: least odd number such that the subsets of {a(2), ..., a(n)} sum to 2^(n-1) different values, cf. A138000 and A064934. It is interesting to note the pattern of numbers occurring (or not occurring) as such a sum (A003158). - M. F. Hasler, Apr 09 2008
a(n) is the term (5, 1) of n-th power of the 5 X 5 matrix shown in A121231. - Gary W. Adamson, Oct 03 2008
A147612(a(n)) = 1. - Reinhard Zumkeller, Nov 08 2008
a(n+1) = Sum(A153778(i): 2^n <= i < 2^(n+1)). - Reinhard Zumkeller, Jan 01 2009
It appears that a(n) is also the number of integers between 2^n and 2^(n+1) that are divisible by 3 with no remainder. - John Fossaceca (john(AT)fossaceca.net), Jan 31 2009
Number of pairs of consecutive odious (or evil) numbers between 2^(n+1) and 2^(n+2), inclusive. - T. D. Noe, Feb 05 2009
Equals eigensequence of triangle A156319. - Gary W. Adamson, Feb 07 2009
A three-dimensional interpretation of a(n+1) is that it gives the number of ways of filling a 2 X 2 X n hole with 1 X 2 X 2 bricks. - Martin Griffiths, Mar 28 2009
Starting with offset 1 = INVERTi transform of A002605: (1, 2, 6, 16, 44, ...). - Gary W. Adamson, May 12 2009
Convolved with (1, 2, 2, 2, ...) = A000225: (1, 3, 7, 15, 31, ...). - Gary W. Adamson, May 23 2009
The product of a pair of successive terms is always a triangular number. - Giuseppe Ottonello, Jun 14 2009
Let A be the Hessenberg matrix of order n, defined by: A[1, j] = 1, A[i, i] := -2, A[i, i - 1] = -1, and A[i, j] = 0 otherwise. Then, for n >= 1, a(n) = (-1)^(n-1)*det(A). - Milan Janjic, Jan 26 2010
Let R denote the irreducible representation of the symmetric group S_3 of dimension 2, and let s and t denote respectively the sign and trivial irreducible representations of dimension 1. The decomposition of R^n into irreducible representations consists of a(n) copies of R and a(n-1) copies of each of s and t. - Andrew Rupinski, Mar 12 2010
As a fraction: 1/88 = 0.0113636363... or 1/9898 = 0.00010103051121... - Mark Dols, May 18 2010
Starting with "1" = the INVERT transform of (1, 0, 2, 0, 4, 0, 8, ...); e.g., a(7) = 43 = (1, 1, 1, 3, 5, 11, 21) dot (8, 0, 4, 0, 2, 0, 1) = (8 + 4 + 10 + 21) = 43. - Gary W. Adamson, Oct 28 2010
Rule 28 elementary cellular automaton (A266508) generates this sequence. - Paul Muljadi, Jan 27 2011
This is a divisibility sequence. - Michael Somos, Feb 06 2011
From L. Edson Jeffery, Apr 04 2011: (Start)
Let U be the unit-primitive matrix (see [Jeffery])
U = U_(6,2) =
(0 0 1)
(0 2 0)
(2 0 1).
Then a(n+1) = (Trace(U^n))/3, a(n+1) = ((U^n)_{3, 3})/3, a(n) = ((U^n)_{1, 3})/3 and a(n) = ((U^(n+1))_{1, 1})/2. (End)
The sequence emerges in using iterated deletion of strictly dominated strategies to establish the best-response solution to the Cournot duopoly problem as a strictly dominant strategy. The best response of firm 1 to firm 2's chosen quantity is given by q*_1 = 1/2*(a - c - q_2), where a is reservation price, c is marginal cost, and q_2 is firm two's chosen quantity. Given that q_2 is in [o, a - c], q*_1 must be in [o, 1/2*(a - c)]. Since costs are symmetric, we know q_2 is in [0, 1/2*(a - c)]. Then we know q*_1 is in [1/4*(a - c), 1/2*(a - c)]. Continuing in this way, the sequence of bounds we get (factoring out a - c) is {1/2, 1/4, 3/8, 5/16, ...}; the numerators are the Jacobsthal numbers. - Michael Chirico, Sep 10 2011
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 2, 3*a(n-1) equals the number of 3-colored compositions of n with all parts greater than or equal to 2, such that no adjacent parts have the same color. - Milan Janjic, Nov 26 2011
This sequence is connected with the Collatz problem. We consider the array T(i, j) where the i-th row gives the parity trajectory of i, for example for i = 6, the infinite trajectory is 6 -> 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 -> 4 -> 2 -> 1 -> 4 -> 2 -> 1... and T(6, j) = [0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, ..., 1, 0, 0, 1, ...]. Now, we consider the sum of the digits "1" of each column. We obtain the sequence a(n) = Sum_{k = 1..2^n} T(k, n) = Sum _{k = 1..2^n} digits "1" of the n-th column. Because a(n) + a(n+1) = 2^n, then a(n+1) = Number of digits "0" among the 2^n elements of the n-th column. - Michel Lagneau, Jan 11 2012
3!*a(n-1) is apparently the trace of the n-th power of the adjacency matrix of the complete 3-graph, a 3 X 3 matrix with diagonal elements all zero and off-diagonal all ones. The off-diagonal elements for the n-th power are all equal to a(n) while each diagonal element seems to be a(n) + 1 for an even power and a(n) - 1 for an odd. These are related to the lengths of closed paths on the graph (see Delfino and Viti's paper). - Tom Copeland, Nov 06 2012
From Paul Curtz, Dec 11 2012: (Start)
2^n * a(-n) = (-1)^(n-1) * a(n), which extends the sequence to negative indices: ..., -5/16, 3/8, -1/4, 1/2, 0, 1, 1, 3, 5, ...
The "autosequence" property with respect to the binomial transform mentioned in my comment of Jan 17 2008 is still valid if the term a(-1) is added to the array of the sequence and its iterated higher-order differences in subsequent rows:
0 1/2 1/2 3/2 5/2 11/2 ...
1/2 0 1 1 3 5 ...
-1/2 1 0 2 2 6 ...
3/2 -1 2 0 4 4 ...
-5/2 3 -2 4 0 8 ...
11/2 -5 6 -4 8 0 ...
The main diagonal in this array contains 0's. (End)
Assign to a triangle T(n, 0) = 1 and T(n+1, 1) = n; T(r, c) = T(r-1, c-1) + T(r-1, c-2) + T(r-2, c-2). Then T(n+1, n) - T(n, n) = a(n). - J. M. Bergot, May 02 2013
a(n+1) counts clockwise walks on n points on a circle that take steps of length 1 and 2, return to the starting point after two full circuits, and do not duplicate any steps (USAMO 2013, problem 5). - Kiran S. Kedlaya, May 11 2013
Define an infinite square array m by m(n, 0) = m(0, n) = a(n) in top row and left column and m(i, j) = m(i, j-1) + m(i-1, j-1) otherwise, then m(n+1, n+1) = 3^(n-1). - J. M. Bergot, May 10 2013
a(n) is the number of compositions (ordered partitions) of n - 1 into one sort of 1's and two sorts of 2's. Example: the a(4) = 5 compositions of 3 are 1 + 1 + 1, 1 + 2, 1 + 2', 2 + 1 and 2' + 1. - Bob Selcoe, Jun 24 2013
Without 0, a(n)/2^n equals the probability that n will occur as a partial sum in a randomly-generated infinite sequence of 1's and 2's. The limiting ratio is 2/3. - Bob Selcoe, Jul 04 2013
Number of conjugacy classes of Z/2Z X Z/2Z in GL(2,2^(n+1)). - _Jared Warner_, Aug 18 2013
a(n) is the top left entry of the (n-1)-st power of the 3 X 3 matrix [1, 1, 1, 1, 0, 0, 1, 0, 0]. a(n) is the top left entry of the (n+1)-st power of any of the six 3 X 3 matrices [0, 1, 0; 1, 1, 1; 0, 1, 0], [0, 1, 1; 0, 1, 1; 1, 1, 0], [0, 0, 1; 1, 1, 1; 1, 1, 0], [0, 1, 1; 1, 0, 1; 0, 1, 1], [0, 0, 1; 0, 0, 1; 1, 1, 1] or [0, 1, 0; 1, 0, 1; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
This is the only integer sequence from the family of homogeneous linear recurrence of order 2 given by a(n) = k*a(n-1) + t*a(n-2) with positive integer coefficients k and t and initial values a(0) = 0 and a(1) = 1 whose ratio a(n+1)/a(n) converges to 2 as n approaches infinity. - Felix P. Muga II, Mar 14 2014
This is the Lucas sequence U(1, -2). - Felix P. Muga II, Mar 21 2014
sqrt(a(n+1) * a(n-1)) -> a(n) + 3/4 if n is even, and -> a(n) - 3/4 if n is odd, for n >= 2. - Richard R. Forberg, Jun 24 2014
a(n+1) counts closed walks on the end vertices of P_3 containing one loop at the middle vertex. a(n-1) counts closed walks on the middle vertex of P_3 containing one loop at that vertex. - David Neil McGrath, Nov 07 2014
From César Eliud Lozada, Jan 21 2015: (Start)
Let P be a point in the plane of a triangle ABC (with sides a, b, c) and barycentric coordinates P = [x:y:z]. The Complement of P with respect to ABC is defined to be Complement(P) = [b*y + c*z : c*z + a*x : a*x + b*y].
Then, for n >= 1, Complement(Complement(...(Complement(P))..)) = (n times) =
[2*a(n-1)*a*x + (2*a(n-1) - (-1)^n)*(b*y + c*z):
2*a(n-1)*b*y + (2*a(n-1) - (-1)^n)*(c*z + a*x):
2*a(n-1)*c*z + (2*a(n-1) - (-1)^n)*(a*x + b*y)]. (End)
a(n) (n >= 2) is the number of induced hypercubes of the Fibonacci cube Gamma(n-2). See p. 513 of the Klavzar reference. Example: a(5) = 11. Indeed, the Fibonacci cube Gamma(3) is <>- (cycle C(4) with a pendant edge) and the hypercubes are: 5 vertices, 5 edges, and 1 square. - Emeric Deutsch, Apr 07 2016
If the sequence of points {P_i(x_i, y_i)} on the cubic y = a*x^3 + b*x^2 + c*x + d has the property that the segment P_i(x_i, y_i) P_i+1(x_i+1, y_i+1) is always tangent to the cubic at P_i+1(x_i+1, y_i+1) then a(n) = -2^n*a/b*(x_(n+1)-(-1/2)^n*x_1). - Michael Brozinsky, Aug 01 2016
With the quantum integers defined by [n+1]_q = (q^(n+1) - q^(-n-1)) / (q - q^(-1)), the Jacobsthal numbers are a(n+1) = (-1)^n*q^n [n+1]_q with q = i * sqrt(2) for i^2 = -1, whereas the signed Mersenne numbers A000225 are given by q = sqrt(2). Cf. A239473. - Tom Copeland, Sep 05 2016
Every positive integer has a unique expression as a sum of Jacobsthal numbers in which the index of the smallest summand is odd, with a(1) and a(2) both allowed. See the L. Carlitz, R. Scoville, and V. E. Hoggatt, Jr. reference. - Ira M. Gessel, Dec 31 2016. See A280049 for these expansions. - N. J. A. Sloane, Dec 31 2016
For n > 0, a(n) equals the number of ternary words of length n-1 in which 0 and 1 avoid runs of odd lengths. - Milan Janjic, Jan 08 2017
For n > 0, a(n) equals the number of orbits of the finite group PSL(2,2^n) acting on subsets of size 4 for the 2^n+1 points of the projective line. - Paul M. Bradley, Jan 31 2017
For n > 1, number of words of length n-2 over alphabet {1,2,3} such that no odd letter is followed by an odd letter. - Armend Shabani, Feb 17 2017
Also, the decimal representation of the x-axis, from the origin to the right edge, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 678", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. See A283641. - Robert Price, Mar 12 2017
Also the number of independent vertex sets and vertex covers in the 2 X (n-2) king graph. - Eric W. Weisstein, Sep 21 2017
From César Eliud Lozada, Dec 14 2017: (Start)
Let T(0) be a triangle and let T(1) be the medial triangle of T(0), T(2) the medial triangle of T(1) and, in general, T(n) the medial triangle of T(n-1). The barycentric coordinates of the first vertex of T(n) are [2*a(n-1)/a(n), 1, 1], for n > 0.
Let S(0) be a triangle and let S(1) be the antimedial triangle of S(0), S(2) the antimedial triangle of S(1) and, in general, S(n) the antimedial triangle of S(n-1). The barycentric coordinates of the first vertex of S(n) are [-a(n+1)/a(n), 1, 1], for n > 0. (End)
a(n) is also the number of derangements in S_{n+1} with empty peak set. - Isabella Huang, Apr 01 2018
For n > 0, gcd(a(n), a(n+1)) = 1. - Kengbo Lu, Jul 27 2020
Number of 2-compositions of n+1 with 1 not allowed as a part; see Hopkins & Ouvry reference. - Brian Hopkins, Aug 17 2020
The number of Hamiltonian paths of the flower snark graph of even order 2n > 2 is 12*a(n-1). - Don Knuth, Dec 25 2020
When set S = {1, 2, ..., 2^n}, n>=0, then the largest subset T of S with the property that if x is in T, then 2*x is not in T, has a(n+1) elements. For example, for n = 4, #S = 16, a(5) = 11 with T = {1, 3, 4, 5, 7, 9, 11, 12, 13, 15, 16} (see Hassan Tarfaoui link, Concours Général 1991). - Bernard Schott, Feb 14 2022
a(n) is the number of words of length n over a binary alphabet whose position in the lexicographic order is one more than a multiple of three. a(3) = 3: aaa, abb, bba. - Alois P. Heinz, Apr 13 2022
Named by Horadam (1988) after the German mathematician Ernst Jacobsthal (1882-1965). - Amiram Eldar, Oct 02 2023
Define the sequence u(n) = (u(n-1) + u(n-2))/u(n-3) with u(0) = 0, u(1) = 1, u(2) = u(3) = -1. Then u(4*n) = -1 + (-1)^n/a(n+1), u(4*n+1) = 2 - (-1)^n/a(n+1), u(4*n+2) = u(4*n+3) = -1. For example, a(3) = 3 and u(8) = -2/3, u(9) = 5/3, u(10) = u(11) = -1. - Michael Somos, Oct 24 2023
From Miquel A. Fiol, May 25 2024: (Start)
Also, a(n) is the number of (3-color) states of a cycle (n+1)-pole C_{n+1} with n+1 terminals (or semiedges).
For instance, for n=3, the a(3)=3 states (3-coloring of the terminals) of C_4 are
a a a a a b
a a b b a b (End)
Also, with offset 1, the cogrowth sequence of the 6-element dihedral group D3. - Sean A. Irvine, Nov 04 2024
REFERENCES
Jathan Austin and Lisa Schneider, Generalized Fibonacci sequences in Pythagorean triple preserving sequences, Fib. Q., 58:1 (2020), 340-350.
Thomas Fink and Yong Mao, The 85 ways to tie a tie, Fourth Estate, London, 1999; Die 85 Methoden eine Krawatte zu binden. Hoffmann und Kampe, Hamburg, 1999.
International Mathematical Olympiad 2001, Hong Kong Preliminary Selection Contest Problem #16.
Jablan S. and Sazdanovic R., LinKnot: Knot Theory by Computer, World Scientific Press, 2007. See p. 80.
Ernst Erich Jacobsthal, Fibonaccische Polynome und Kreisteilungsgleichungen, Sitzungsber. Berliner Math. Gesell. 17 (1919-1920), 43-57.
Tanya Khovanova, "Coins and Logic", Chapter 6, The Mathematics of Various Entertaining Subjects: Volume 3 (2019), Jennifer Beineke & Jason Rosenhouse, eds. Princeton University Press, Princeton and Oxford, p. 73. ISBN: 0691182582, 978-0691182582.
Donald E. Knuth, Art of Computer Programming, Vol. 3, Sect. 5.3.1, Eq. 13.
Thomas Koshy, Fibonacci and Lucas numbers with applications, Wiley, 2001, p. 98.
Steven Roman, Introduction to Coding and Information Theory, Springer Verlag, 1996, 41-42.
P. D. Seymour and D. J. A. Welsh, Combinatorial applications of an inequality form statistical mechanics, Math. Proc. Camb. Phil. Soc. 77 (1975), 485-495. [Although Daykin et al. (1979) claim that the present sequence is studied in this article, it does not seem to be explicitly mentioned. Note that definition of log-convex in (3.1) is wrong. - N. J. A. Sloane, Dec 26 2020]
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Robert M. Young, Excursions in Calculus, MAA, 1992, p. 239
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..3316 (terms 0..500 from T. D. Noe)
M. H. Albert, M. D. Atkinson, and V. Vatter, Inflations of geometric grid classes: three case studies.
Jean-Paul Allouche, Jeffrey Shallit, Zhixiong Wen, Wen Wu, and Jiemeng Zhang, Sum-free sets generated by the period-k-folding sequences and some Sturmian sequences, arXiv:1911.01687 [math.CO], 2019.
Joerg Arndt, Matters Computational (The Fxtbook), pp.315-318.
Mohammad K. Azarian, Limit of Nested Square Roots, Problem B-664, Fibonacci Quarterly, Vol. 28, No. 2, May 1990, p. 182.
Mohammad K. Azarian, Solution to Problem B-664, Limit of Nested Square Roots, Fibonacci Quarterly, Vol. 29, No. 2, May 1991, p. 182.
Roland Bacher, Chebyshev polynomials, quadratic surds and a variation of Pascal's triangle, arXiv:1509.09054 [math.CO], 2015.
Paul Barry, On sequences with {-1, 0, 1} Hankel transforms, arXiv preprint arXiv:1205.2565 [math.CO], 2012. - From N. J. A. Sloane, Oct 18 2012
Paul Barry, A Catalan Transform and Related Transformations on Integer Sequences, Journal of Integer Sequences, Vol. 8 (2005), Article 05.4.5.
Paul Barry, On Integer-Sequence-Based Constructions of Generalized Pascal Triangles, Journal of Integer Sequences, Vol. 9 (2006), Article 06.2.4.
Paul Barry, Riordan arrays, generalized Narayana triangles, and series reversion, Linear Algebra and its Applications, 491 (2016) 343-385.
Paul Barry, Jacobsthal Decompositions of Pascal's Triangle, Ternary Trees, and Alternating Sign Matrices, Journal of Integer Sequences, 19 (2016), Article 16.3.5.
Katerina Böhmová, Cristina Dalfó, and Clemens Huemer, On cyclic Kautz digraphs, arXiv:1512.05917 [math.CO], 2015; alternative link.
Wieb Bosma, Signed bits and fast exponentiation, J. Th. Nombres de Bordeaux, 13 no. 1 (2001), p. 27-41.
Garry Bowlin and Matthew G. Brin, Coloring Planar Graphs via Colored Paths in the Associahedra, arXiv preprint arXiv:1301.3984 [math.CO], 2013. - From N. J. A. Sloane, Feb 12 2013
Rachael Boyd and Richard Hepworth, Combinatorics of injective words for Temperley-Lieb algebras, arXiv:2006.04261 [math.AT], 2020.
Henri Brocard, Propriété d'une série de triangles, Nouvelle Correspondance Mathématique, Vol. 6 (1880), 145-151.
H. Bruhn, L. Gellert, and J. Günther, Jacobsthal numbers in generalised Petersen graphs, arXiv preprint arXiv:1503.03390 [math.CO], 2015.
H. Bruhn, L. Gellert, and J. Günther, Jacobsthal numbers in generalised Petersen graphs, Electronic Notes in Discrete Math., 2015.
Isabel Cação, Helmuth R. Malonek, Maria Irene Falcão, and Graça Tomaz, Intrinsic Properties of a Non-Symmetric Number Triangle, J. Int. Seq., Vol. 26 (2023), Article 23.4.8.
L. Carlitz, R. Scoville, and V. E. Hoggatt, Jr., Representations for a special sequence, Fibonacci Quarterly 10.5 (1972), pages 499-518 and 550.
Paula Catarino, Helena Campos, and Paulo Vasco. On the Mersenne sequence. Annales Mathematicae et Informaticae, 46 (2016) pp. 37-53.
Ji Young Choi, Ternary Modified Collatz Sequences And Jacobsthal Numbers, Journal of Integer Sequences, Vol. 19 (2016), #16.7.5.
Ji Young Choi, A Generalization of Collatz Functions and Jacobsthal Numbers, J. Int. Seq., Vol. 21 (2018), Article 18.5.4.
M. H. Cilasun, An Analytical Approach to Exponent-Restricted Multiple Counting Sequences, arXiv preprint arXiv:1412.3265 [math.NT], 2014.
M. H. Cilasun, Generalized Multiple Counting Jacobsthal Sequences of Fermat Pseudoprimes, Journal of Integer Sequences, Vol. 19, 2016, #16.2.3.
Charles K. Cook and Michael R. Bacon, Some identities for Jacobsthal and Jacobsthal-Lucas numbers satisfying higher order recurrence relations, Annales Mathematicae et Informaticae, 41 (2013) pp. 27-39.
D. E. Daykin, D. J. Kleitman, and D. B. West, The number of meets between two subsets of a lattice, J. Combin. Theory, A 26 (1979), 135-156.
Gesualdo Delfino and Jacopo Viti, Potts q-color field theory and scaling random cluster model, arXiv:1104.4323 [hep-th], 2011.
Karl Dilcher and Larry Ericksen, Continued fractions and Stern polynomials. Ramanujan Journal (2017). See Table 2.
Karl Dilcher and Hayley Tomkins, Square classes and divisibility properties of Stern polynomials, Integers (2018) 18, Article #A29.
Shalosh B. Ekhad, N. J. A. Sloane, and Doron Zeilberger, Odd-Rule Cellular Automata on the Square Grid, arXiv:1503.04249 [math.CO], 2015.
Peter E. Finch, From spin to anyon notation: The XXZ Heisenberg model as a D_3 (or su(2)_4) anyon chain, arXiv preprint arXiv:1201.4470 [math-ph], 2012.
M. A. Fiol and J. Vilaltella, Some results on the structure of multipoles in the study of snarks, Electron J. Combin., 22(1) (2015), #P1.45.
M. Cetin Firengiz and A. Dil, Generalized Euler-Seidel method for second order recurrence relations, Notes on Number Theory and Discrete Mathematics, Vol. 20, 2014, No. 4, 21-32.
Darrin D. Frey and James A. Sellers, Jacobsthal Numbers and Alternating Sign Matrices, J. Integer Seqs., Vol. 3 (2000), Article 00.2.3.
Robert Frontczak and Taras Goy, Mersenne-Horadam identities using generating functions, Carpathian Math. Publ. (2020) Vol. 12, No. 1, 34-45.
E. M. García-Caballero, S. G. Moreno, and M. P. Prophet, New Viète-like infinite products of nested radicals, Fib. Q., 52 (No. 1, 2014), 27-31.
A. Goldberg and N. A. Rosenberg, Beyond 2/3 and 1/3: the complex signatures of sex-biased admixture on the X chromosome, Genetics 201 (2015), 263-279.
J. Goldwasser et al., The density of ones in Pascal's rhombus, Discrete Math., 204 (1999), 231-236.
Taras P. Goy, Jacobsthal number identities using the generalized Brioschi formula, Vasyl Stefanyk Precarpathian National University, (Ivano-Frankivsk, Ukraine, 2020).
Jonny Griffiths, The Not-on-the-line transformation, The Mathematical Gazette, 99, pp 347-352 (2015).
Martin Griffiths and Alex Bramham, The Jacobsthal Numbers: Two Results and Two Questions, Fibonacci Quart. 53 (2015), no. 2, 147-151.
Richard K. Guy, Tanya Khovanova, and Julian Salazar, Conway's subprime Fibonacci sequences, arXiv:1207.5099 [math.NT], 2012-2014.
Silvia Heubach, Tiling an m-by-n area with squares of size up to k-by-k (m<=5), preprint, published in: Congressus Numerantium 140 (1999), 43-64.
A. M. Hinz, S. Klavžar, U. Milutinović, and C. Petr, The Tower of Hanoi - Myths and Maths, Birkhäuser 2013. See page 56. Book's website.
Andreas M. Hinz and Paul K. Stockmeyer, Precious Metal Sequences and Sierpinski-Type Graphs, J. Integer Seq., Vol 25 (2022), Article 22.4.8.
Brian Hopkins and Stéphane Ouvry, Combinatorics of Multicompositions, arXiv:2008.04937 [math.CO], 2020.
Brian Hopkins, Andrew V. Sills, and Thotsaporn “AEK” Thanatipanonda, and Hua Wang, Parts and subword patterns in compositions, Preprint 2015.
A. F. Horadam, Jacobsthal and Pell Curves, Fib. Quart. 26, 79-83, 1988. [See J_n.]
A. F. Horadam, Jacobsthal Representation Numbers, Fib Quart. 34, 40-54, 1996.
Jia Huang and Erkko Lehtonen, Associative-commutative spectra for some varieties of groupoids, arXiv:2401.15786 [math.CO], 2024. See p. 17.
Dan Ismailescu, Joehyun Kim, Kelvin Kim, and Jeewoo Lee, The largest angle bisection procedure, arXiv:1908.02749 [math.MG], 2019. See p. 17.
Milan Janjić, On Linear Recurrence Equations Arising from Compositions of Positive Integers, J. Int. Seq. 18 (2015), Article 15.4.7.
Milan Janjić, Words and Linear Recurrences, J. Int. Seq. 21 (2018), Article 18.1.4.
L. Edson Jeffery, Unit-primitive matrices.
D. Jhala, G. P. S. Rathore, and K. Sisodiya, Some Properties of k-Jacobsthal Numbers with Arithmetic Indexes, Turkish Journal of Analysis and Number Theory, 2014, Vol. 2, No. 4, 119-124.
Tanya Khovanova, Coins and Logic, arXiv:1801.01143 [math.HO], 2018.
Tanya Khovanova and Konstantin Knop, Coins that Change Their Weights, arXiv:1611.09201 [math.CO], 2016.
Sandi Klavžar, Structure of Fibonacci cubes: a survey, J. Comb. Optim., 25, 2013, 505-522.
Masato Kobayashi, Weighted counting of Bruhat paths by shifted R-polynomials, arXiv:1907.11802 [math.CO], 2019.
Thomas Koshy and Ralph P. Grimaldi, Ternary words and Jacobsthal numbers, Fib. Quart., 55 (No. 2, 2017), 129-136.
Peter J. Larcombe, Julius Fergy T. Rabago, and Eric J. Fennessey, On two derivative sequences from scaled geometric mean sequence terms, Palestine Journal of Mathematics (2018) Vol. 7(2), 397-405.
Kyu-Hwan Lee and Se-jin Oh, Catalan triangle numbers and binomial coefficients, arXiv:1601.06685 [math.CO], 2016.
E. Lemmen, J. van Duivenbode, J. L. Duarte, and E. A. Lomonova, Flexible Multilevel Converters using 4-Switch Extended Commutation Cells, Emerging and Selected Topics in Power Electronics, IEEE Journal of, Volume:PP, Issue: 99, 2015.
S. L. Levine, Suppose more rabbits are born, Fib. Quart., 26 (1988), 306-311.
T. Mansour and A. Robertson, Refined restricted permutations avoiding subsets of patterns of length three, arXiv:math/0204005 [math.CO], 2002.
B. D. McKay and I. M. Wanless, A census of small latin hypercubes, SIAM J. Discrete Math. 22, (2008) 719-736.
A. Moghaddamfar and H. Tajbakhsh, More Determinant Representations for Sequences, Journal of Integer Sequences, 17 (2014), #14.5.6.
Sophie Morier-Genoud, Counting Coxeter's friezes over a finite field via moduli spaces, arXiv:1907.12790 [math.CO], 2019.
F. P. Muga II, Extending the Golden Ratio and the Binet-de Moivre Formula, March 2014; Preprint on ResearchGate.
Emanuele Munarini, A generalization of André-Jeannin's symmetric identity, Pure Mathematics and Applications (2018) Vol. 27, No. 1, 98-118.
G. Myerson and A. J. van der Poorten, Some problems concerning recurrence sequences, Amer. Math. Monthly 102 (1995), no. 8, 698-705.
S. Northshield, Stern's diatomic sequence 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, ..., Amer. Math. Monthly, 117 (2010), 581-598.
Kritkhajohn Onphaeng and Prapanpong Pongsriiam, Jacobsthal and Jacobsthal-Lucas Numbers and Sums Introduced by Jacobsthal and Tverberg, Journal of Integer Sequences, Vol. 20 (2017), Article 17.3.6.
Ahmet Öteleş, Zekeriya Y. Karatas, and Diyar O. Mustafa Zangana, Jacobsthal Numbers and Associated Hessenberg Matrices, J. Int. Seq., Vol. 21 (2018), Article 18.2.5.
D. Panario, M. Sahin, and Q. Wang, A family of Fibonacci-like conditional sequences, INTEGERS, Vol. 13, 2013, #A78.
D. Panario, M. Sahin, Q. Wang, and W. Webb, General conditional recurrences, Applied Mathematics and Computation, Volume 243, Sep 15 2014, Pages 220-231.
Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
M. Rahmani, The Akiyama-Tanigawa matrix and related combinatorial identities, Linear Algebra and its Applications 438 (2013) 219-230. - From N. J. A. Sloane, Dec 26 2012
E. Schlemm, On the expected number of successes in a sequence of nested Bernoulli trials, arXiv preprint arXiv:1303.4979 [math.PR], 2013.
A. G. Shannon and J. V. Leyendekkers, The Golden Ratio family and the Binet equation, Notes on Number Theory and Discrete Mathematics, Vol. 21, 2015, No. 2, 35-42.
N. J. A. Sloane, On the Number of ON Cells in Cellular Automata, arXiv:1503.01168 [math.CO], 2015.
Yüksel Soykan, On Summing Formulas For Generalized Fibonacci and Gaussian Generalized Fibonacci Numbers, Advances in Research (2019) Vol. 20, No. 2, 1-15, Article AIR.51824.
Yüksel Soykan, Generalized Fibonacci Numbers: Sum Formulas, Journal of Advances in Mathematics and Computer Science (2020) Vol. 35, No. 1, 89-104.
Yüksel Soykan, Closed Formulas for the Sums of Squares of Generalized Fibonacci Numbers, Asian Journal of Advanced Research and Reports (2020) Vol. 9, No. 1, 23-39, Article no. AJARR.55441.
Yüksel Soykan, Erkan Taşdemir, and İnci Okumuş, On Dual Hyperbolic Numbers With Generalized Jacobsthal Numbers Components, Zonguldak Bülent Ecevit University, (Zonguldak, Turkey, 2019).
Paul K. Stockmeyer, The Pascal Rhombus and the Stealth Configuration, arXiv:1504.04404 [math.CO], 2015.
X. Sun and V. H. Moll, The p-adic Valuations of Sequences Counting Alternating Sign Matrices, JIS 12 (2009) 09.3.8.
Hassan Tarfaoui, Concours Général 1991 - Exercice 4 (in French).
Two-Year College Math. Jnl., Review of "Jacobsthal Representation Numbers", 28 (1997), p. 76.
USA Mathematical Olympiad 2013, Problem 2 (proposed by Sam Vandervelde).
Eric Weisstein's World of Mathematics, Jacobsthal Number, Negabinary, Repunit, Rule 28.
Eric Weisstein's World of Mathematics, Independent Vertex Set.
Eric Weisstein's World of Mathematics, King Graph.
Eric Weisstein's World of Mathematics, Vertex Cover.
OEIS Wiki, Autosequence.
Abdelmoumène Zekiri, Farid Bencherif, and Rachid Boumahdi, Generalization of an Identity of Apostol, J. Int. Seq., Vol. 21 (2018), Article 18.5.1.
G. B. M. Zerr, Problem 64, American Mathematical Monthly, vol. 3, no. 12, 1896 (p. 311).
FORMULA
a(n) = 2^(n-1) - a(n-1). a(n) = 2*a(n-1) - (-1)^n = (2^n - (-1)^n)/3.
G.f.: x/(1 - x - 2*x^2) = x/((x+1)*(1-2*x)). Simon Plouffe in his 1992 dissertation
E.g.f.: (exp(2*x) - exp(-x))/3.
a(2*n) = 2*a(2*n-1)-1 for n >= 1, a(2*n+1) = 2*a(2*n)+1 for n >= 0. - Lee Hae-hwang, Oct 11 2002; corrected by Mario Catalani (mario.catalani(AT)unito.it), Dec 04 2002
Also a(n) is the coefficient of x^(n-1) in the bivariate Fibonacci polynomials F(n)(x, y) = x*F(n-1)(x, y) + y*F(n-2)(x, y), with y=2*x^2. - Mario Catalani (mario.catalani(AT)unito.it), Dec 04 2002
a(n) = Sum_{k=1..n} binomial(n, k)*(-1)^(n+k)*3^(k-1). - Paul Barry, Apr 02 2003
The ratios a(n)/2^(n-1) converge to 2/3 and every fraction after 1/2 is the arithmetic mean of the two preceding fractions. - Gary W. Adamson, Jul 05 2003
a(n) = U(n-1, i/(2*sqrt(2)))*(-i*sqrt(2))^(n-1) with i^2=-1. - Paul Barry, Nov 17 2003
a(n+1) = Sum_{k=0..ceiling(n/2)} 2^k*binomial(n-k, k). - Benoit Cloitre, Mar 06 2004
a(2*n) = A002450(n) = (4^n - 1)/3; a(2*n+1) = A007583(n) = (2^(2*n+1) + 1)/3. - Philippe Deléham, Mar 27 2004
a(n) = round(2^n/3) = (2^n + (-1)^(n-1))/3 so lim_{n->infinity} 2^n/a(n) = 3. - Gerald McGarvey, Jul 21 2004
a(n) = Sum_{k=0..n-1} (-1)^k*2^(n-k-1) = Sum_{k=0..n-1}, 2^k*(-1)^(n-k-1). - Paul Barry, Jul 30 2004
a(n+1) = Sum_{k=0..n} binomial(k, n-k)*2^(n-k). - Paul Barry, Oct 07 2004
a(n) = Sum_{k=0..n-1} W(n-k, k)*(-1)^(n-k)*binomial(2*k,k), W(n, k) as in A004070. - Paul Barry, Dec 17 2004
From Paul Barry, Jan 17 2005: (Start)
a(n) = Sum_{k=0..n} k*binomial(n-1, (n-k)/2)*(1+(-1)^(n+k))*floor((2*k+1)/3).
a(n+1) = Sum_{k=0..n} k*binomial(n-1, (n-k)/2)*(1+(-1)^(n+k))*(A042965(k)+0^k). (End)
From Paul Barry, Jan 17 2005: (Start)
a(n+1) = ceiling(2^n/3) + floor(2^n/3) = (ceiling(2^n/3))^2 - (floor(2^n/3))^2.
a(n+1) = A005578(n) + A000975(n-1) = A005578(n)^2 - A000975(n-1)^2. (End)
a(n+1) = Sum_{k=0..n} Sum_{j=0..n} (-1)^(n-j)*binomial(j, k). - Paul Barry, Jan 26 2005
Let M = [1, 1, 0; 1, 0, 1; 0, 1, 1], then a(n) = (M^n)[2, 1], also matrix characteristic polynomial x^3 - 2*x^2 - x + 2 defines the three-step recursion a(0)=0, a(1)=1, a(2)=1, a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n > 2. - Lambert Klasen (lambert.klasen(AT)gmx.net), Jan 28 2005
a(n) = ceiling(2^(n+1)/3) - ceiling(2^n/3) = A005578(n+1) - A005578(n). - Paul Barry, Oct 08 2005
a(n) = floor(2^(n+1)/3) - floor(2^n/3) = A000975(n) - A000975(n-1). - Paul Barry, Oct 08 2005
From Paul Barry, Feb 20 2003: (Start)
a(n) = Sum_{k=0..floor(n/3)} binomial(n, f(n-1)+3*k);
a(n) = Sum_{k=0..floor(n/3)} binomial(n, f(n-2)+3*k), where f(n)=A080425(n). (End)
From Miklos Kristof, Mar 07 2007: (Start)
a(2*n) = (1/3)*Product_{d|n} cyclotomic(d,4).
a(2*n+1) = (1/3)*Product_{d|2*n+1} cyclotomic(2*d,2). (End)
From Hieronymus Fischer, Apr 23 2007: (Start)
The a(n) are closely related to nested square roots; this is 2*sin(2^(-n)*Pi/2*a(n)) = sqrt(2-sqrt(2-sqrt(2-sqrt(...sqrt(2)))...) {with the '2' n times, n >= 0}.
Also 2*cos(2^(-n)*Pi*a(n)) = sqrt(2-sqrt(2-sqrt(2-sqrt(...sqrt(2)))...) {with the '2' n-1 times, n >= 1} as well as
2*sin(2^(-n)*3/2*Pi*a(n)) = sqrt(2+sqrt(2+sqrt(2+sqrt(...sqrt(2)))...) {with the '2' n times, n >= 0} and
2*cos(2^(-n)*3*Pi*a(n)) = -sqrt(2+sqrt(2+sqrt(2+sqrt(...sqrt(2)))...) {with the '2' n-1 times, n >= 1}.
a(n) = 2^(n+1)/Pi*arcsin(b(n+1)/2) where b(n) is defined recursively by b(0)=2, b(n)=sqrt(2-b(n-1)).
There is a similar formula regarding the arccos function, this is a(n) = 2^n/Pi*arccos(b(n)/2).
With respect to the sequence c(n) defined recursively by c(0)=-2, c(n)=sqrt(2+c(n-1)), the following formulas hold true: a(n) = 2^n/3*(1-(-1)^n*(1-2/Pi*arcsin(c(n+1)/2))); a(n) = 2^n/3*(1-(-1)^n*(1-1/Pi*arccos(-c(n)/2))).
(End)
Sum_{k=0..n} A039599(n,k)*a(k) = A049027(n), for n >= 1. - Philippe Deléham, Jun 10 2007
Sum_{k=0..n} A039599(n,k)*a(k+1) = A067336(n). - Philippe Deléham, Jun 10 2007
Let T = the 3 X 3 matrix [1,1,0; 1,0,1; 0,1,1]. Then T^n * [1,0,0,] = [A005578(n), a(n), A000975(n-1)]. - Gary W. Adamson, Dec 24 2007
a(n) + a(n+5) = 11*2^n. - Paul Curtz, Jan 17 2008
a(n) = Sum_{k=1..n} K(2, k)*a(n - k), where K(n,k) = k if 0 <= k <= n and K(n,k)=0 otherwise. (When using such a K-coefficient, several different arguments to K or several different definitions of K may lead to the same integer sequence. For example, the Fibonacci sequence can be generated in several ways using the K-coefficient.) - Thomas Wieder, Jan 13 2008
a(n) + a(n+2*k+1) = a(2*k+1)*2^n. - Paul Curtz, Feb 12 2008
a(n) = lower left term in the 2 X 2 matrix [0,2; 1,1]^n. - Gary W. Adamson, Mar 02 2008
a(n+1) = Sum_{k=0..n} A109466(n,k)*(-2)^(n-k). -Philippe Deléham, Oct 26 2008
a(n) = sqrt(8*a(n-1)*a(n-2) + 1). E.g., sqrt(3*5*8+1) = 11, sqrt(5*11*8+1) = 21. - Giuseppe Ottonello, Jun 14 2009
Let p[i] = Fibonacci(i-1) and let A be the Hessenberg matrix of order n defined by: A[i,j] = p[j-i+1], (i <= j), A[i,j] = -1, (i = j+1), and A[i,j] = 0 otherwise. Then, for n >= 1, a(n-1) = det(A). - Milan Janjic, May 08 2010
a(p-1) = p*A007663(n)/3 if n > 1, and a(p-1) = p*A096060(n) if n > 2, with p=prime(n). - Jonathan Sondow, Jul 19 2010
Algebraically equivalent to replacing the 5's with 9's in the explicit (Binet) formula for the n-th term in the Fibonacci sequence: The formula for the n-th term in the Fibonacci sequence is F(n) = ((1+sqrt(5))^n - (1-sqrt(5))^n)/(2^n*sqrt(5)). Replacing the 5's with 9's gives ((1+sqrt(9))^n - (1-sqrt(9))^n)/(2^n*sqrt(9)) = (2^n+(-1)^(n+1))/3 = (2^n-(-1)^(n))/3 = a(n). - Jeffrey R. Goodwin, May 27 2011
For n > 1, a(n) = A000975(n-1) + (1 + (-1)^(n-1))/2. - Vladimir Shevelev, Feb 27 2012
From Sergei N. Gladkovskii, Jun 12 2012: (Start)
G.f.: x/(1-x-2*x^2) = G(0)/3; G(k) = 1 - ((-1)^k)/(2^k - 2*x*4^k/(2*x*2^k - ((-1)^k)/G(k+1))); (continued fraction 3 kind, 3-step).
E.g.f.: G(0)/3; G(k) = 1 - ((-1)^k)/(2^k - 2*x*4^k/(2*x*2^k - ((-1)^k)*(k+1)/G(k+1))); (continued fraction 3rd kind, 3-step). (End)
a(n) = 2^k * a(n-k) + (-1)^(n+k)*a(k). - Paul Curtz, Jean-François Alcover, Dec 11 2012
a(n) = sqrt((A014551(n))^2 + (-1)^(n-1)*2^(n+2))/3. - Vladimir Shevelev, Mar 13 2013
G.f.: Q(0)/3, where Q(k) = 1 - 1/(4^k - 2*x*16^k/(2*x*4^k - 1/(1 + 1/(2*4^k - 8*x*16^k/(4*x*4^k + 1/Q(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, May 21 2013
G.f.: Q(0)*x/2, where Q(k) = 1 + 1/(1 - x*(2*k+1 + 2*x)/( x*(2*k+2 + 2*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 29 2013
G.f.: Q(0) -1, where Q(k) = 1 + 2*x^2 + (k+2)*x - x*(k+1 + 2*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 06 2013
a(n+2) = Sum_{k=0..n} A108561(n,k)*(-2)^k. - Philippe Deléham, Nov 17 2013
a(n) = (Sum_{k=1..n, k odd} C(n,k)*3^(k-1))/2^(n-1). - Vladimir Shevelev, Feb 05 2014
a(-n) = -(-1)^n * a(n) / 2^n for all n in Z. - Michael Somos, Mar 18 2014
a(n) = (-1)^(n-1)*Sum_{k=0..n-1} A135278(n-1,k)*(-3)^k = (2^n - (-1)^n)/3 = (-1)^(n-1)*Sum_{k=0..n-1} (-2)^k. Equals (-1)^(n-1)*Phi(n,-2), where Phi is the cyclotomic polynomial when n is an odd prime. (For n > 0.) - Tom Copeland, Apr 14 2014
From Peter Bala, Apr 06 2015: (Start)
a(2*n)/a(n) = A014551(n) for n >= 1; a(3*n)/a(n) = 3*A245489(n) for n >= 1.
exp( Sum_{n >= 1} a(2*n)/a(n)*x^n/n ) = Sum_{n >= 0} a(n+1)*x^n.
exp( Sum_{n >= 1} a(3*n)/a(n)*x^n/n ) = Sum_{n >= 0} A084175(n+1)*x^n.
exp( Sum_{n >= 1} a(4*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015266(n+3)*(-x)^n.
exp( Sum_{n >= 1} a(5*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015287(n+4)*x^n.
exp( Sum_{n >= 1} a(6*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015305(n+5)*(-x)^n.
exp( Sum_{n >= 1} a(7*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015323(n+6)*x^n.
exp( Sum_{n >= 1} a(8*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015338(n+7)*(-x)^n.
exp( Sum_{n >= 1} a(9*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015356(n+8)*x^n.
exp( Sum_{n >= 1} a(10*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015371(n+9)*(-x)^n. (End)
a(n) = (1-(-1)^n)/2 + floor((2^n)/3). - Reiner Moewald, Jun 05 2015
a(n+k)^2 - A014551(k)*a(n)*a(n+k) + (-2)^k*a(n)^2 = (-2)^n*a(k)^2, for n >= 0 and k >= 0. - Alexander Samokrutov, Jul 21 2015
Dirichlet g.f.: (PolyLog(s,2) + (1 - 2^(1-s))*zeta(s))/3. - Ilya Gutkovskiy, Jun 27 2016
From Yuchun Ji, Apr 08 2018: (Start)
a(m)*a(n) + a(m-1)*a(n-1) - 2*a(m-2)*a(n-2) = 2^(m+n-3).
a(m+n-1) = a(m)*a(n) + 2*a(m-1)*a(n-1); a(m+n) = a(m+1)*a(n+1) - 4*a(m-1)*a(n-1).
a(2*n-1) = a(n)^2 + 2*a(n-1)^2; a(2*n) = a(n+1)^2 - 4*a(n-1)^2. (End)
a(n+4) = a(n) + 5*2^n, a(0) = 0, a(1..4) = [1,1,3,5]. That is to say, for n > 0, the ones digits of Jacobsthal numbers follow the pattern 1,1,3,5,1,1,3,5,1,1,3,5,.... - Yuchun Ji, Apr 25 2019
a(n) mod 10 = A091084(n). - Alois P. Heinz, Apr 25 2019
The sequence starting with "1" is the second INVERT transform of (1, -1, 3, -5, 11, -21, 43, ...). - Gary W. Adamson, Jul 08 2019
From Kai Wang, Jan 14 2020: (Start)
a(n)^2 - a(n+1)*a(n-1) = (-2)^(n-1).
a(n)^2 - a(n+r)*a(n-r) = (-2)^(n-r)*a(r)^2.
a(m)*a(n+1) - a(m+1)*a(n) = (-2)^n*a(m-n).
a(m-n) = (-1)^n*(a(m)*A014551(n) - A014551(m)*a(n))/(2^(n+1)).
a(m+n) = (a(m)*A014551(n) + A014551(m)*a(n))/2.
A014551(n)^2 - A014551(n+r)*A014551(n-r) = 9*(-1)^(n-r-1)*2^(n-r)*a(r)^2 .
A014551(m)*A014551(n+1) - A014551(m+1)*A014551(n) = 9*(-1)^(n-1)*2^(n)*a(m-n).
A014551(m-n) = (-1)^(n)*(A014551(m)*A014551(n) - 9*a(m)*a(n))/2^(n+1).
A014551(m+n) = (A014551(m)*A014551(n) + 9*a(m)*a(n))/2.
a(n) = Sum_{i=0..n-1; j=0..n-1; i+2*j=n-1} 2^j*((i+j)!/(i!*j!)). (End)
For n > 0, 1/(2*a(n+1)) = Sum_{m>=n} a(m)/(a(m+1)*a(m+2)). - Kai Wang, Mar 03 2020
For 4 > h >= 0, k >= 0, a(4*k+h) mod 5 = a(h) mod 5. - Kai Wang, May 07 2020
From Kengbo Lu, Jul 27 2020: (Start)
a(n) = 1 + Sum_{k=0..n-1} a(k) if n odd; a(n) = Sum_{k=0..n-1} a(k) if n even.
a(n) = F(n) + Sum_{k=0..n-2} a(k)*F(n-k-1), where F denotes the Fibonacci numbers.
a(n) = b(n) + Sum_{k=0..n-1} a(k)*b(n-k), where b(n) is defined through b(0) = 0, b(1) = 1, b(n) = 2*b(n-2).
a(n) = 1 + 2*Sum_{k=0..n-2} a(k).
a(m+n) = a(m)*a(n+1) + 2*a(m-1)*a(n).
a(2*n) = Sum_{i>=0, j>=0} binomial(n-j-1,i)*binomial(n-i-1,j)*2^(i+j). (End)
G.f.: x/(1 - x - 2*x^2) = Sum_{n >= 0} x^(n+1) * Product_{k = 1..n} (k + 2*x)/(1 + k*x) (a telescoping series). - Peter Bala, May 08 2024
a(n) = Sum_{r>=0} F(n-2r, r), where F(n, 0) is the n-th Fibonacci number and F(n,r) = Sum_{j=1..n} F(n+1-j, r-1) F(j, r-1). - Gregory L. Simay, Aug 31 2024
EXAMPLE
a(2) = 3 because the tiling of the 3 X 2 rectangle has either only 1 X 1 tiles, or one 2 X 2 tile in one of two positions (together with two 1 X 1 tiles).
From Joerg Arndt, Nov 10 2012: (Start)
The a(6)=21 length-5 ternary words with no two consecutive letters nonzero are (dots for 0's)
[ 1] [ . . . . ]
[ 2] [ . . . 1 ]
[ 3] [ . . . 2 ]
[ 4] [ . . 1 . ]
[ 5] [ . . 2 . ]
[ 6] [ . 1 . . ]
[ 7] [ . 1 . 1 ]
[ 8] [ . 1 . 2 ]
[ 9] [ . 2 . . ]
[10] [ . 2 . 1 ]
[11] [ . 2 . 2 ]
[12] [ 1 . . . ]
[13] [ 1 . . 1 ]
[14] [ 1 . . 2 ]
[15] [ 1 . 1 . ]
[16] [ 1 . 2 . ]
[17] [ 2 . . . ]
[18] [ 2 . . 1 ]
[19] [ 2 . . 2 ]
[20] [ 2 . 1 . ]
[21] [ 2 . 2 . ]
(End)
G.f. = x + x^2 + 3*x^3 + 5*x^4 + 11*x^5 + 21*x^6 + 43*x^7 + 85*x^8 + 171*x^9 + ...
MAPLE
A001045 := proc(n)
(2^n-(-1)^n)/3 ;
end proc: # R. J. Mathar, Dec 18 2012
MATHEMATICA
Jacob0[n_] := (2^n - (-1)^n)/3; Table[Jacob0[n], {n, 0, 33}] (* Robert G. Wilson v, Dec 05 2005 *)
Array[(2^# - (-1)^#)/3 &, 33, 0] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *)
LinearRecurrence[{1, 2}, {0, 1}, 40] (* Harvey P. Dale, Nov 30 2011 *)
CoefficientList[Series[x/(1 - x - 2 x^2), {x, 0, 34}], x] (* Robert G. Wilson v, Jul 21 2015 *)
Table[(2^n - (-1)^n)/3, {n, 0, 20}] (* Eric W. Weisstein, Sep 21 2017 *)
Table[Abs[QBinomial[n, 1, -2]], {n, 0, 35}] (* John Keith, Jan 29 2022 *)
PROG
(PARI) a(n) = (2^n - (-1)^n) / 3
(PARI) M=[1, 1, 0; 1, 0, 1; 0, 1, 1]; for(i=0, 34, print1((M^i)[2, 1], ", ")) \\ Lambert Klasen (lambert.klasen(AT)gmx.net), Jan 28 2005
(Sage) [lucas_number1(n, 1, -2) for n in range(34)] # Zerinvary Lajos, Apr 22 2009
# Alternatively:
a = BinaryRecurrenceSequence(1, 2)
[a(n) for n in (0..34)] # Peter Luschny, Aug 29 2016
(Haskell)
a001045 = (`div` 3) . (+ 1) . a000079
a001045_list = 0 : 1 :
zipWith (+) (map (2 *) a001045_list) (tail a001045_list)
-- Reinhard Zumkeller, Mar 24 2013, Jan 05 2012, Feb 05 2011
(Maxima)
a[0]:0$
a[n]:=2^(n-1)-a[n-1]$
A001045(n):=a[n]$
makelist(A001045(n), n, 0, 30); /* Martin Ettl, Nov 05 2012 */
(PARI) a=0; for(n=0, 34, print1(a, ", "); a=2*(a-n%2)+1) \\ K. Spage, Aug 22 2014
(Python) # A001045.py
def A001045():
a, b = 0, 1
while True:
yield a
a, b = b, b+2*a
sequence = A001045()
[next(sequence) for i in range(20)] # David Radcliffe, Jun 26 2016
(Magma) [n le 2 select n-1 else Self(n-1)+2*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Jun 27 2016
(Python) [(2**n-(-1)**n)//3 for n in range(40)] # Gennady Eremin, Mar 03 2022
CROSSREFS
Partial sums of this sequence give A000975, where there are additional comments from B. E. Williams and Bill Blewett on the tie problem.
A002487(a(n)) = A000045(n).
Row sums of A059260, A156667 and A134317. Equals A026644(n-2)+1 for n > 1.
a(n) = A073370(n-1, 0), n >= 1 (first column of triangle).
Cf. A266508 (binary), A081857 (base 4), A147612 (characteristic function).
Cf. A049883 = primes in this sequence, A107036 = indices of primes, A129738.
Cf. A091084 (mod 10), A239473, A280049.
Bisections: A002450, A007583.
Cf. A077925 (signed version).
KEYWORD
nonn,nice,easy,core
EXTENSIONS
Thanks to Don Knuth, who pointed out several missing references, including Brocard (1880), which although it was mentioned in the 1973 Handbook of Integer Sequences, was omitted from the 1995 "Encyclopedia". - N. J. A. Sloane, Dec 26 2020
STATUS
approved
Stern's diatomic series (or Stern-Brocot sequence): a(0) = 0, a(1) = 1; for n > 0: a(2*n) = a(n), a(2*n+1) = a(n) + a(n+1).
(Formerly M0141 N0056)
+10
378
0, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 1, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5, 1, 6, 5, 9, 4, 11, 7, 10, 3, 11, 8, 13, 5, 12, 7, 9, 2, 9, 7, 12, 5, 13, 8, 11, 3, 10, 7, 11, 4, 9, 5, 6, 1, 7, 6, 11, 5, 14, 9, 13, 4, 15, 11, 18, 7, 17, 10, 13, 3, 14, 11, 19, 8, 21, 13, 18, 5, 17, 12, 19
OFFSET
0,4
COMMENTS
Also called fusc(n) [Dijkstra].
a(n)/a(n+1) runs through all the reduced nonnegative rationals exactly once [Stern; Calkin and Wilf].
If the terms are written as an array:
column 0 1 2 3 4 5 6 7 8 9 ...
row 0: 0
row 1: 1
row 2: 1,2
row 3: 1,3,2,3
row 4: 1,4,3,5,2,5,3,4
row 5: 1,5,4,7,3,8,5,7,2,7,5,8,3,7,4,5
row 6: 1,6,5,9,4,11,7,10,3,11,8,13,5,12,7,9,2,9,7,12,5,13,8,11,3,10,...
...
then (ignoring row 0) the sum of the k-th row is 3^(k-1), each column is an arithmetic progression and the steps are nothing but the original sequence. - Takashi Tokita (butaneko(AT)fa2.so-net.ne.jp), Mar 08 2003
From N. J. A. Sloane, Oct 15 2017: (Start)
The above observation can be made more precise. Let A(n,k), n >= 0, 0 <= k <= 2^(n-1)-1 for k > 0, denote the entry in row n and column k of the left-justified array above.
The equations for columns 0,1,2,3,4,... are successively (ignoring row 0):
1 (n >= 1),
n (n >= 2),
n-1 (n >= 3),
2n-3 (n >= 3),
n-2 (n >= 4),
3n-7 (n >= 4),
...
and in general column k > 0 is given by
A(n,k) = a(k)*n - A156140(k) for n >= ceiling(log_2(k+1))+1, and 0 otherwise.
(End)
a(n) is the number of odd Stirling numbers S_2(n+1, 2r+1) [Carlitz].
Moshe Newman proved that the fraction a(n+1)/a(n+2) can be generated from the previous fraction a(n)/a(n+1) = x by 1/(2*floor(x) + 1 - x). The successor function f(x) = 1/(floor(x) + 1 - frac(x)) can also be used.
a(n+1) = number of alternating bit sets in n [Finch].
If f(x) = 1/(1 + floor(x) - frac(x)) then f(a(n-1)/a(n)) = a(n)/a(n+1) for n >= 1. If T(x) = -1/x and f(x) = y, then f(T(y)) = T(x) for x > 0. - Michael Somos, Sep 03 2006
a(n+1) is the number of ways of writing n as a sum of powers of 2, each power being used at most twice (the number of hyperbinary representations of n) [Carlitz; Lind].
a(n+1) is the number of partitions of the n-th integer expressible as the sum of distinct even-subscripted Fibonacci numbers (= A054204(n)), into sums of distinct Fibonacci numbers [Bicknell-Johnson, theorem 2.1].
a(n+1) is the number of odd binomial(n-k, k), 0 <= 2*k <= n. [Carlitz], corrected by Alessandro De Luca, Jun 11 2014
a(2^k) = 1. a(3*2^k) = a(2^(k+1) + 2^k) = 2. Sequences of terms between a(2^k) = 1 and a(2^(k+1)) = 1 are palindromes of length 2^k-1 with a(2^k + 2^(k-1)) = 2 in the middle. a(2^(k-1) + 1) = a(2^k - 1) = k+1 for k > 1. - Alexander Adamchuk, Oct 10 2006
The coefficients of the inverse of the g.f. of this sequence form A073469 and are related to binary partitions A000123. - Philippe Flajolet, Sep 06 2008
It appears that the terms of this sequence are the number of odd entries in the diagonals of Pascal's triangle at 45 degrees slope. - Javier Torres (adaycalledzero(AT)hotmail.com), Aug 06 2009
Let M be an infinite lower triangular matrix with (1, 1, 1, 0, 0, 0, ...) in every column shifted down twice:
1;
1, 0;
1, 1, 0;
0, 1, 0, 0;
0, 1, 1, 0, 0;
0, 0, 1, 0, 0, 0;
0, 0, 1, 1, 0, 0, 0;
...
Then this sequence A002487 (without initial 0) is the first column of lim_{n->oo} M^n. (Cf. A026741.) - Gary W. Adamson, Dec 11 2009 [Edited by M. F. Hasler, Feb 12 2017]
Member of the infinite family of sequences of the form a(n) = a(2*n); a(2*n+1) = r*a(n) + a(n+1), r = 1 for A002487 = row 1 in the array of A178239. - Gary W. Adamson, May 23 2010
Equals row 1 in an infinite array shown in A178568, sequences of the form
a(2*n) = r*a(n), a(2*n+1) = a(n) + a(n+1); r = 1. - Gary W. Adamson, May 29 2010
Row sums of A125184, the Stern polynomials. Equivalently, B(n,1), the n-th Stern polynomial evaluated at x = 1. - T. D. Noe, Feb 28 2011
The Kn1y and Kn2y triangle sums, see A180662 for their definitions, of A047999 lead to the sequence given above, e.g., Kn11(n) = A002487(n+1) - A000004(n), Kn12(n) = A002487(n+3) - A000012(n), Kn13(n) = A002487(n+5) - A000034(n+1) and Kn14(n) = A002487(n+7) - A157810(n+1). For the general case of the knight triangle sums see the Stern-Sierpiński triangle A191372. This triangle not only leads to Stern's diatomic series but also to snippets of this sequence and, quite surprisingly, their reverse. - Johannes W. Meijer, Jun 05 2011
Maximum of terms between a(2^k) = 1 and a(2^(k+1)) = 1 is the Fibonacci number F(k+2). - Leonid Bedratyuk, Jul 04 2012
Probably the number of different entries per antidiagonal of A223541. That would mean there are exactly a(n+1) numbers that can be expressed as a nim-product 2^x*2^y with x + y = n. - Tilman Piesk, Mar 27 2013
Let f(m,n) be the frequency of the integer n in the interval [a(2^(m-1)), a(2^m-1)]. Let phi(n) be Euler's totient function (A000010). Conjecture: for all integers m,n n<=m f(m,n) = phi(n). - Yosu Yurramendi, Sep 08 2014
Back in May 1995, it was proved that A000360 is the modulo 3 mapping, (+1,-1,+0)/2, of this sequence A002487 (without initial 0). - M. Jeremie Lafitte (Levitas), Apr 24 2017
Define a sequence chf(n) of Christoffel words over an alphabet {-,+}: chf(1) = '-'; chf(2*n+0) = negate(chf(n)); chf(2*n+1) = negate(concatenate(chf(n),chf(n+1))). Then the length of the chf(n) word is fusc(n) = a(n); the number of '-'-signs in the chf(n) word is c-fusc(n) = A287729(n); the number of '+'-signs in the chf(n) word is s-fusc(n) = A287730(n). See examples below. - I. V. Serov, Jun 01 2017
The sequence can be extended so that a(n) = a(-n), a(2*n) = a(n), a(2*n+1) = a(n) + a(n+1) for all n in Z. - Michael Somos, Jun 25 2019
Named after the German mathematician Moritz Abraham Stern (1807-1894), and sometimes also after the French clockmaker and amateur mathematician Achille Brocot (1817-1878). - Amiram Eldar, Jun 06 2021
It appears that a(n) is equal to the multiplicative inverse of A007305(n+1) mod A007306(n+1). For example, a(12) is 2, the multiplicative inverse of A007305(13) mod A007306(13), where A007305(13) is 4 and A007306(13) is 7. - Gary W. Adamson, Dec 18 2023
REFERENCES
M. Aigner and G. M. Ziegler, Proofs from THE BOOK, 3rd ed., Berlin, Heidelberg, New York: Springer-Verlag, 2004, p. 97.
Elwyn R. Berlekamp, John H. Conway and Richard K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 114.
Krishna Dasaratha, Laure Flapan, Chansoo Lee, Cornelia Mihaila, Nicholas Neumann-Chun, Sarah Peluse and Matthew Stroegeny, A family of multi-dimensional continued fraction Stern sequences, Abtracts Amer. Math. Soc., Vol. 33 (#1, 2012), #1077-05-2543.
Edsger W. Dijkstra, Selected Writings on Computing, Springer, 1982, p. 232 (sequence is called fusc).
F. G. M. Eisenstein, Eine neue Gattung zahlentheoretischer Funktionen, welche von zwei Elementen abhaengen und durch gewisse lineare Funktional-Gleichungen definirt werden, Verhandlungen der Koenigl. Preuss. Akademie der Wiss. Berlin (1850), pp. 36-42, Feb 18, 1850. Werke, II, pp. 705-711.
Graham Everest, Alf van der Poorten, Igor Shparlinski and Thomas Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 2.16.3; pp. 148-149.
Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 117.
Thomas Koshy, Fibonacci and Lucas numbers with applications, Wiley, 2001, p. 98.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Boris Adamczewski, Non-converging continued fractions related to the Stern diatomic sequence, Acta Arithm. 142 (1) (2010) 67-78.
Jean-Paul Allouche and Michel Mendès France, Lacunary formal power series and the Stern-Brocot sequence, arXiv preprint arXiv:1202.0211 [math.NT], 2012-2013. - N. J. A. Sloane, May 10 2012
Jean-Paul Allouche, On the Stern sequence and its twisted version, arXiv preprint arXiv:1202.4171 [math.NT], 2012.
Jean-Paul Allouche, Michel Mendès France, Anna Lubiw, Alfred J. van der Poorten and Jeffrey Shallit, Convergents of folded continued fractions.
Jean-Paul Allouche and Jeffrey Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197. [Preprint.]
Jean-Paul Allouche and Jeffrey Shallit, The ring of k-regular sequences, II, Theoret. Computer Sci., 307 (2003), 3-29. [Preprint.]
Michael Baake and Michael Coons, A natural probability measure derived from Stern's diatomic sequence, arXiv:1706.00187 [math.NT], 2017.
Roland Bacher, Twisting the Stern sequence, arXiv:1005.5627 [math.CO], 2010.
Bruce Bates, Martin Bunder and Keith Tognetti, Linking the Calkin-Wilf and Stern-Brocot trees, Eur. J. Comb., Vol. 31, No. 7 (2010), pp. 1637-1661.
Bruce Bates and Toufik Mansour, The q-Calkin-Wilf tree, Journal of Combinatorial Theory Series A, Vol. 118, No. 3 (2011), pp. 1143-1151.
Marjorie Bicknell-Johnson, Stern's Diatomic Array Applied to Fibonacci Representations, Fibonacci Quarterly, Vol. 41 (2003), pp. 169-180.
Richard P. Brent, Michael Coons and Wadim Zudilin, Asymptotics of a Mahler Function, Slides of talk presented at AustMS/NZMS 2014, Melbourne, 8 December 2014.
Neil Calkin and Herbert S. Wilf, Recounting the rationals, Amer. Math. Monthly, Vol. 107, No. 4 (2000), pp. 360-363.
L. Carlitz, A problem in partitions related to the Stirling numbers, Bull. Amer. Math. Soc., Vol. 70, No. 2 (1964), pp. 275-278. [Abstract.]
L. Carlitz, A problem in partitions related to the Stirling numbers, Riv. Mat. Univ. Parma, (2) 5 (1964), 61-75.
Michael Coons, The transcendence of series related to Stern's diatomic sequence, International Journal of Number Theory 6.01 (2010): 211-217.
Michael Coons, On some conjectures concerning Stern's sequence and its twist, Integers 11.6 (2011): 775-789.
Michael Coons, A Correlation Identity for Stern's Sequence, Integers 12.3 (2012): 459-464.
Michael Coons and Jeffrey Shallit, A pattern sequence approach to Stern's sequence, Discrete Math., Vol. 311 (2011), pp. 2630-2633.
Michael Coons and Jason Tyler, The maximal order of Stern's diatomic sequence, arXiv:1307.1521 [math.NT], 2013-2014.
Kevin M. Courtright and James A. Sellers, Arithmetic Properties for Hyper m-ary Partitions, INTEGERS, Vol. 4 (2004), Article A6.
Valerio De Angelis, The Stern diatomic sequence via generalized Chebyshev polynomials, American Mathematical Monthly 124.5 (2017): 451-455. See also, arXiv:1511.02422 [math.NT], 2015.
Philip de Castro et al., Counting binomial coefficients divisible by a prime power, Amer. Math. Monthly, Vol. 125, No. 6 (2018), pp. 531-540. See Table p. 534.
Colin Defant, Upper Bounds for Stern's Diatomic Sequence and Related Sequences, Electronic Journal of Combinatorics, Vol. 23, No. 4 (2016), #P4.8.
Georges De Rham, Un peu de mathématiques à propos d'une courbe plane, Elemente der Math., Vol. 2 (1947), pp. 73-76 and 89-97.
Marc Deléglise, Paul Erdős and Jean-Louis Nicolas, Sur les ensembles représentés par les partitions d'un entier n [Sets represented by partitions of an integer n] Paul Erdős memorial collection. Discrete Math., Vol. 200, No. 1-3 (1999), pp. 27-48. MR1692277 (2000e:05012). See Table 1. N. J. A. Sloane, Mar 18 2012
Edsger W. Dijkstra, More about the function "fusc".
Karl Dilcher and Larry Ericksen, Hyperbinary expansions and Stern polynomials, Elec. J. Combin, Vol. 22 (2015), #P2.24.
Karl Dilcher and Larry Ericksen, Factors and irreducibility of generalized Stern polynomials, Integers, Vol. 15 (2015), #A50.
Karl Dilcher and Larry Ericksen, Continued fractions and Stern polynomials, Ramanujan Journal, Vol. 45 (2017), pp. 659-681.
Karl Dilcher and Larry Ericksen, Polynomials Characterizing Hyper b-ary Representations, J. Int. Seq., Vol. 21 (2018), Article 18.4.3.
Karl Dilcher and Larry Ericksen, Polynomial Analogues of Restricted b-ary Partition Functions, J. Int. Seq., Vol. 22 (2019), Article 19.3.2.
Tom Edgar, On the number of hyper m-ary partitions, Integers, Vol. 18 (2018), Article #A47.
De-Jun Feng, Pierre Liardet and Alain Thomas, Partition functions in numeration systems with bounded multiplicity, Uniform Distribution Theory, Vol. 9, No. 1 (2014).
Steven R. Finch, P. Sebah and Z.-Q. Bai, Odd Entries in Pascal's Trinomial Triangle, arXiv:0802.2654 [math.NT], 2008.
Aviezri S. Fraenkel, Ratwyt, Dec 28 2011.
Thomas Garrity, A multi-dimensional continued fraction generalization of Stern's diatomic sequence, arXiv:1206.6685 [math.CO], 2012-2013.
Thomas Garrity, A multi-dimensional continued fraction generalization of Stern's diatomic sequence, Journal of Integer Sequences, Vol. 16 (2013), #13.7.7.
Jose Grimm, Implementation of Bourbaki's Elements of Mathematics in Coq: Part Two, From Natural Numbers to Real Numbers, Journal of Formalized Reasoning, Vol. 9, No. 2 (2016), pp. 1-52; see p. 38.
Brian Hayes, On the Teeth of Wheels, American Scientist, Vol. 88, No. 4 (July-August 2000), pp. 296-300 (5 pages).
Andreas M. Hinz, Sandi Klavžar, Uroš Milutinović and Ciril Petr,, The Tower of Hanoi - Myths and Maths, Birkhäuser 2013. See page 115. Book's website
Andreas M. Hinz, Sandi Klavžar, Uroš Milutinović, Daniele Parisse and Ciril Petr, Metric properties of the Tower of Hanoi graphs and Stern's diatomic sequence European J. Combin., Vol. 26, No. 5 (2005), pp. 693-708.
Donald E. Knuth, C. P. Rupert, Alex Smith and Richard Stong, Recounting the Rationals, Continued: 10906, solution by Moshe Newman, American Mathematical Monthly, Vol. 110, No. 7 (2003), pp. 642-643.
Jennifer Lansing, Distribution of Values of the Binomial Coefficients and the Stern Sequence, Journal of Integer Sequences, Vol. 16 (2013), Article 13.3.7.
Jennifer Lansing, Largest Values for the Stern Sequence, Journal of Integer Sequences, Vol. 17 (2014), Article 14.7.5.
D. H. Lehmer, On Stern's Diatomic Series, Amer. Math. Monthly, Vol. 36, No. 1 (1929), pp. 59-67. [Annotated and corrected scanned copy.]
Julien Leroy, Michel Rigo and Manon Stipulanti, Counting the number of non-zero coefficients in rows of generalized Pascal triangles, Discrete Mathematics, Vol. 340 (2017), pp. 862-881. Also available at Université de Liège.
Alan J. Macfarlane, Linear reversible second-order cellular automata and their first-order matrix equivalents, Journal of Physics A: Mathematical and General 37.45 (2004): 10791. See Fig. 2.
Sam Northshield, Stern's diatomic sequence 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, ..., Amer. Math. Monthly, Vol. 117, No. 7 (2010), pp. 581-598.
Sam Northshield, An Analogue of Stern's Sequence for Z[sqrt(2)], Journal of Integer Sequences, Vol. 18 (2015), Article 15.11.6.
Sam Northshield, Re^3counting the Rationals, arXiv:1905.10369 [math.NT], 2019.
Bruce Reznick, Some binary partition functions, in "Analytic number theory" (Conf. in honor P. T. Bateman, Allerton Park, IL, 1989), Progr. Math., 85, Birkhäuser Boston, Boston, MA, 1990, pp. 451-477.
Bruce Reznick, Regularity properties of the Stern enumeration of the Rationals, Journal of Integer Sequences, Vol. 11 (2008) Article 08.4.1.
Jürgen W. Sander, Jörn Steuding and Rasa Steuding, Diophantine aspects of the Calkin-Wilf iteration, El. Math., Vol. 66, No. 2 (2011) pp. 45-55. doi:10.4171/EM/170.
Anton Shakov, Polynomials in Z[x] whose divisors are enumerated by SL_2(N_0), arXiv:2405.03552 [math.NT], 2024. See p. 27.
N. J. A. Sloane, Stern-Brocot or Farey Tree.
N. J. A. Sloane and Brady Haran, Amazing Graphs III, Numberphile video (2019).
Richard P. Stanley and Herbert S. Wilf, Refining the Stern Diatomic Sequence, unpublished.
Richard P. Stanley and Herbert S. Wilf, Refining the Stern Diatomic Sequence [Cached copy, with permission]
Jörn Steuding, Stefanie Hofmann and Gertraud Schuster, Euclid, Calkin & Wilf - playing with rationals, Elemente der Mathematik, Vol. 63, No. 3 (2008), pp. 109-117.
Ralf Stephan, Divide-and-conquer generating functions. I. Elementary sequences, arXiv:math/0307027 [math.CO], 2003.
M. A. Stern, Über eine zahlentheoretische Funktion, J. Reine Angew. Math., Vol. 55 (1858), pp. 193-220.
Maciej Ulas and Oliwia Ulas, On certain arithmetic properties of Stern polynomials, arXiv:1102.5109 [math.CO], 2011.
Eric Weisstein's World of Mathematics, Calkin-Wilf Tree and Stern's Diatomic Series.
Yasuhisa Yamada, A function from Stern's diatomic sequence, and its properties, arXiv:2004.00278 [math.NT], 2020.
FORMULA
a(n+1) = (2*k+1)*a(n) - a(n-1) where k = floor(a(n-1)/a(n)). - David S. Newman, Mar 04 2001
Let e(n) = A007814(n) = exponent of highest power of 2 dividing n. Then a(n+1) = (2k+1)*a(n)-a(n-1), n > 0, where k = e(n). Moreover, floor(a(n-1)/a(n)) = e(n), in agreement with D. Newman's formula. - Dragutin Svrtan (dsvrtan(AT)math.hr) and Igor Urbiha (urbiha(AT)math.hr), Jan 10 2002
Calkin and Wilf showed 0.9588 <= limsup a(n)/n^(log(phi)/log(2)) <= 1.1709 where phi is the golden mean. Does this supremum limit = 1? - Benoit Cloitre, Jan 18 2004. Coons and Tyler show the limit is A246765 = 0.9588... - Kevin Ryde, Jan 09 2021
a(n) = Sum_{k=0..floor((n-1)/2)} (binomial(n-k-1, k) mod 2). - Paul Barry, Sep 13 2004
a(n) = Sum_{k=0..n-1} (binomial(k, n-k-1) mod 2). - Paul Barry, Mar 26 2005
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = v^3 + 2*u*v*w - u^2*w. - Michael Somos, May 02 2005
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = u1^3*u6 - 3*u1^2*u2*u6 + 3*u2^3*u6 - u2^3*u3. - Michael Somos, May 02 2005
G.f.: x * Product_{k>=0} (1 + x^(2^k) + x^(2^(k+1))) [Carlitz].
a(n) = a(n-2) + a(n-1) - 2*(a(n-2) mod a(n-1)). - Mike Stay, Nov 06 2006
A079978(n) = (1 + e^(i*Pi*A002487(n)))/2, i=sqrt(-1). - Paul Barry, Jan 14 2005
a(n) = Sum_{k=1..n} K(k, n-k)*a(n - k), where K(n,k) = 1 if 0 <= k AND k <= n AND n-k <= 2 and K(n,k) = 0 else. (When using such a K-coefficient, several different arguments to K or several different definitions of K may lead to the same integer sequence. For example, if we drop the condition k <= n in the above definition, then we arrive at A002083 = Narayana-Zidek-Capell numbers.) - Thomas Wieder, Jan 13 2008
a(k+1)*a(2^n - k) - a(k)*a(2^n - (k+1)) = 1; a(2^n - k) + a(k) = a(2^(n+1) + k). Both formulas hold for 0 <= k <= 2^n - 1. G.f.: G(z) = a(1) + a(2)*z + a(3)*z^2 + ... + a(k+1)*z^k + ... Define f(z) = (1 + z + z^2), then G(z) = lim f(z)*f(z^2)*f(z^4)* ... *f(z^(2^n))*... = (1 + z + z^2)*G(z^2). - Arie Werksma (werksma(AT)tiscali.nl), Apr 11 2008
a(k+1)*a(2^n - k) - a(k)*a(2^n - (k+1)) = 1 (0 <= k <= 2^n - 1). - Arie Werksma (werksma(AT)tiscali.nl), Apr 18 2008
a(2^n + k) = a(2^n - k) + a(k) (0 <= k <= 2^n). - Arie Werksma (werksma(AT)tiscali.nl), Apr 18 2008
Let g(z) = a(1) + a(2)*z + a(3)*z^2 + ... + a(k+1)*z^k + ..., f(z) = 1 + z + z^2. Then g(z) = lim_{n->infinity} f(z)*f(z^2)*f(z^4)*...*f(z^(2^n)), g(z) = f(z)*g(z^2). - Arie Werksma (werksma(AT)tiscali.nl), Apr 18 2008
For 0 <= k <= 2^n - 1, write k = b(0) + 2*b(1) + 4*b(2) + ... + 2^(n-1)*b(n-1) where b(0), b(1), etc. are 0 or 1. Define a 2 X 2 matrix X(m) with entries x(1,1) = x(2,2) = 1, x(1,2) = 1 - b(m), x(2,1) = b(m). Let P(n)= X(0)*X(1)* ... *X(n-1). The entries of the matrix P are members of the sequence: p(1,1) = a(k+1), p(1,2) = a(2^n - (k+1)), p(2,1) = a(k), p(2,2) = a(2^n - k). - Arie Werksma (werksma(AT)tiscali.nl), Apr 20 2008
Let f(x) = A030101(x); if 2^n + 1 <= x <= 2^(n + 1) and y = 2^(n + 1) - f(x - 1) then a(x) = a(y). - Arie Werksma (Werksma(AT)Tiscali.nl), Jul 11 2008
a(n) = A126606(n + 1) / 2. - Reikku Kulon, Oct 05 2008
Equals infinite convolution product of [1,1,1,0,0,0,0,0,0] aerated A000079 - 1 times, i.e., [1,1,1,0,0,0,0,0,0] * [1,0,1,0,1,0,0,0,0] * [1,0,0,0,1,0,0,0,1]. - Mats Granvik and Gary W. Adamson, Oct 02 2009; corrected by Mats Granvik, Oct 10 2009
a(2^(p+2)*n+2^(p+1)-1) - a(2^(p+1)*n+2^p-1) = A007306(n+1), p >= 0 and n >= 0. - Johannes W. Meijer, Feb 07 2013
a(2*n-1) = A007306(n), n > 0. - Yosu Yurramendi, Jun 23 2014
a(n*2^m) = a(n), m>0, n > 0. - Yosu Yurramendi, Jul 03 2014
a(k+1)*a(2^m+k) - a(k)*a(2^m+(k+1)) = 1 for m >= 0, 0 <= k < 2^m. - Yosu Yurramendi, Nov 07 2014
a(2^(m+1)+(k+1))*a(2^m+k) - a(2^(m+1)+k)*a(2^m+(k+1)) = 1 for m >= 0, 0 <= k < 2^m. - Yosu Yurramendi, Nov 07 2014
a(5*2^k) = 3. a(7*2^k) = 3. a(9*2^k) = 4. a(11*2^k) = 5. a(13*2^k) = 5. a(15*2^k) = 4. In general: a((2j-1)*2^k) = A007306(j), j > 0, k >= 0 (see Adamchuk's comment). - Yosu Yurramendi, Mar 05 2016
a(2^m+2^m'+k') = a(2^m'+k')*(m-m'+1) - a(k'), m >= 0, m' <= m-1, 0 <= k' < 2^m'. - Yosu Yurramendi, Jul 13 2016
From Yosu Yurramendi, Jul 13 2016: (Start)
Let n be a natural number and [b_m b_(m-1) ... b_1 b_0] its binary expansion with b_m=1.
Let L = Sum_{i=0..m} b_i be the number of binary digits equal to 1 (L >= 1).
Let {m_j: j=1..L} be the set of subindices such that b_m_j = 1, j=1..L, and 0 <= m_1 <= m_2 <= ... <= m_L = m.
If L = 1 then c_1 = 1, otherwise let {c_j: j=1..(L-1)} be the set of coefficients such that c_(j) = m_(j+1) - m_j + 1, 1 <= j <= L-1.
Let f be a function defined on {1..L+1} such that f(1) = 0, f(2) = 1, f(j) = c_(j-2)*f(j-1) - f(j-2), 3 <= j <= L+1.
Then a(n) = f(L+1) (see example). (End)
a(n) = A001222(A260443(n)) = A000120(A277020(n)). Also a(n) = A000120(A101624(n-1)) for n >= 1. - Antti Karttunen, Nov 05 2016
(a(n-1) + a(n+1))/a(n) = A037227(n) for n >= 1. - Peter Bala, Feb 07 2017
a(0) = 0; a(3n) = 2*A000360(3n-1); a(3n+1) = 2*A000360(3n) - 1; a(3n+2) = 2*A000360(3n+1) + 1. - M. Jeremie Lafitte (Levitas), Apr 24 2017
From I. V. Serov, Jun 14 2017: (Start)
a(n) = A287896(n-1) - 1*A288002(n-1) for n > 1;
a(n) = A007306(n-1) - 2*A288002(n-1) for n > 1. (End)
From Yosu Yurramendi, Feb 14 2018: (Start)
a(2^(m+2) + 2^(m+1) + k) - a(2^(m+1) + 2^m + k) = 2*a(k), m >= 0, 0 <= k < 2^m.
a(2^(m+2) + 2^(m+1) + k) - a(2^(m+1) + k) = a(2^m + k), m >= 0, 0 <= k < 2^m.
a(2^m + k) = a(k)*(m - floor(log_2(k)) - 1) + a(2^(floor(log_2(k))+1) + k), m >= 0, 0 < k < 2^m, a(2^m) = 1, a(0) = 0. (End)
From Yosu Yurramendi, May 08 2018: (Start)
a(2^m) = 1, m >= 0.
a(2^r*(2*k+1)) = a(2^r*(2*k)) + a(2^r*(2*k+2)), r < - m - floor(log_2(k)) - 1, m > 0, 1 <= k < 2^m. (End)
Trow(n) = [card({k XOR j-k): k=0..j}) for j = 2^(n-1)-1..2^n-2] when regarded as an irregular table (n >= 1). - Peter Luschny, Sep 29 2024
EXAMPLE
Stern's diatomic array begins:
1,1,
1,2,1,
1,3,2,3,1,
1,4,3,5,2,5,3,4,1,
1,5,4,7,3,8,5,7,2,7,5,8,3,7,4,5,1,
1,6,5,9,4,11,7,10,3,11,8,13,5,12,7,9,2,9,7,12,5,13,8,11,3,10,7,11,4,9,...
...
a(91) = 19, because 91_10 = 1011011_2; b_6=b_4=b_3=b_1=b_0=1, b_5=b_2=0; L=5; m_1=0, m_2=1, m_3=3, m_4=4, m_5=6; c_1=2, c_2=3, c_3=2, c_4=3; f(1)=1, f(2)=2, f(3)=5, f(4)=8, f(5)=19. - Yosu Yurramendi, Jul 13 2016
From I. V. Serov, Jun 01 2017: (Start)
a(n) is the length of the Christoffel word chf(n):
n chf(n) A070939(n) a(n)
1 '-' 1 1
2 '+' 2 1
3 '+-' 2 2
4 '-' 3 1
5 '--+' 3 3
6 '-+' 3 2
... (End)
G.f. = x + x^2 + 2*x^3 + x^4 + 3*x^5 + 2*x^6 + 3*x^7 + x^8 + ... - Michael Somos, Jun 25 2019
MAPLE
A002487 := proc(n) option remember; if n <= 1 then n elif n mod 2 = 0 then procname(n/2); else procname((n-1)/2)+procname((n+1)/2); fi; end: seq(A002487(n), n=0..91);
A002487 := proc(m) local a, b, n; a := 1; b := 0; n := m; while n>0 do if type(n, odd) then b := a+b else a := a+b end if; n := floor(n/2); end do; b; end proc: seq(A002487(n), n=0..91); # Program adapted from E. Dijkstra, Selected Writings on Computing, Springer, 1982, p. 232. - Igor Urbiha (urbiha(AT)math.hr), Oct 28 2002. Since A007306(n) = a(2*n+1), this program can be adapted for A007306 by replacing b := 0 by b := 1.
A002487 := proc(n::integer) local k; option remember; if n = 0 then 0 elif n=1 then 1 else add(K(k, n-1-k)*procname(n - k), k = 1 .. n) end if end proc:
K := proc(n::integer, k::integer) local KC; if 0 <= k and k <= n and n-k <= 2 then KC:=1; else KC:= 0; end if; end proc: seq(A002487(n), n=0..91); # Thomas Wieder, Jan 13 2008
# next Maple program:
a:= proc(n) option remember; `if`(n<2, n,
(q-> a(q)+(n-2*q)*a(n-q))(iquo(n, 2)))
end:
seq(a(n), n=0..100); # Alois P. Heinz, Feb 11 2021
fusc := proc(n) local a, b, c; a := 1; b := 0;
for c in convert(n, base, 2) do
if c = 0 then a := a + b else b := a + b fi od;
b end:
seq(fusc(n), n = 0..91); # Peter Luschny, Nov 09 2022
Stern := proc(n, u) local k, j, b;
b := j -> nops({seq(Bits:-Xor(k, j-k), k = 0..j)}):
ifelse(n=0, 1-u, seq(b(j), j = 2^(n-1)-1..2^n-1-u)) end:
seq(print([n], Stern(n, 1)), n = 0..5); # As shown in the comments.
seq(print([n], Stern(n, 0)), n = 0..5); # As shown in the examples. # Peter Luschny, Sep 29 2024
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := If[ EvenQ[n], a[n/2], a[(n-1)/2] + a[(n+1)/2]]; Table[ a[n], {n, 0, 100}] (* end of program *)
Onemore[l_] := Transpose[{l, l + RotateLeft[l]}] // Flatten;
NestList[Onemore, {1}, 5] // Flatten (*gives [a(1), ...]*) (* Takashi Tokita, Mar 09 2003 *)
ToBi[l_] := Table[2^(n - 1), {n, Length[l]}].Reverse[l]; Map[Length,
Split[Sort[Map[ToBi, Table[IntegerDigits[n - 1, 3], {n, 500}]]]]] (*give [a(1), ...]*) (* Takashi Tokita, Mar 10 2003 *)
A002487[m_] := Module[{a = 1, b = 0, n = m}, While[n > 0, If[OddQ[n], b = a+b, a = a+b]; n = Floor[n/2]]; b]; Table[A002487[n], {n, 0, 100}] (* Jean-François Alcover, Sep 06 2013, translated from 2nd Maple program *)
a[0] = 0; a[1] = 1;
Flatten[Table[{a[2*n] = a[n], a[2*n + 1] = a[n] + a[n + 1]}, {n, 0, 50}]] (* Horst H. Manninger, Jun 09 2021 *)
nmax = 100; CoefficientList[Series[x*Product[(1 + x^(2^k) + x^(2^(k+1))), {k, 0, Floor[Log[2, nmax]] + 1}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Oct 08 2022 *)
PROG
(PARI) {a(n) = n=abs(n); if( n<2, n>0, a(n\2) + if( n%2, a(n\2 + 1)))};
(PARI) fusc(n)=local(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); b \\ Charles R Greathouse IV, Oct 05 2008
(PARI) A002487(n, a=1, b=0)=for(i=0, logint(n, 2), if(bittest(n, i), b+=a, a+=b)); b \\ M. F. Hasler, Feb 12 2017, updated Feb 14 2019
(Haskell)
a002487 n = a002487_list !! n
a002487_list = 0 : 1 : stern [1] where
stern fuscs = fuscs' ++ stern fuscs' where
fuscs' = interleave fuscs $ zipWith (+) fuscs $ (tail fuscs) ++ [1]
interleave [] ys = ys
interleave (x:xs) ys = x : interleave ys xs
-- Reinhard Zumkeller, Aug 23 2011
(R)
N <- 50 # arbitrary
a <- 1
for (n in 1:N)
{
a[2*n ] = a[n]
a[2*n + 1] = a[n] + a[n+1]
a
}
a
# Yosu Yurramendi, Oct 04 2014
(Scheme)
;; An implementation of memoization-macro definec can be found for example in: http://oeis.org/wiki/Memoization
(definec (A002487 n) (cond ((<= n 1) n) ((even? n) (A002487 (/ n 2))) (else (+ (A002487 (/ (- n 1) 2)) (A002487 (/ (+ n 1) 2))))))
;; Antti Karttunen, Nov 05 2016
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def a(n): return n if n<2 else a(n//2) if n%2==0 else a((n - 1)//2) + a((n + 1)//2) # Indranil Ghosh, Jun 08 2017; corrected by Reza K Ghazi, Dec 27 2021
(Python)
def a(n):
a, b = 1, 0
while n > 0:
if n & 1:
b += a
else:
a += b
n >>= 1
return b
# Reza K Ghazi, Dec 29 2021
(Sage)
def A002487(n):
M = [1, 0]
for b in n.bits():
M[b] = M[0] + M[1]
return M[1]
print([A002487(n) for n in (0..91)])
# For a dual see A174980. Peter Luschny, Nov 28 2017
(Julia)
using Nemo
function A002487List(len)
a, A = QQ(0), [0, 1]
for n in 1:len
a = next_calkin_wilf(a)
push!(A, denominator(a))
end
A end
A002487List(91) |> println # Peter Luschny, Mar 13 2018
(R) # Given n, compute a(n) by taking into account the binary representation of n
a <- function(n){
b <- as.numeric(intToBits(n))
l <- sum(b)
m <- which(b == 1)-1
d <- 1
if(l > 1) for(j in 1:(l-1)) d[j] <- m[j+1]-m[j]+1
f <- c(0, 1)
if(l > 1) for(j in 3:(l+1)) f[j] <- d[j-2]*f[j-1]-f[j-2]
return(f[l+1])
} # Yosu Yurramendi, Dec 13 2016
(R) # computes the sequence as a vector A, rather than function a() as above.
A <- c(1, 1)
maxlevel <- 5 # by choice
for(m in 1:maxlevel) {
A[2^(m+1)] <- 1
for(k in 1:(2^m-1)) {
r <- m - floor(log2(k)) - 1
A[2^r*(2*k+1)] <- A[2^r*(2*k)] + A[2^r*(2*k+2)]
}}
A # Yosu Yurramendi, May 08 2018
(Magma) [&+[(Binomial(k, n-k-1) mod 2): k in [0..n]]: n in [0..100]]; // Vincenzo Librandi, Jun 18 2019
(Python)
def A002487(n): return sum(int(not (n-k-1) & ~k) for k in range(n)) # Chai Wah Wu, Jun 19 2022
CROSSREFS
Record values are in A212289.
If the 1's are replaced by pairs of 1's we obtain A049456.
Inverse: A020946.
Cf. a(A001045(n)) = A000045(n). a(A062092(n)) = A000032(n+1).
Cf. A064881-A064886 (Stern-Brocot subtrees).
A column of A072170.
Cf. A049455 for the 0,1 version of Stern's diatomic array.
Cf. A000119, A262097 for analogous sequences in other bases and A277189, A277315, A277328 for related sequences with similar graphs.
Cf. A086592 and references therein to other sequences related to Kepler's tree of fractions.
KEYWORD
nonn,easy,nice,core,look
EXTENSIONS
Additional references and comments from Len Smiley, Joshua Zucker, Rick L. Shepherd and Herbert S. Wilf
Typo in definition corrected by Reinhard Zumkeller, Aug 23 2011
Incorrect formula deleted and text edited by Johannes W. Meijer, Feb 07 2013
STATUS
approved
Triangle of Narayana numbers T(n,k) = C(n-1,k-1)*C(n,k-1)/k with 1 <= k <= n, read by rows. Also called the Catalan triangle.
+10
369
1, 1, 1, 1, 3, 1, 1, 6, 6, 1, 1, 10, 20, 10, 1, 1, 15, 50, 50, 15, 1, 1, 21, 105, 175, 105, 21, 1, 1, 28, 196, 490, 490, 196, 28, 1, 1, 36, 336, 1176, 1764, 1176, 336, 36, 1, 1, 45, 540, 2520, 5292, 5292, 2520, 540, 45, 1, 1, 55, 825, 4950, 13860, 19404, 13860, 4950, 825
OFFSET
1,5
COMMENTS
Number of antichains (or order ideals) in the poset 2*(k-1)*(n-k) or plane partitions with rows <= k-1, columns <= n-k and entries <= 2. - Mitch Harris, Jul 15 2000
T(n,k) is the number of Dyck n-paths with exactly k peaks. a(n,k) = number of pairs (P,Q) of lattice paths from (0,0) to (k,n+1-k), each consisting of unit steps East or North, such that P lies strictly above Q except at the endpoints. - David Callan, Mar 23 2004
Number of permutations of [n] which avoid-132 and have k-1 descents. - Mike Zabrocki, Aug 26 2004
T(n,k) is the number of paths through n panes of glass, entering and leaving from one side, of length 2n with k reflections (where traversing one pane of glass is the unit length). - Mitch Harris, Jul 06 2006
Antidiagonal sums given by A004148 (without first term).
T(n,k) is the number of full binary trees with n internal nodes and k-1 jumps. In the preorder traversal of a full binary tree, any transition from a node at a deeper level to a node on a strictly higher level is called a jump. - Emeric Deutsch, Jan 18 2007
From Gary W. Adamson, Oct 22 2007: (Start)
The n-th row can be generated by the following operation using an ascending row of (n-1) triangular terms, (A) and a descending row, (B); e.g., row 6:
A: 1....3....6....10....15
B: 15...10....6.....3.....1
C: 1...15...50....50....15....1 = row 6.
Leftmost column of A,B -> first two terms of C; then followed by the operation B*C/A of current column = next term of row C, (e.g., 10*15/3 = 50). Continuing with the operation, we get row 6: (1, 15, 50, 50, 15, 1). (End)
The previous comment can be upgraded to: The ConvOffsStoT transform of the triangular series; and by rows, row 6 is the ConvOffs transform of (1, 3, 6, 10, 15). Refer to triangle A117401 as another example of the ConvOffsStoT transform, and OEIS under Maple Transforms. - Gary W. Adamson, Jul 09 2012
For a connection to Lagrange inversion, see A134264. - Tom Copeland, Aug 15 2008
T(n,k) is also the number of order-decreasing and order-preserving mappings (of an n-element set) of height k (height of a mapping is the cardinal of its image set). - Abdullahi Umar, Aug 21 2008
Row n of this triangle is the h-vector of the simplicial complex dual to an associahedron of type A_n [Fomin & Reading, p.60]. See A033282 for the corresponding array of f-vectors for associahedra of type A_n. See A008459 and A145903 for the h-vectors for associahedra of type B and type D respectively. The Hilbert transform of this triangle (see A145905 for the definition of this transform) is A145904. - Peter Bala, Oct 27 2008
T(n,k) is also the number of noncrossing set partitions of [n] into k blocks. Given a partition P of the set {1,2,...,n}, a crossing in P are four integers [a, b, c, d] with 1 <= a < b < c < d <= n for which a, c are together in a block, and b, d are together in a different block. A noncrossing partition is a partition with no crossings. - Peter Luschny, Apr 29 2011
Noncrossing set partitions are also called genus 0 partitions. In terms of genus-dependent Stirling numbers of the second kind S2(n,k,g) that count partitions of genus g of an n-set into k nonempty subsets, one has T(n,k) = S2(n,k,0). - Robert Coquereaux, Feb 15 2024
Diagonals of A089732 are rows of A001263. - Tom Copeland, May 14 2012
From Peter Bala, Aug 07 2013: (Start)
Let E(y) = Sum_{n >= 0} y^n/(n!*(n+1)!) = 1/sqrt(y)*BesselI(1,2*sqrt(y)). Then this triangle is the generalized Riordan array (E(y), y) with respect to the sequence n!*(n+1)! as defined in Wang and Wang.
Generating function E(y)*E(x*y) = 1 + (1 + x)*y/(1!*2!) + (1 + 3*x + x^2)*y^2/(2!*3!) + (1 + 6*x + 6*x^2 + x^3)*y^3/(3!*4!) + .... Cf. A105278 with a generating function exp(y)*E(x*y).
The n-th power of this array has a generating function E(y)^n*E(x*y). In particular, the matrix inverse A103364 has a generating function E(x*y)/E(y). (End)
T(n,k) is the number of nonintersecting n arches above the x axis, starting and ending on vertices 1 to 2n, with k being the number of arches starting on an odd vertice and ending on a higher even vertice. Example: T(3,2)=3 [16,25,34] [14,23,56] [12,36,45]. - Roger Ford, Jun 14 2014
Fomin and Reading on p. 31 state that the rows of the Narayana matrix are the h-vectors of the associahedra as well as its dual. - Tom Copeland, Jun 27 2017
The row polynomials P(n, x) = Sum_{k=1..n} T(n, k)*x^(k-1), together with P(0, x) = 1, multiplied by (n+1) are the numerator polynomials of the o.g.f.s of the diagonal sequences of the triangle A103371: G(n, x) = (n+1)*P(n, x)/(1 - x)^{2*n+1}, for n >= 0. This is proved with Lagrange's theorem applied to the Riordan triangle A135278 = (1/(1 - x)^2, x/(1 - x)). See an example below. - Wolfdieter Lang, Jul 31 2017
T(n,k) is the number of Dyck paths of semilength n with k-1 uu-blocks (pairs of consecutive up-steps). - Alexander Burstein, Jun 22 2020
In case you were searching for Narayama numbers, the correct spelling is Narayana. - N. J. A. Sloane, Nov 11 2020
Named after the Canadian mathematician Tadepalli Venkata Narayana (1930-1987). They were also called "Runyon numbers" after John P. Runyon (1922-2013) of Bell Telephone Laboratories, who used them in a study of a telephone traffic system. - Amiram Eldar, Apr 15 2021 The Narayana numbers were first studied by Percy Alexander MacMahon (see reference, Article 495) as pointed out by Bóna and Sagan (see link). - Peter Luschny, Apr 28 2022
From Andrea Arlette España, Nov 14 2022: (Start)
T(n,k) is the degree distribution of the paths towards synchronization in the transition diagram associated with the Laplacian system over the complete graph K_n, corresponding to ordered initial conditions x_1 < x_2 < ... < x_n.
T(n,k) for n=2N+1 and k=N+1 is the number of states in the transition diagram associated with the Laplacian system over the complete bipartite graph K_{N,N}, corresponding to ordered (x_1 < x_2 < ... < x_N and x_{N+1} < x_{N+2} < ... < x_{2N}) and balanced (Sum_{i=1..N} x_i/N = Sum_{i=N+1..2N} x_i/N) initial conditions. (End)
From Gus Wiseman, Jan 23 2023: (Start)
Also the number of unlabeled ordered rooted trees with n nodes and k leaves. See the link by Marko Riedel. For example, row n = 5 counts the following trees:
((((o)))) (((o))o) ((o)oo) (oooo)
(((o)o)) ((oo)o)
(((oo))) ((ooo))
((o)(o)) (o(o)o)
((o(o))) (o(oo))
(o((o))) (oo(o))
The unordered version is A055277. Leaves in standard ordered trees are counted by A358371.
(End)
REFERENCES
Berman and Koehler, Cardinalities of finite distributive lattices, Mitteilungen aus dem Mathematischen Seminar Giessen, 121 (1976), pp. 103-124.
Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 196.
P. A. MacMahon, Combinatory Analysis, Vols. 1 and 2, Cambridge University Press, 1915, 1916; reprinted by Chelsea, 1960, Sect. 495.
T. V. Narayana, Lattice Path Combinatorics with Statistical Applications. Univ. Toronto Press, 1979, pp. 100-101.
A. Nkwanta, Lattice paths and RNA secondary structures, in African Americans in Mathematics, ed. N. Dean, Amer. Math. Soc., 1997, pp. 137-147.
T. K. Petersen, Eulerian Numbers, Birkhäuser, 2015, Chapter 2.
J. Riordan, Combinatorial Identities, Wiley, 1968, p. 17.
R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 6.36(a) and (b).
LINKS
M. Aigner, Enumeration via ballot numbers, Discrete Math., 308 (2008), 2544-2563.
Per Alexandersson, Svante Linusson, Samu Potka, and Joakim Uhlin, Refined Catalan and Narayana cyclic sieving, arXiv:2010.11157 [math.CO], 2020.
N. Alexeev and A. Tikhomirov, Singular Values Distribution of Squares of Elliptic Random Matrices and type-B Narayana Polynomials, arXiv preprint arXiv:1501.04615 [math.PR], 2015.
Jarod Alper and Rowan Rowlands, Syzygies of the apolar ideals of the determinant and permanent, arXiv:1709.09286 [math.AC], 2017.
C. Athanasiadis and C. Savvidou, The local h-vector of the cluster subdivision of a simplex, arXiv:1204.0362 [math.CO], 2012, p. 8, Lemma 2.4 A_n. [Tom Copeland, Oct 19 2014]
Arvind Ayyer, Matthieu Josuat-Vergès, and Sanjay Ramassamy, Extensions of partial cyclic orders and consecutive coordinate polytopes, arXiv:1803.10351 [math.CO], 2018.
Axel Bacher, Antonio Bernini, Luca Ferrari, Benjamin Gunby, Renzo Pinzani, and Julian West, The Dyck pattern poset, Discrete Math. 321 (2014), 12--23. MR3154009.
Jean-Luc Baril, Pamela E. Harris, Kimberly J. Harry, Matt McClinton, and José L. Ramírez, Enumerating runs, valleys, and peaks in Catalan words, arXiv:2404.05672 [math.CO], 2024. See p. 5.
Jean-Luc Baril and Sergey Kirgizov, The pure descent statistic on permutations, Preprint, 2016.
M. Barnabei, F. Bonetti, and M. Silmbani, Two Permutation Classes Enumerated by the Central Binomial Coefficients, J. Int. Seq. 16 (2013) #13.3.8.
Marilena Barnabei, Flavio Bonetti, and Niccolò Castronuovo, Motzkin and Catalan Tunnel Polynomials, J. Int. Seq., Vol. 21 (2018), Article 18.8.8.
Paul Barry, On Integer-Sequence-Based Constructions of Generalized Pascal Triangles, Journal of Integer Sequences, Vol. 9 (2006), Article 06.2.4.
Paul Barry, On a Generalization of the Narayana Triangle, J. Int. Seq. 14 (2011) # 11.4.5.
Paul Barry, Riordan arrays, generalized Narayana triangles, and series reversion, Linear Algebra and its Applications, 491 (2016) 343-385.
Paul Barry, Jacobsthal Decompositions of Pascal's Triangle, Ternary Trees, and Alternating Sign Matrices, Journal of Integer Sequences, 19, 2016, #16.3.5.
Paul Barry, Three Études on a sequence transformation pipeline, arXiv:1803.06408 [math.CO], 2018.
Paul Barry, The Gamma-Vectors of Pascal-like Triangles Defined by Riordan Arrays, arXiv:1804.05027 [math.CO], 2018.
Paul Barry, On the f-Matrices of Pascal-like Triangles Defined by Riordan Arrays, arXiv:1805.02274 [math.CO], 2018.
Paul Barry, On a Central Transform of Integer Sequences, arXiv:2004.04577 [math.CO], 2020.
Paul Barry, On the inversion of Riordan arrays, arXiv:2101.06713 [math.CO], 2021.
Paul Barry and A. Hennessy, A Note on Narayana Triangles and Related Polynomials, Riordan Arrays, and MIMO Capacity Calculations, J. Int. Seq. 14 (2011), Article 11.3.8.
Paul Barry and Aoife Hennessy, Generalized Narayana Polynomials, Riordan Arrays, and Lattice Paths, Journal of Integer Sequences, Vol. 15 (2012), Article 12.4.8.
C. Bean, M. Tannock, and H. Ulfarsson, Pattern avoiding permutations and independent sets in graphs, arXiv:1512.08155 [math.CO], 2015.
S. Benchekroun and P. Moszkowski, A bijective proof of an enumerative property of legal bracketings Discrete Math. 176 (1997), no. 1-3, 273-277.
Carl M. Bender and Gerald V. Dunne, Polynomials and operator orderings, J. Math. Phys. 29 (1988), 1727-1731.
J. Berman and P. Koehler, Cardinalities of finite distributive lattices, Mitteilungen aus dem Mathematischen Seminar Giessen, 121 (1976), 103-124. [Annotated scanned copy]
A. Bernini, L. Ferrari, R. Pinzani, and J. West, The Dyck pattern poset, arXiv:1303.3785 [math.CO], 2013.
Aubrey Blecher, Charlotte Brennan, Arnold Knopfmacher, and Toufik Mansour, The perimeter of words, Discrete Mathematics, 340, no. 10 (2017): 2456-2465.
M. Bona and B. E. Sagan, On divisibility of Narayana numbers by primes, arXiv:math/0505382 [math.CO], 2005.
Miklós Bóna and Bruce E. Sagan, On Divisibility of Narayana Numbers by Primes, Journal of Integer Sequences, Vol. 8 (2005), Article 05.2.4.
J. M. Borwein, A short walk can be beautiful, 2015.
Jonathan M. Borwein, Armin Straub, and Christophe Vignat, Densities of short uniform random walks, Part II: Higher dimensions, Preprint, 2015.
Kevin Buchin, Man-Kwun Chiu, Stefan Felsner, Günter Rote, and André Schulz, The Number of Convex Polyominoes with Given Height and Width, arXiv:1903.01095 [math.CO], 2019.
Michael Bukata, Ryan Kulwicki, Nicholas Lewandowski, Lara Pudwell, Jacob Roth, and Teresa Wheeland, Distributions of Statistics over Pattern-Avoiding Permutations, arXiv:1812.07112 [math.CO], 2018.
Alexander Burstein, Distribution of peak heights modulo k and double descents on k-Dyck paths, arXiv:2009.00760 [math.CO], 2020.
D. Callan, T. Mansour, and M. Shattuck, Restricted ascent sequences and Catalan numbers, arXiv:1403.6933 [math.CO], 2014.
L. Carlitz, and John Riordan, Enumeration of some two-line arrays by extent. J. Combinatorial Theory Ser. A 10 1971 271--283. MR0274301(43 #66). (Coefficients of the polynomials A_n(z) defined in (3.9)).
Ricky X. F. Chen and Christian M. Reidys, A Combinatorial Identity Concerning Plane Colored Trees and its Applications, Journal of Integer Sequences, Vol. 20 (2017), Article 17.3.7.
Xi Chen, H. Liang, and Y. Wang, Total positivity of recursive matrices, Linear Algebra and its Applications, Volume 471, 15 April 2015, Pages 383-393.
Xi Chen, H. Liang, and Y. Wang, Total positivity of recursive matrices, arXiv:1601.05645 [math.CO], 2016.
Johann Cigler, Some remarks and conjectures related to lattice paths in strips along the x-axis, arXiv:1501.04750 [math.CO], 2015-2016.
Robert Coquereaux and Jean-Bernard Zuber, Counting partitions by genus. A compendium of results, arXiv:2305.01100 [math.CO], 2023. See p. 7.
Robert Coquereaux and Jean-Bernard Zuber, Counting partitions by genus: a compendium of results, Journal of Integer Sequences, Vol. 27 (2024), Article 24.2.6. See p. 12.
R. Cori and G. Hetyei, Counting genus one partitions and permutations, arXiv:1306.4628 [math.CO], 2013.
R. Cori and G. Hetyei, How to count genus one partitions, FPSAC 2014, Chicago, Discrete Mathematics and Theoretical Computer Science (DMTCS), Nancy, France, 2014, 333-344.
R. De Castro, A. L. Ramírez, and J. L. Ramírez, Applications in Enumerative Combinatorics of Infinite Weighted Automata and Graphs, arXiv:1310.2449 [cs.DM], 2013.
Colin Defant, Counting 3-Stack-Sortable Permutations, arXiv:1903.09138 [math.CO], 2019.
Yun Ding and Rosena R. X. Du, Counting Humps in Motzkin paths, arXiv:1109.2661 [math.CO], 2011.
T. Doslic, Handshakes across a (round) table, JIS 13 (2010) #10.2.7.
T. Doslic, D. Svrtan, and D. Veljan, Enumerative aspects of secondary structures, Discr. Math., 285 (2004), 67-82.
Jennifer Elder, Nadia Lafrenière, Erin McNicholas, Jessica Striker, and Amanda Welch, Toggling, rowmotion, and homomesy on interval-closed sets, arXiv:2307.08520 [math.CO], 2023.
Sergi Elizalde, Johnny Rivera Jr., and Yan Zhuang, Counting pattern-avoiding permutations by big descents, arXiv:2408.15111 [math.CO], 2024. See p. 18.
L. Ferrari and E. Munarini, Enumeration of Edges in Some Lattices of Paths, J. Int. Seq. 17 (2014) #14.1.5.
T. A. Fisher, A Caldero-Chapoton map depending on a torsion class, arXiv:1510.07484 [math.RT], 2015-2016.
P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009; see page 182.
S. Fomin and N. Reading, Root systems and generalized associahedra, Lecture notes for IAS/Park-City 2004.
Alessandra Frabetti, Simplicial properties of the set of planar binary trees, Journal of Algebraic Combinatorics 13, 41-65 (2001).
Samuele Giraudo, Intervals of balanced binary trees in the Tamari lattice, arXiv:1107.3472 [math.CO], 2011.
Samuele Giraudo, Tree series and pattern avoidance in syntax trees, arXiv:1903.00677 [math.CO], 2019.
R. L. Graham and J. Riordan, The solution of a certain recurrence, Amer. Math. Monthly 73, 1966, pp. 604-608.
R. K. Guy, Catwalks, sandsteps and Pascal pyramids, J. Integer Sequences, Vol. 3 (2000), Article #00.1.6.
Kevin G. Hare and Ghislain McKay, Some properties of even moments of uniform random walks, arXiv:1506.01313 [math.CO], 2015.
F. Hivert, J.-C. Novelli, and J.-Y. Thibon, Commutative combinatorial Hopf algebras, arXiv:math/0605262 [math.CO], 2006.
H. E. Hoggatt, Jr., Triangular Numbers, Fibonacci Quarterly 12 (Oct. 1974), 221-230.
F. K. Hwang and C. L. Mallows, Enumerating nested and consecutive partitions, J. Combin. Theory Ser. A 70 (1995), no. 2, 323-333.
M. Hyatt and J. Remmel, The classification of 231-avoiding permutations by descents and maximum drop, arXiv:1208.1052 [math.CO], 2012.
Matthieu Josuat-Verges, A q-analog of Schläfli and Gould identities on Stirling numbers, Ramanujan J 46, 483-507 (2018); arXiv preprint, 2016.
Thomas Koshy, Illustration of triangle with dark color for odd number, light for even number [Although the illustration says "Applet", this is simply a plain jpeg file]
Vladimir Kostov and Boris Shapiro, Narayana numbers and Schur-Szego composition, arXiv:0804.1028 [math.CA], 2008.
W. Krandick, Trees and jumps and real roots, J. Computational and Applied Math., 162, 2004, 51-55.
G. Kreweras, Sur les éventails de segments, Cahiers du Bureau Universitaire de Recherche Opérationnelle, Institut de Statistique, Université de Paris, #15 (1970), 3-41. [Annotated scanned copy]
G. Kreweras, Traitement simultané du "Problème de Young" et du "Problème de Simon Newcomb", Cahiers du Bureau Universitaire de Recherche Opérationnelle. Institut de Statistique, Université de Paris, 10 (1967), 23-31.
G. Kreweras, Traitement simultané du "Problème de Young" et du "Problème de Simon Newcomb", Cahiers du Bureau Universitaire de Recherche Opérationnelle. Institut de Statistique, Université de Paris, 10 (1967), 23-31. [Annotated scanned copy]
G. Kreweras, Sur les éventails de segments, Cahiers du Bureau Universitaire de Recherche Opérationnelle, Institut de Statistique, Université de Paris, #15 (1970), 3-41.
G. Kreweras, Les préordres totaux compatibles avec un ordre partiel, Math. Sci. Humaines No. 53 (1976), 5-30.
G. Kreweras, Les préordres totaux compatibles avec un ordre partiel, Math. Sci. Humaines No. 53 (1976), 5-30. (Annotated scanned copy)
G. Kreweras, and P. Moszkowski, A new enumerative property of the Narayana numbers, Journal of statistical planning and inference 14.1 (1986): 63-67.
Nate Kube and Frank Ruskey, Sequences That Satisfy a(n-a(n))=0, Journal of Integer Sequences, Vol. 8 (2005), Article 05.5.5.
A. Laradji and A. Umar, Combinatorial Results for Semigroups of Order-Decreasing Partial Transformations, Journal of Integer Sequences, Vol. 7 (2004), Article 04.3.8.
A. Laradji and A. Umar, On certain finite semigroups of order-decreasing transformations I, Semigroup Forum 69 (2004), 184-200.
Elżbieta Liszewska and Wojciech Młotkowski, Some relatives of the Catalan sequence, arXiv:1907.10725 [math.CO], 2019.
Amya Luo, Pattern Avoidance in Nonnesting Permutations, Undergraduate Thesis, Dartmouth College (2024). See p. 16.
P. A. MacMahon, Combinatory analysis.
K. Manes, A. Sapounakis, I. Tasoulas, and P. Tsikouras, Nonleft peaks in Dyck paths: a combinatorial approach, Discrete Math., 337 (2014), 97-105.
Toufik Mansour and Reza Rastegar, On typical triangulations of a convex n-gon, arXiv:1911.04025 [math.CO], 2019.
Toufik Mansour, Reza Rastegar, Alexander Roitershtein, and Gökhan Yıldırım, The longest increasing subsequence in involutions avoiding 3412 and another pattern, arXiv:2001.10030 [math.CO], 2020.
Toufik Mansour and Mark Shattuck, Pattern-avoiding set partitions and Catalan numbers, Electronic Journal of Combinatorics, 18(2) (2012), #P34.
Toufik Mansour and Gökhan Yıldırım, Permutations avoiding 312 and another pattern, Chebyshev polynomials and longest increasing subsequences, arXiv:1808.05430 [math.CO], 2018.
A. Marco and J.-J. Martinez, A total positivity property of the Marchenko-Pastur Law, Electronic Journal of Linear Algebra, Volume 30 (2015), #7, pp. 106-117.
MathOverflow, Narayana polynomials as numerator polynomials for Ehrhart series rational functions?, a MO question posed by Tom Copeland and answered by Richard Stanley, 2017.
D. Merlini, R. Sprugnoli, and M. C. Verri, Waiting patterns for a printer, Discrete Applied Mathematics, Volume 144, Issue 3, 2004, Pages 359-373.
A. Micheli and D. Rossin, Edit distance between unlabeled ordered trees, arXiv:math/0506538 [math.CO], 2005.
T. V. Narayana, Sur les treillis formés par les partitions d'un entier et leurs applications à la théorie des probabilités, Comptes Rendus de l'Académie des Sciences Paris, Vol. 240 (1955), p. 1188-1189.
J.-C. Novelli and J.-Y. Thibon, Polynomial realizations of some trialgebras, arXiv:math/0605061 [math.CO], 2006; Proc. Formal Power Series and Algebraic Combinatorics 2006 (San-Diego, 2006).
J.-C. Novelli and J.-Y. Thibon, Hopf algebras and dendriform structures arising from parking functions, Fundamenta Mathematicae 193 (2007), pp. 189-241; arXiv version, 0511200 [math.CO], 2005.
J.-C. Novelli and J.-Y. Thibon, Hopf Algebras of m-permutations,(m+1)-ary trees, and m-parking functions, arXiv:1403.5962 [math.CO], 2014. See Fig. 4.
Judy-anne Osborn, Bi-banded paths, a bijection and the Narayana numbers, Australasian Journal of Combinatorics, Volume 48 (2010), Pages 243-252.
T. K. Petersen, Chapter 2. Narayana numbers. In: Eulerian Numbers. Birkhäuser Basel, 2015. doi:10.1007/978-1-4939-3091-3.
Vincent Pilaud and V. Pons, Permutrees, arXiv:1606.09643 [math.CO], 2016-2017.
Lara Pudwell, On the distribution of peaks (and other statistics), 16th International Conference on Permutation Patterns, Dartmouth College, 2018. [Broken link]
Dun Qiu and Jeffery Remmel, Patterns in words of ordered set partitions, arXiv:1804.07087 [math.CO], 2018.
A. Sapounakis, I. Tasoulas, and P. Tsikouras, Counting strings in Dyck paths, Discrete Math., 307 (2007), 2909-2924.
Paul R. F. Schumacher, Descents in Parking Functions, J. Int. Seq. 21 (2018), #18.2.3.
M. Sheppeard, Constructive motives and scattering 2013 (p. 41). [Tom Copeland, Oct 03 2014]
R. P. Stanley, Theory and application of plane partitions, II. Studies in Appl. Math. 50 (1971), p. 259-279. DOI:10.1002/sapm1971503259. Thm. 18.1.
R. A. Sulanke, Catalan path statistics having the Narayana distribution, Discrete Math., vol. 180 (1998), 369--389. [Gives additional contexts where Narayana numbers appear. - N. J. A. Sloane, Nov 11 2020]
A. Umar, Some combinatorial problems in the theory of symmetric ..., Algebra Disc. Math. 9 (2010) 115-126.
W. Wang and T. Wang, Generalized Riordan arrays, Discrete Mathematics, Vol. 308, No. 24, 6466-6500.
Yi Wang and Arthur L.B. Yang, Total positivity of Narayana matrices, arXiv:1702.07822 [math.CO], 2017.
Tad White, Quota Trees, arXiv:2401.01462 [math.CO], 2024. See pp. 19-20.
L. K. Williams, Enumeration of totally positive Grassmann cells, arXiv:math/0307271 [math.CO], 2003-2004.
Anthony James Wood, Nonequilibrium steady states from a random-walk perspective, Ph. D. Thesis, The University of Edinburgh (Scotland, UK 2019), 44-46.
Anthony J. Wood, Richard A. Blythe, and Martin R. Evans, Combinatorial mappings of exclusion processes, arXiv:1908.00942 [cond-mat.stat-mech], 2019.
F. Yano and H. Yoshida, Some set partition statistics in non-crossing partitions and generating functions, Discr. Math., 307 (2007), 3147-3160.
A. España, X. Leoncini, and E. Ugalde, Combinatorics of the paths towards synchronization, arXiv:2205.05948 [math.DS], 2022.
FORMULA
a(n, k) = C(n-1, k-1)*C(n, k-1)/k for k!=0; a(n, 0)=0.
Triangle equals [0, 1, 0, 1, 0, 1, ...] DELTA [1, 0, 1, 0, 1, 0, 1, 0, ...] where DELTA is Deléham's operator defined in A084938.
0<n, 1<=k<=n a(n, 1) = a(n, n) = 1 a(n, k) = sum(i=1..n-1, sum(r=1..k-1, a(n-1-i, k-r) a(i, r))) + a(n-1, k) a(n, k) = sum(i=1..k-1, binomial(n+i-1, 2k-2)*a(k-1, i)) - Mike Zabrocki, Aug 26 2004
T(n, k) = C(n, k)*C(n-1, k-1) - C(n, k-1)*C(n-1, k) (determinant of a 2 X 2 subarray of Pascal's triangle A007318). - Gerald McGarvey, Feb 24 2005
T(n, k) = binomial(n-1, k-1)^2 - binomial(n-1, k)*binomial(n-1, k-2). - David Callan, Nov 02 2005
a(n,k) = C(n,2) (a(n-1,k)/((n-k)*(n-k+1)) + a(n-1,k-1)/(k*(k-1))) a(n,k) = C(n,k)*C(n,k-1)/n. - Mitch Harris, Jul 06 2006
Central column = A000891, (2n)!*(2n+1)! / (n!*(n+1)!)^2. - Zerinvary Lajos, Oct 29 2006
G.f.: (1-x*(1+y)-sqrt((1-x*(1+y))^2-4*y*x^2))/(2*x) = Sum_{n>0, k>0} a(n, k)*x^n*y^k.
From Peter Bala, Oct 22 2008: (Start)
Relation with Jacobi polynomials of parameter (1,1):
Row n+1 generating polynomial equals 1/(n+1)*x*(1-x)^n*Jacobi_P(n,1,1,(1+x)/(1-x)). It follows that the zeros of the Narayana polynomials are all real and nonpositive, as noted above. O.g.f for column k+2: 1/(k+1) * y^(k+2)/(1-y)^(k+3) * Jacobi_P(k,1,1,(1+y)/(1-y)). Cf. A008459.
T(n+1,k) is the number of walks of n unit steps on the square lattice (i.e., each step in the direction either up (U), down (D), right (R) or left (L)) starting from the origin and finishing at lattice points on the x axis and which remain in the upper half-plane y >= 0 [Guy]. For example, T(4,3) = 6 counts the six walks RRL, LRR, RLR, UDL, URD and RUD, from the origin to the lattice point (1,0), each of 3 steps. Compare with tables A145596 - A145599.
Define a functional I on formal power series of the form f(x) = 1 + ax + bx^2 + ... by the following iterative process. Define inductively f^(1)(x) = f(x) and f^(n+1)(x) = f(x*f^(n)(x)) for n >= 1. Then set I(f(x)) = lim_{n -> infinity} f^(n)(x) in the x-adic topology on the ring of formal power series; the operator I may also be defined by I(f(x)) := 1/x*series reversion of x/f(x).
The o.g.f. for this array is I(1 + t*x + t*x^2 + t*x^3 + ...) = 1 + t*x + (t + t^2)*x^2 + (t + 3*t^2 + t^3)*x^3 + ... = 1/(1 - x*t/(1 - x/(1 - x*t/(1 - x/(1 - ...))))) (as a continued fraction). Cf. A108767, A132081 and A141618. (End)
G.f.: 1/(1-x-xy-x^2y/(1-x-xy-x^2y/(1-... (continued fraction). - Paul Barry, Sep 28 2010
E.g.f.: exp((1+y)x)*Bessel_I(1,2*sqrt(y)x)/(sqrt(y)*x). - Paul Barry, Sep 28 2010
G.f.: A(x,y) = exp( Sum_{n>=1} [Sum_{k=0..n} C(n,k)^2*y^k] * x^n/n ). - Paul D. Hanna, Oct 13 2010
With F(x,t) = (1-(1+t)*x-sqrt(1-2*(1+t)*x+((t-1)*x)^2))/(2*x) an o.g.f. in x for the Narayana polynomials in t, G(x,t) = x/(t+(1+t)*x+x^2) is the compositional inverse in x. Consequently, with H(x,t) = 1/ (dG(x,t)/dx) = (t+(1+t)*x+x^2)^2 / (t-x^2), the n-th Narayana polynomial in t is given by (1/n!)*((H(x,t)*D_x)^n)x evaluated at x=0, i.e., F(x,t) = exp(x*H(u,t)*D_u)u, evaluated at u = 0. Also, dF(x,t)/dx = H(F(x,t),t). - Tom Copeland, Sep 04 2011
With offset 0, A001263 = Sum_{j>=0} A132710^j / A010790(j), a normalized Bessel fct. May be represented as the Pascal matrix A007318, n!/[(n-k)!*k!], umbralized with b(n)=A002378(n) for n>0 and b(0)=1: A001263(n,k)= b.(n!)/{b.[(n-k)!]*b.(k!)} where b.(n!) = b(n)*b(n-1)...*b(0), a generalized factorial (see example). - Tom Copeland, Sep 21 2011
With F(x,t) = {1-(1-t)*x-sqrt[1-2*(1+t)*x+[(t-1)*x]^2]}/2 a shifted o.g.f. in x for the Narayana polynomials in t, G(x,t)= x/[t-1+1/(1-x)] is the compositional inverse in x. Therefore, with H(x,t)=1/(dG(x,t)/dx)=[t-1+1/(1-x)]^2/{t-[x/(1-x)]^2}, (see A119900), the (n-1)-th Narayana polynomial in t is given by (1/n!)*((H(x,t)*d/dx)^n)x evaluated at x=0, i.e., F(x,t) = exp(x*H(u,t)*d/du) u, evaluated at u = 0. Also, dF(x,t)/dx = H(F(x,t),t). - Tom Copeland, Sep 30 2011
T(n,k) = binomial(n-1,k-1)*binomial(n+1,k)-binomial(n,k-1)*binomial(n,k). - Philippe Deléham, Nov 05 2011
A166360(n-k) = T(n,k) mod 2. - Reinhard Zumkeller, Oct 10 2013
Damped sum of a column, in leading order: lim_{d->0} d^(2k-1) Sum_{N>=k} T(N,k)(1-d)^N=Catalan(n). - Joachim Wuttke, Sep 11 2014
Multiplying the n-th column by n! generates the revert of the unsigned Lah numbers, A089231. - Tom Copeland, Jan 07 2016
Row polynomials: (x - 1)^(n+1)*(P(n+1,(1 + x)/(x - 1)) - P(n-1,(1 + x)/(x - 1)))/((4*n + 2)), n = 1,2,... and where P(n,x) denotes the n-th Legendre polynomial. - Peter Bala, Mar 03 2017
The coefficients of the row polynomials R(n, x) = hypergeom([-n,-n-1], [2], x) generate the triangle based in (0,0). - Peter Luschny, Mar 19 2018
Multiplying the n-th diagonal by n!, with the main diagonal n=1, generates the Lah matrix A105278. With G equal to the infinitesimal generator of A132710, the Narayana triangle equals Sum_{n >= 0} G^n/((n+1)!*n!) = (sqrt(G))^(-1) * I_1(2*sqrt(G)), where G^0 is the identity matrix and I_1(x) is the modified Bessel function of the first kind of order 1. (cf. Sep 21 2011 formula also.) - Tom Copeland, Sep 23 2020
T(n,k) = T(n,k-1)*C(n-k+2,2)/C(k,2). - Yuchun Ji, Dec 21 2020
EXAMPLE
The initial rows of the triangle are:
[1] 1
[2] 1, 1
[3] 1, 3, 1
[4] 1, 6, 6, 1
[5] 1, 10, 20, 10, 1
[6] 1, 15, 50, 50, 15, 1
[7] 1, 21, 105, 175, 105, 21, 1
[8] 1, 28, 196, 490, 490, 196, 28, 1
[9] 1, 36, 336, 1176, 1764, 1176, 336, 36, 1;
...
For all n, 12...n (1 block) and 1|2|3|...|n (n blocks) are noncrossing set partitions.
Example of umbral representation:
A007318(5,k)=[1,5/1,5*4/(2*1),...,1]=(1,5,10,10,5,1),
so A001263(5,k)={1,b(5)/b(1),b(5)*b(4)/[b(2)*b(1)],...,1}
= [1,30/2,30*20/(6*2),...,1]=(1,15,50,50,15,1).
First = last term = b.(5!)/[b.(0!)*b.(5!)]= 1. - Tom Copeland, Sep 21 2011
Row polynomials and diagonal sequences of A103371: n = 4, P(4, x) = 1 + 6*x + 6*x^2 + x^3, and the o.g.f. of fifth diagonal is G(4, x) = 5* P(4, x)/(1 - x)^9, namely [5, 75, 525, ...]. See a comment above. - Wolfdieter Lang, Jul 31 2017
MAPLE
A001263 := (n, k)->binomial(n-1, k-1)*binomial(n, k-1)/k;
a:=proc(n, k) option remember; local i; if k=1 or k=n then 1 else add(binomial(n+i-1, 2*k-2)*a(k-1, i), i=1..k-1); fi; end:
# Alternatively, as a (0, 0)-based triangle:
R := n -> simplify(hypergeom([-n, -n-1], [2], x)): Trow := n -> seq(coeff(R(n, x), x, j), j=0..n): seq(Trow(n), n=0..9); # Peter Luschny, Mar 19 2018
MATHEMATICA
T[n_, k_] := If[k==0, 0, Binomial[n-1, k-1] Binomial[n, k-1] / k];
Flatten[Table[Binomial[n-1, k-1] Binomial[n, k-1]/k, {n, 15}, {k, n}]] (* Harvey P. Dale, Feb 29 2012 *)
TRow[n_] := CoefficientList[Hypergeometric2F1[1 - n, -n, 2, x], x];
Table[TRow[n], {n, 1, 11}] // Flatten (* Peter Luschny, Mar 19 2018 *)
aot[n_]:=If[n==1, {{}}, Join@@Table[Tuples[aot/@c], {c, Join@@Permutations/@IntegerPartitions[n-1]}]];
Table[Length[Select[aot[n], Length[Position[#, {}]]==k&]], {n, 2, 9}, {k, 1, n-1}] (* Gus Wiseman, Jan 23 2023 *)
PROG
(PARI) {a(n, k) = if(k==0, 0, binomial(n-1, k-1) * binomial(n, k-1) / k)};
(PARI) {T(n, k)=polcoeff(polcoeff(exp(sum(m=1, n, sum(j=0, m, binomial(m, j)^2*y^j)*x^m/m) +O(x^(n+1))), n, x), k, y)} \\ Paul D. Hanna, Oct 13 2010
(Haskell)
a001263 n k = a001263_tabl !! (n-1) !! (k-1)
a001263_row n = a001263_tabl !! (n-1)
a001263_tabl = zipWith dt a007318_tabl (tail a007318_tabl) where
dt us vs = zipWith (-) (zipWith (*) us (tail vs))
(zipWith (*) (tail us ++ [0]) (init vs))
-- Reinhard Zumkeller, Oct 10 2013
(Magma) /* triangle */ [[Binomial(n-1, k-1)*Binomial(n, k-1)/k : k in [1..n]]: n in [1.. 15]]; // Vincenzo Librandi, Oct 19 2014
(Sage)
@CachedFunction
def T(n, k):
if k == n or k == 1: return 1
if k <= 0 or k > n: return 0
return binomial(n, 2) * (T(n-1, k)/((n-k)*(n-k+1)) + T(n-1, k-1)/(k*(k-1)))
for n in (1..9): print([T(n, k) for k in (1..n)]) # Peter Luschny, Oct 28 2014
(GAP) Flat(List([1..11], n->List([1..n], k->Binomial(n-1, k-1)*Binomial(n, k-1)/k))); # Muniru A Asiru, Jul 12 2018
CROSSREFS
Other versions are in A090181 and A131198. - Philippe Deléham, Nov 18 2007
Cf. variants: A181143, A181144. - Paul D. Hanna, Oct 13 2010
Row sums give A000108 (Catalan numbers), n>0.
A008459 (h-vectors type B associahedra), A033282 (f-vectors type A associahedra), A145903 (h-vectors type D associahedra), A145904 (Hilbert transform). - Peter Bala, Oct 27 2008
Cf. A016098 and A189232 for numbers of crossing set partitions.
Cf. A243752.
Triangles of generalized binomial coefficients (n,k)_m (or generalized Pascal triangles) for m = 1,...,12: A007318 (Pascal), A001263, A056939, A056940, A056941, A142465, A142467, A142468, A174109, A342889, A342890, A342891.
KEYWORD
nonn,easy,tabl,nice,look
EXTENSIONS
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021
STATUS
approved
Number of binary words of length n (beginning with 0) whose autocorrelation function is the indicator of a singleton.
+10
29
1, 1, 2, 3, 6, 10, 20, 37, 74, 142, 284, 558, 1116, 2212, 4424, 8811, 17622, 35170, 70340, 140538, 281076, 561868, 1123736, 2246914, 4493828, 8986540, 17973080, 35943948, 71887896, 143771368, 287542736, 575076661, 1150153322, 2300289022, 4600578044, 9201120918
OFFSET
1,3
COMMENTS
The number of binary strings sharing the same autocorrelations.
Appears to be row sums of A155092, beginning from a(2). - Mats Granvik, Jan 20 2009
The number of binary words of length n (beginning with 0) which do not start with an even palindrome (i.e. which are not of the form ss*t where s is a (nonempty) word, s* is its reverse, and t is any (possibly empty) word). - Mamuka Jibladze, Sep 30 2014
From Gus Wiseman, Mar 08 2021: (Start)
This sequence counts each of the following essentially equivalent things:
1. Sets of distinct positive integers with maximum n in which all adjacent elements have quotients > 1/2. For example, the a(1) = 1 through a(6) = 10 sets are:
{1} {2} {3} {4} {5} {6}
{2,3} {3,4} {3,5} {4,6}
{2,3,4} {4,5} {5,6}
{2,3,5} {3,4,6}
{3,4,5} {3,5,6}
{2,3,4,5} {4,5,6}
{2,3,4,6}
{2,3,5,6}
{3,4,5,6}
{2,3,4,5,6}
2. For n > 1, sets of distinct positive integers with maximum n - 1 whose first-differences are term-wise less than their decapitation (remove the maximum). For example, the set q = {2,4,5} has first-differences (2,1), which are not less than (2,4), so q is not counted under a(5). On the other hand, r = {2,3,5,6} has first-differences {1,2,1}, which are less than {2,3,5}, so r is counted under a(6).
3. Compositions of n where each part after the first is less than the sum of all preceding parts. For example, the a(1) = 1 through a(6) = 10 compositions are:
(1) (2) (3) (4) (5) (6)
(21) (31) (41) (51)
(211) (32) (42)
(311) (411)
(212) (321)
(2111) (312)
(3111)
(2121)
(2112)
(21111)
(End)
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..3324 (first 500 terms from T. D. Noe)
E. H. Rivals, S. Rahmann Combinatorics of Periods in Strings
E. H. Rivals, S. Rahmann, Combinatorics of Periods in Strings, Journal of Combinatorial Theory - Series A, Vol. 104(1) (2003), pp. 95-113.
FORMULA
a(2n) = 2*a(2n-1) - a(n) for n >= 1; a(2n+1) = 2*a(2n) for n >= 1.
a(n) = A342085(2^n). - Gus Wiseman, Mar 08 2021
MAPLE
a:= proc(n) option remember; `if`(n=0, 1/2,
2*a(n-1)-`if`(n::odd, 0, a(n/2)))
end:
seq(a(n), n=1..40); # Alois P. Heinz, Jun 24 2021
MATHEMATICA
a[1] = 1; a[n_] := a[n] = If[EvenQ[n], 2*a[n-1] - a[n/2], 2*a[n-1]]; Array[a, 40] (* Jean-François Alcover, Jul 17 2015 *)
Table[Length[Select[Subsets[Range[n]], MemberQ[#, n]&&Min@@Divide@@@Partition[#, 2, 1]>1/2&]], {n, 8}] (* Gus Wiseman, Mar 08 2021 *)
PROG
(PARI) a(n)=if(n<2, n>0, 2*a(n-1)-(1-n%2)*a(n\2))
CROSSREFS
Cf. A002083, A005434. A003000 = 2*a(n) for n > 0.
Different from, but easily confused with, A007148 and A093371.
The version with quotients <= 1/2 is A018819.
The version with quotients < 1/2 is A040039.
Multiplicative versions are A337135, A342083, A342084, A342085.
A000045 counts sets containing n with all differences > 2.
A000929 counts partitions with no adjacent parts having quotient < 2.
A342094 counts partitions with no adjacent parts having quotient > 2.
KEYWORD
nonn,easy,nice
AUTHOR
Torsten.Sillke(AT)uni-bielefeld.de
EXTENSIONS
More terms from James A. Sellers.
Additional comments from Michael Somos, Jun 09 2000
STATUS
approved
Atkinson-Negro-Santoro sequence: a(n+1) = 2*a(n) - a(n-floor(n/2+1)).
(Formerly M1076)
+10
7
0, 1, 2, 4, 7, 13, 24, 46, 88, 172, 337, 667, 1321, 2629, 5234, 10444, 20842, 41638, 83188, 166288, 332404, 664636, 1328935, 2657533, 5314399, 10628131, 21254941, 42508561, 85014493, 170026357, 340047480, 680089726, 1360169008, 2720327572
OFFSET
0,3
COMMENTS
For each n, the n-term sequence (b(k) = a(n) - a(n-k), 1 <= k <= n), has the property that all 2^n sums of subsets of the terms are distinct.
a(n) = A062178(n+1) - 1; see also A002083. - Reinhard Zumkeller, Nov 18 2012
REFERENCES
S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 2.28.
T. V. Narayana, Recent progress and unsolved problems in dominance theory, pp. 68-78 of Combinatorial mathematics (Canberra 1977), Lect. Notes Math. Vol. 686, 1978.
T. V. Narayana, Lattice Path Combinatorics with Statistical Applications. Univ. Toronto Press, 1979, pp. 100-101.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
M. D. Atkinson et al., Sums of lexicographically ordered sets, Discrete Math., 80 (1990), 115-122.
W. F. Lunnon, Integer sets with distinct subset-sums, Math. Comp. 50 (1988), 297-320.
B. E. Wynne & N. J. A. Sloane, Correspondence, 1976-84
Bayard Edmund Wynne, and T. V. Narayana, Tournament configuration and weighted voting, Cahiers du bureau universitaire de recherche opérationnelle, 36 (1981): 75-78.
EXAMPLE
For n = 4, the sequence b is 7-4,7-2,7-1,7-0 = 3,5,6,7, which has subset sums (grouped by number of terms) 0, 3,5,6,7, 8,9,10,11,12,13, 14,15,16,18, 21.
MATHEMATICA
a[ 0 ] := 0; a[ 1 ] := 1; a[ n_ ] := 2*a[ n - 1 ] - a[(n - 1) - Floor[ (n - 1)/2 + 1 ] ]; For[ n = 1, n <= 100, n++, Print[ a[ n ] ] ];
PROG
(Haskell)
a005255 n = a005255_list !! (n-1)
a005255_list = scanl (+) 0 $ tail a002083_list
-- Reinhard Zumkeller, Nov 18 2012
CROSSREFS
KEYWORD
nonn,easy,nice
EXTENSIONS
More terms from Winston C. Yang (winston(AT)cs.wisc.edu), Aug 26 2000
Edited by Franklin T. Adams-Watters, Apr 11 2009
STATUS
approved
a(n) is the number of permutations avoiding 231 and 312 realizable on increasing strict binary trees with 2n-1 nodes.
+10
6
1, 2, 6, 22, 84, 330, 1308, 5210, 20796, 83100, 332232, 1328598, 5313732, 21253620, 85011864, 340042246, 1360158564
OFFSET
1,2
COMMENTS
The number of permutations avoiding 231 and 312 in the classical sense which can be realized as labels on an increasing strict binary tree with 2n-1 nodes. A strict binary tree is a tree graph where each node has 0 or 2 children. The permutation is found by reading the labels in the order they appear in a breadth-first search. (Note that breadth-first search reading word is equivalent to reading the tree left to right by levels, starting with the root.)
In some cases, more than one tree results in the same breadth-first search reading word, but here we count the permutations, not the trees.
EXAMPLE
For example, when n=3, the permutations 12543, 12435, 13245, 13254, 12345,and 12354. all avoid 231 and 312 in the classical sense and occur as breadth-first search reading words on an increasing strict binary tree with 5 nodes.
. 1 1 1 1 1 1
. / \ / \ / \ / \ / \ / \
. 2 5 2 4 3 2 3 2 2 3 2 3
. / \ / \ / \ / \ / \ / \
. 4 3 3 5 4 5 5 4 4 5 5 4
CROSSREFS
A bisection of A002083.
KEYWORD
nonn,more
AUTHOR
Manda Riehl, Aug 05 2014
EXTENSIONS
More terms from N. J. A. Sloane, Jul 07 2015
STATUS
approved
Triangle read by rows: T(n,k) (n >= 1, 1 <= k< = n) gives number of non-distorting tie-avoiding integer vote weights.
+10
5
1, 1, 2, 2, 3, 4, 3, 5, 6, 7, 6, 9, 11, 12, 13, 11, 17, 20, 22, 23, 24, 22, 33, 39, 42, 44, 45, 46, 42, 64, 75, 81, 84, 86, 87, 88, 84, 126, 148, 159, 165, 168, 170, 171, 172, 165, 249, 291, 313, 324, 330, 333, 335, 336, 337, 330, 495, 579, 621, 643, 654, 660, 663, 665
OFFSET
1,3
COMMENTS
T(n,1) = T(n,floor(n/2)+1) = A002083(n+2). - Reinhard Zumkeller, Nov 18 2012
REFERENCES
Author?, Solution to Board of Directors Problem, J. Rec. Math., 9 (No. 3, 1977), 240.
T. V. Narayana, Lattice Path Combinatorics with Statistical Applications. Univ. Toronto Press, 1979, pp. 100-101.
LINKS
M. Klamkin, ed., Problems in Applied Mathematics: Selections from SIAM Review, SIAM, 1990; see pp. 122-123.
G. Kreweras, Sur quelques problèmes relatifs au vote pondéré, [Some problems of weighted voting], Math. Sci. Humaines No. 84 (1983), 45-63.
B. E. Wynne & N. J. A. Sloane, Correspondence, 1976-84
Bayard Edmund Wynne, and T. V. Narayana, Tournament configuration and weighted voting, Cahiers du bureau universitaire de recherche opérationnelle, 36 (1981): 75-78.
Solution to Board of Directors Problem, J. Rec. Math., 9 (No. 3, 1977), 240. (Annotated scanned copy)
FORMULA
T(1,1) = 1;
T(n,1) = T(n-1, floor((n+1)/2));
T(n,k) = T(n,1) + T(n-1,k-1) for k > 1.
EXAMPLE
Triangle:
1;
1, 2;
2, 3, 4;
3, 5, 6, 7;
6, 9, 11, 12, 13;
...
MATHEMATICA
a[1, 1] = 1; a[n_, 1] := a[n, 1] = a[n - 1, Floor[(n + 1)/2]]; a[n_, k_ /; k > 1] := a[n, k] = a[n, 1] + a[n - 1, k - 1]; A037254 = Flatten[ Table[ a[n, k], {n, 1, 11}, {k, 1, n}]] (* Jean-François Alcover, Apr 03 2012, after given recurrence *)
PROG
(Haskell)
a037254 n k = a037254_tabl !! (n-1) !! (k-1)
a037254_row n = a037254_tabl !! (n-1)
a037254_tabl = map fst $ iterate f ([1], drop 2 a002083_list) where
f (row, (x:xs)) = (map (+ x) (0 : row), xs)
-- Reinhard Zumkeller, Nov 18 2012
(Python)
def T(n, k):
if k==1:
if n==1: return 1
else: return T(n - 1, (n + 1)//2)
return T(n, 1) + T(n - 1, k - 1)
for n in range(1, 12): print([T(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, Jun 03 2017
CROSSREFS
Row sums give A005254. A002083 is a column. See also A005318, A096858.
KEYWORD
nonn,tabl,nice
EXTENSIONS
More terms from (and formula corrected by) James A. Sellers, Feb 04 2000
STATUS
approved

Search completed in 0.053 seconds