cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-7 of 7 results.

A182584 Central terms of the triangle A182579.

Original entry on oeis.org

1, 1, 4, 5, 20, 27, 112, 156, 660, 935, 4004, 5733, 24752, 35700, 155040, 224808, 980628, 1427679, 6249100, 9126975, 40060020, 58659315, 258048960, 378658800, 1668903600, 2453288292, 10829900592, 15944020316, 70480305440, 103897691640, 459823234112
Offset: 0

Views

Author

Reinhard Zumkeller, May 06 2012

Keywords

Comments

a(n) = A182579(2*n,n);
a(2*n+1) = A052227(n).

Programs

  • Haskell
    a182584 n = a182579 (2*n) n

A000204 Lucas numbers (beginning with 1): L(n) = L(n-1) + L(n-2) with L(1) = 1, L(2) = 3.

Original entry on oeis.org

1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, 2207, 3571, 5778, 9349, 15127, 24476, 39603, 64079, 103682, 167761, 271443, 439204, 710647, 1149851, 1860498, 3010349, 4870847, 7881196, 12752043, 20633239, 33385282, 54018521, 87403803, 141422324
Offset: 1

Views

Author

Keywords

Comments

See A000032 for the version beginning 2, 1, 3, 4, 7, ...
Also called Schoute's accessory series (see Jean, 1984). - N. J. A. Sloane, Jun 08 2011
L(n) is the number of matchings in a cycle on n vertices: L(4)=7 because the matchings in a square with edges a, b, c, d (labeled consecutively) are the empty set, a, b, c, d, ac and bd. - Emeric Deutsch, Jun 18 2001
This comment covers a family of sequences which satisfy a recurrence of the form a(n) = a(n-1) + a(n-m), with a(n) = 1 for n = 1..m - 1, a(m) = m + 1. The generating function is (x + m*x^m)/(1 - x - x^m). Also a(n) = 1 + n*Sum_{i=1..n/m} binomial(n - 1 - (m - 1)*i, i - 1)/i. This gives the number of ways to cover (without overlapping) a ring lattice (or necklace) of n sites with molecules that are m sites wide. Special cases: m = 2: A000204, m = 3: A001609, m = 4: A014097, m = 5: A058368, m = 6: A058367, m = 7: A058366, m = 8: A058365, m = 9: A058364.
L(n) is the number of points of period n in the golden mean shift. The number of orbits of length n in the golden mean shift is given by the n-th term of the sequence A006206. - Thomas Ward, Mar 13 2001
Row sums of A029635 are 1, 1, 3, 4, 7, ... - Paul Barry, Jan 30 2005
a(n) counts circular n-bit strings with no repeated 1's. E.g., for a(5): 00000 00001 00010 00100 00101 01000 01001 01010 10000 10010 10100. Note #{0...} = fib(n+1), #{1...} = fib(n-1), #{000..., 001..., 100...} = a(n-1), #{010..., 101...} = a(n-2). - Len Smiley, Oct 14 2001
Row sums of the triangle in A182579. - Reinhard Zumkeller, May 07 2012
If p is prime then L(p) == 1 (mod p). L(2^k) == -1 (mod 2^(k+1)) for k = 0,1,2,... - Thomas Ordowski, Sep 25 2013
Satisfies Benford's law [Brown-Duncan, 1970; Berger-Hill, 2017]. - N. J. A. Sloane, Feb 08 2017

Examples

			G.f. = x + 3*x^2 + 4*x^3 + 7*x^4 + 11*x^5 + 18*x^6 + 29*x^7 + 47*x^8 + ...
		

References

  • P. Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 69.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 46.
  • Leonhard Euler, Introductio in analysin infinitorum (1748), sections 216 and 229.
  • G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 148.
  • Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
  • V. E. Hoggatt, Jr., Fibonacci and Lucas Numbers. Houghton, Boston, MA, 1969.
  • R. V. Jean, Mathematical Approach to Pattern and Form in Plant Growth, Wiley, 1984. See p. 5. - N. J. A. Sloane, Jun 08 2011
  • Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", John Wiley and Sons, 2001.
  • 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).
  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989.

Crossrefs

Programs

  • Haskell
    a000204 n = a000204_list !! n
    a000204_list = 1 : 3 : zipWith (+) a000204_list (tail a000204_list)
    -- Reinhard Zumkeller, Dec 18 2011
    
  • Magma
    [Lucas(n): n in [1..30]]; // G. C. Greubel, Dec 17 2017
    
  • Maple
    A000204 := proc(n) option remember; if n <=2 then 2*n-1; else procname(n-1)+procname(n-2); fi; end;
    with(combinat): A000204 := n->fibonacci(n+1)+fibonacci(n-1);
    # alternative Maple program:
    L:= n-> (<<1|1>, <1|0>>^n. <<2, -1>>)[1, 1]:
    seq(L(n), n=1..50);  # Alois P. Heinz, Jul 25 2008
    # Alternative:
    a := n -> `if`(n=1, 1, `if`(n=2, 3, hypergeom([(1-n)/2, -n/2], [1-n], -4))):
    seq(simplify(a(n)), n=1..39); # Peter Luschny, Sep 03 2019
  • Mathematica
    c = (1 + Sqrt[5])/2; Table[Expand[c^n + (1 - c)^n], {n, 30}] (* Artur Jasinski, Oct 05 2008 *)
    Table[LucasL[n, 1], {n, 36}] (* Zerinvary Lajos, Jul 09 2009 *)
    LinearRecurrence[{1, 1},{1, 3}, 50] (* Sture Sjöstedt, Nov 28 2011 *)
    lukeNum[n_] := If[n < 1, 0, LucasL[n]]; (* Michael Somos, May 18 2015 *)
    lukeNum[n_] := SeriesCoefficient[x D[Log[1 / (1 - x - x^2)], x], {x, 0, n}]; (* Michael Somos, May 18 2015 *)
  • PARI
    A000204(n)=fibonacci(n+1)+fibonacci(n-1) \\ Michael B. Porter, Nov 05 2009
    
  • Python
    from functools import cache
    @cache
    def a(n): return [1, 3][n-1] if n < 3 else a(n-1) + a(n-2)
    print([a(n) for n in range(1, 41)]) # Michael S. Branicky, Nov 13 2022
    
  • Python
    [(i:=-1)+(j:=2)] + [(j:=i+j)+(i:=j-i) for  in range(100)] # _Jwalin Bhatt, Apr 02 2025
  • Sage
    def A000204():
        x, y = 1, 2
        while true:
           yield x
           x, y = x + y, x
    a = A000204(); print([next(a) for i in range(39)])  # Peter Luschny, Dec 17 2015
    
  • Scala
    def lucas(n: BigInt): BigInt = {
      val zero = BigInt(0)
      def fibTail(n: BigInt, a: BigInt, b: BigInt): BigInt = n match {
        case `zero` => a
        case _ => fibTail(n - 1, b, a + b)
      }
      fibTail(n, 2, 1)
    }
    (1 to 50).map(lucas()) // _Alonso del Arte, Oct 20 2019
    

Formula

Expansion of x(1 + 2x)/(1 - x - x^2). - Simon Plouffe, dissertation 1992; multiplied by x. - R. J. Mathar, Nov 14 2007
a(n) = A000045(2n)/A000045(n). - Benoit Cloitre, Jan 05 2003
For n > 1, L(n) = F(n + 2) - F(n - 2), where F(n) is the n-th Fibonacci number (A000045). - Gerald McGarvey, Jul 10 2004
a(n+1) = 4*A054886(n+3) - A022388(n) - 2*A022120(n+1) (a conjecture; note that the above sequences have different offsets). - Creighton Dement, Nov 27 2004
a(n) = Sum_{k=0..floor((n+1)/2)} (n+1)*binomial(n - k + 1, k)/(n - k + 1). - Paul Barry, Jan 30 2005
L(n) = A000045(n+3) - 2*A000045(n). - Creighton Dement, Oct 07 2005
L(n) = A000045(n+1) + A000045(n-1). - John Blythe Dobson, Sep 29 2007
a(n) = 2*Fibonacci(n-1) + Fibonacci(n), n >= 1. - Zerinvary Lajos, Oct 05 2007
L(n) is the term (1, 1) in the 1 X 2 matrix [2, -1].[1, 1; 1, 0]^n. - Alois P. Heinz, Jul 25 2008
a(n) = phi^n + (1 - phi)^n = phi^n + (-phi)^(-n) = ((1 + sqrt(5))^n + (1 - sqrt(5))^n)/(2^n) where phi is the golden ratio (A001622). - Artur Jasinski, Oct 05 2008
a(n) = A014217(n+1) - A014217(n-1). See A153263. - Paul Curtz, Dec 22 2008
a(n) = ((1 + sqrt(5))^n - (1 - sqrt(5))^n)/(2^n*sqrt(5)) + ((1 + sqrt(5))^(n - 1) - (1 - sqrt(5))^(n - 1))/(2^(n - 2)*sqrt(5)). - Al Hakanson (hawkuu(AT)gmail.com), Jan 12 2009, Jan 14 2009
From Hieronymus Fischer, Oct 20 2010 (Start)
Continued fraction for n odd: [L(n); L(n), L(n), ...] = L(n) + fract(Fib(n) * phi).
Continued fraction for n even: [L(n); -L(n), L(n), -L(n), L(n), ...] = L(n) - 1 + fract(Fib(n)*phi). Also: [L(n) - 2; 1, L(n) - 2, 1, L(n) - 2, ...] = L(n) - 2 + fract(Fib(n)*phi). (End)
INVERT transform of (1, 2, -1, -2, 1, 2, ...). - Gary W. Adamson, Mar 07 2012
L(2n - 1) = floor(phi^(2n - 1)); L(2n) = ceiling(phi^(2n)). - Thomas Ordowski, Jun 15 2012
a(n) = hypergeom([(1 - n)/2, -n/2], [1 - n], -4) for n >= 3. - Peter Luschny, Sep 03 2019
E.g.f.: 2*(exp(x/2)*cosh(sqrt(5)*x/2) - 1). - Stefano Spezia, Jul 26 2022

Extensions

Additional comments from Yong Kong (ykong(AT)curagen.com), Dec 16 2000
Plouffe Maple line edited by N. J. A. Sloane, May 13 2008

A040000 a(0)=1; a(n)=2 for n >= 1.

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Continued fraction expansion of sqrt(2) is 1 + 1/(2 + 1/(2 + 1/(2 + ...))).
Inverse binomial transform of Mersenne numbers A000225(n+1) = 2^(n+1) - 1. - Paul Barry, Feb 28 2003
A Chebyshev transform of 2^n: if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))A(x/(1+x^2)). - Paul Barry, Oct 31 2004
An inverse Catalan transform of A068875 under the mapping g(x)->g(x(1-x)). A068875 can be retrieved using the mapping g(x)->g(xc(x)), where c(x) is the g.f. of A000108. A040000 and A068875 may be described as a Catalan pair. - Paul Barry, Nov 14 2004
Sequence of electron arrangement in the 1s 2s and 3s atomic subshells. Cf. A001105, A016825. - Jeremy Gardiner, Dec 19 2004
Binomial transform of A165326. - Philippe Deléham, Sep 16 2009
Let m=2. We observe that a(n) = Sum_{k=0..floor(n/2)} binomial(m,n-2*k). Then there is a link with A113311 and A115291: it is the same formula with respectively m=3 and m=4. We can generalize this result with the sequence whose g.f. is given by (1+z)^(m-1)/(1-z). - Richard Choulet, Dec 08 2009
With offset 1: number of permutations where |p(i) - p(i+1)| <= 1 for n=1,2,...,n-1. This is the identical permutation and (for n>1) its reversal.
Equals INVERT transform of bar(1, 1, -1, -1, ...).
Eventual period is (2). - Zak Seidov, Mar 05 2011
Also decimal expansion of 11/90. - Vincenzo Librandi, Sep 24 2011
a(n) = 3 - A054977(n); right edge of the triangle in A182579. - Reinhard Zumkeller, May 07 2012
With offset 1: minimum cardinality of the range of a periodic sequence with (least) period n. Of course the range's maximum cardinality for a purely periodic sequence with (least) period n is n. - Rick L. Shepherd, Dec 08 2014
With offset 1: n*a(1) + (n-1)*a(2) + ... + 2*a(n-1) + a(n) = n^2. - Warren Breslow, Dec 12 2014
With offset 1: decimal expansion of gamma(4) = 11/9 where gamma(n) = Cp(n)/Cv(n) is the n-th Poisson's constant. For the definition of Cp and Cv see A272002. - Natan Arie Consigli, Sep 11 2016
a(n) equals the number of binary sequences of length n where no two consecutive terms differ. Also equals the number of binary sequences of length n where no two consecutive terms are the same. - David Nacin, May 31 2017
a(n) is the period of the continued fractions for sqrt((n+2)/(n+1)) and sqrt((n+1)/(n+2)). - A.H.M. Smeets, Dec 05 2017
Also, number of self-avoiding walks and coordination sequence for the one-dimensional lattice Z. - Sean A. Irvine, Jul 27 2020

Examples

			sqrt(2) = 1.41421356237309504... = 1 + 1/(2 + 1/(2 + 1/(2 + 1/(2 + ...)))). - _Harry J. Smith_, Apr 21 2009
G.f. = 1 + 2*x + 2*x^2 + 2*x^3 + 2*x^4 + 2*x^5 + 2*x^6 + 2*x^7 + 2*x^8 + ...
11/90 = 0.1222222222222222222... - _Natan Arie Consigli_, Sep 11 2016
		

References

  • A. Beiser, Concepts of Modern Physics, 2nd Ed., McGraw-Hill, 1973.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 186.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §4.4 Powers and Roots, p. 144.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 276-278.

Crossrefs

Convolution square is A008574.
See A003945 etc. for (1+x)/(1-k*x).
From Jaume Oliver Lafont, Mar 26 2009: (Start)
Sum_{0<=k<=n} a(k) = A005408(n).
Prod_{0<=k<=n} a(k) = A000079(n). (End)
Cf. A000674 (boustrophedon transform).
Cf. A001333/A000129 (continued fraction convergents).
Cf. A000122, A002193 (sqrt(2) decimal expansion), A006487 (Egyptian fraction).
Cf. Other continued fractions for sqrt(a^2+1) = (a, 2a, 2a, 2a....): A040002 (contfrac(sqrt(5)) = (2,4,4,...)), A040006, A040012, A040020, A040030, A040042, A040056, A040072, A040090, A040110 (contfrac(sqrt(122)) = (11,22,22,...)), A040132, A040156, A040182, A040210, A040240, A040272, A040306, A040342, A040380, A040420 (contfrac(sqrt(442)) = (21,42,42,...)), A040462, A040506, A040552, A040600, A040650, A040702, A040756, A040812, A040870, A040930 (contfrac(sqrt(962)) = (31,62,62,...)).

Programs

  • Haskell
    a040000 0 = 1; a040000 n = 2
    a040000_list = 1 : repeat 2  -- Reinhard Zumkeller, May 07 2012
  • Maple
    Digits := 100: convert(evalf(sqrt(2)),confrac,90,'cvgts'):
  • Mathematica
    ContinuedFraction[Sqrt[2],300] (* Vladimir Joseph Stephan Orlovsky, Mar 04 2011 *)
    a[ n_] := 2 - Boole[n == 0]; (* Michael Somos, Dec 28 2014 *)
    PadRight[{1},120,2] (* or *) RealDigits[11/90, 10, 120][[1]] (* Harvey P. Dale, Jul 12 2025 *)
  • PARI
    {a(n) = 2-!n}; /* Michael Somos, Apr 16 2007 */
    
  • PARI
    a(n)=1+sign(n)  \\ Jaume Oliver Lafont, Mar 26 2009
    
  • PARI
    allocatemem(932245000); default(realprecision, 21000); x=contfrac(sqrt(2)); for (n=0, 20000, write("b040000.txt", n, " ", x[n+1]));  \\ Harry J. Smith, Apr 21 2009
    

Formula

G.f.: (1+x)/(1-x). - Paul Barry, Feb 28 2003
a(n) = 2 - 0^n; a(n) = Sum_{k=0..n} binomial(1, k). - Paul Barry, Oct 16 2004
a(n) = n*Sum_{k=0..floor(n/2)} (-1)^k*binomial(n-k, k)*2^(n-2*k)/(n-k). - Paul Barry, Oct 31 2004
A040000(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*(-1)^k*A068875(n-k). - Paul Barry, Nov 14 2004
From Michael Somos, Apr 16 2007: (Start)
Euler transform of length 2 sequence [2, -1].
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = (u-v)*(u+v) - 2*v*(u-w).
E.g.f.: 2*exp(x) - 1.
a(n) = a(-n) for all n in Z (one possible extension to n<0). (End)
G.f.: (1-x^2)/(1-x)^2. - Jaume Oliver Lafont, Mar 26 2009
G.f.: exp(2*atanh(x)). - Jaume Oliver Lafont, Oct 20 2009
a(n) = Sum_{k=0..n} A108561(n,k)*(-1)^k. - Philippe Deléham, Nov 17 2013
a(n) = 1 + sign(n). - Wesley Ivan Hurt, Apr 16 2014
10 * 11/90 = 11/9 = (11/2 R)/(9/2 R) = Cp(4)/Cv(4) = A272005/A272004, with R = A081822 (or A070064). - Natan Arie Consigli, Sep 11 2016
a(n) = A001227(A000040(n+1)). - Omar E. Pol, Feb 28 2018

A109613 Odd numbers repeated.

Original entry on oeis.org

1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21, 21, 23, 23, 25, 25, 27, 27, 29, 29, 31, 31, 33, 33, 35, 35, 37, 37, 39, 39, 41, 41, 43, 43, 45, 45, 47, 47, 49, 49, 51, 51, 53, 53, 55, 55, 57, 57, 59, 59, 61, 61, 63, 63, 65, 65, 67, 67, 69, 69, 71, 71, 73
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 01 2005

Keywords

Comments

The number of rounds in a round-robin tournament with n competitors. - A. Timothy Royappa, Aug 13 2011
Diagonal sums of number triangle A113126. - Paul Barry, Oct 14 2005
When partitioning a convex n-gon by all the diagonals, the maximum number of sides in resulting polygons is 2*floor(n/2)+1 = a(n-1) (from Moscow Olympiad problem 1950). - Tanya Khovanova, Apr 06 2008
The inverse values of the coefficients in the series expansion of f(x) = (1/2)*(1+x)*log((1+x)/(1-x)) lead to this sequence; cf. A098557. - Johannes W. Meijer, Nov 12 2009
From Reinhard Zumkeller, Dec 05 2009: (Start)
First differences: A010673; partial sums: A000982;
A059329(n) = Sum_{k = 0..n} a(k)*a(n-k);
A167875(n) = Sum_{k = 0..n} a(k)*A005408(n-k);
A171218(n) = Sum_{k = 0..n} a(k)*A005843(n-k);
A008794(n+2) = Sum_{k = 0..n} a(k)*A059841(n-k). (End)
Dimension of the space of weight 2n+4 cusp forms for Gamma_0(5). - Michael Somos, May 29 2013
For n > 4: a(n) = A230584(n) - A230584(n-2). - Reinhard Zumkeller, Feb 10 2015
The arithmetic function v+-(n,2) as defined in A290988. - Robert Price, Aug 22 2017
For n > 0, also the chromatic number of the (n+1)-triangular (Johnson) graph. - Eric W. Weisstein, Nov 17 2017
a(n-1), for n >= 1, is also the upper bound a_{up}(b), where b = 2*n + 1, in the first (top) row of the complete coach system Sigma(b) of Hilton and Pedersen [H-P]. All odd numbers <= a_{up}(b) of the smallest positive restricted residue system of b appear once in the first rows of the c(2*n+1) = A135303(n) coaches. If b is an odd prime a_{up}(b) is the maximum. See a comment in the proof of the quasi-order theorem of H-P, on page 263 ["Furthermore, every possible a_i < b/2 ..."]. For an example see below. - Wolfdieter Lang, Feb 19 2020
Satisfies the nested recurrence a(n) = a(a(n-2)) + 2*a(n-a(n-1)) with a(0) = a(1) = 1. Cf. A004001. - Peter Bala, Aug 30 2022
The binomial transform is 1, 2, 6, 16, 40, 96, 224, 512, 1152, 2560,.. (see A057711). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = 1 + x + 3*x^2 + 3*x^3 + 5*x^4 + 5*x^5 + 7*x^6 + 7*x^7 + 9*x^8 + 9*x^9 + ...
Complete coach system for (a composite) b = 2*n + 1 = 33: Sigma(33) ={[1; 5], [5, 7, 13; 2, 1, 2]} (the first two rows are here 1 and 5, 7, 13), a_{up}(33) = a(15) = 15. But 15 is not in the reduced residue system modulo 33, so the maximal (odd) a number is 13. For the prime b = 31, a_{up}(31) = a(14) = 15 appears as maximum of the first rows. - _Wolfdieter Lang_, Feb 19 2020
		

References

  • Peter Hilton and Jean Pedersen, A Mathematical Tapestry: Demonstrating the Beautiful Unity of Mathematics, Cambridge University Press, 2010, 3rd printing 2012, pp. (260-281).

Crossrefs

Complement of A052928 with respect to the universe A004526. - Guenther Schrack, Aug 21 2018
First differences of A000982, A061925, A074148, A105343, A116940, and A179207. - Guenther Schrack, Aug 21 2018

Programs

Formula

a(n) = 2*floor(n/2) + 1.
a(n) = A052928(n) + 1 = 2*A004526(n) + 1.
a(n) = A028242(n) + A110654(n).
a(n) = A052938(n-2) + A084964(n-2) for n > 1. - Reinhard Zumkeller, Aug 27 2005
G.f.: (1 + x + x^2 + x^3)/(1 - x^2)^2. - Paul Barry, Oct 14 2005
a(n) = 2*a(n-2) - a(n-4), a(0) = 1, a(1) = 1, a(2) = 3, a(3) = 3. - Philippe Deléham, Nov 03 2008
a(n) = A001477(n) + A059841(n). - Philippe Deléham, Mar 31 2009
a(n) = 2*n - a(n-1), with a(0) = 1. - Vincenzo Librandi, Nov 13 2010
a(n) = R(n, -2), where R(n, x) is the n-th row polynomial of A211955. a(n) = (-1)^n + 2*Sum_{k = 1..n} (-1)^(n - k - 2)*4^(k-1)*binomial(n+k, 2*k). Cf. A084159. - Peter Bala, May 01 2012
a(n) = A182579(n+1, n). - Reinhard Zumkeller, May 06 2012
G.f.: ( 1 + x^2 ) / ( (1 + x)*(x - 1)^2 ). - R. J. Mathar, Jul 12 2016
E.g.f.: x*exp(x) + cosh(x). - Ilya Gutkovskiy, Jul 12 2016
From Guenther Schrack, Sep 10 2018: (Start)
a(-n) = -a(n-1).
a(n) = A047270(n+1) - (2*n + 2).
a(n) = A005408(A004526(n)). (End)
a(n) = A000217(n) / A004526(n+1), n > 0. - Torlach Rush, Nov 10 2023

A065941 T(n,k) = binomial(n-floor((k+1)/2), floor(k/2)). Triangle read by rows, for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 4, 3, 3, 1, 1, 1, 5, 4, 6, 3, 1, 1, 1, 6, 5, 10, 6, 4, 1, 1, 1, 7, 6, 15, 10, 10, 4, 1, 1, 1, 8, 7, 21, 15, 20, 10, 5, 1, 1, 1, 9, 8, 28, 21, 35, 20, 15, 5, 1, 1, 1, 10, 9, 36, 28, 56, 35, 35, 15, 6, 1, 1, 1, 11, 10, 45, 36, 84, 56, 70, 35, 21, 6, 1
Offset: 0

Views

Author

Len Smiley, Nov 29 2001

Keywords

Comments

Also the q-Stirling2 numbers at q = -1. - Peter Luschny, Mar 09 2020
Row sums give the Fibonacci sequence. So do the alternating row sums.
Triangle of coefficients of polynomials defined by p(-1,x) = p(0,x) = 1, p(n, x) = x*p(n-1, x) + p(n-2, x), for n >= 1. - Benoit Cloitre, May 08 2005 [rewritten with correct offset. - Wolfdieter Lang, Feb 18 2020]
Another version of triangle in A103631. - Philippe Deléham, Jan 01 2009
The T(n,k) coefficients appear in appendix 2 of Parks's remarkable article "A new proof of the Routh-Hurwitz stability criterion using the second method of Liapunov" if we assume that the b(n) coefficients are all equal to 1 and ignore the first column. The complete version of this triangle including the first column is A103631. - Johannes W. Meijer, Aug 11 2011
Signed ++--++..., the roots are chaotic using f(x) --> x^2 - 2 with cycle lengths shown in A003558 by n-th rows. Example: given row 3, x^3 + x^2 - 2x - 1; the roots are (a = 1.24697, ...; b = -0.445041, ...; c = -1.802937, ...). Then (say using seed b with x^2 - 2) we obtain the trajectory -0.445041, ... -> -1.80193, ... -> 1.24697, ...; matching the entry "3" in A003558(3). - Gary W. Adamson, Sep 06 2011
From Gary W. Adamson, Aug 25 2019: (Start)
Roots to the polynomials and terms in A003558 can all be obtained from the numbers below using a doubling series mod N procedure as follows: (more than one row may result). Any row ends when the trajectory produces a term already used. Then try the next higher odd term not used as the leftmost term, then repeat.
For example, for N = 11, we get: (1, 2, 4, 3, 5), showing that when confronted with two choices after the 4: (8 and -3), pick the smaller (abs) term, = 3. Then for the next row pick 7 (not used) and repeat the algorithm; succeeding only if the trajectory produces new terms. But 7 is also (-4) mod 11 and 4 was used. Therefore what I call the "r-t table" (for roots trajectory) has only one row: (1, 2, 4, 3, 5). Conjecture: The numbers of terms in the first row is equal to A003558 corresponding to N, i.e., 5 in this case with period 2.
Now for the roots to the polynomials. Pick N = 7. The polynomial is x^3 - x^2 - 2x + 1 = 0, with roots 1.8019..., -1.2469... and 0.445... corresponding to 2*cos(j*Pi/N), N = 7, and j = (1, 2, and 3). The terms (1, 2, 3) are the r-t terms for N = 7. For 11, the r-t terms are (1, 2, 4, 3, 5). This implies that given any roots of the corresponding polynomial, they are cyclic using f(x) --> x^2 - 2 with cycle lengths shown in A003558. The terms thus generated are 2*cos(j*Pi), with j = (1, 2, 4, 3, 5). Check: Begin with 2*j*Pi/N, with j = 1 (1.9189...). The other trajectory terms are: --> 1.6825..., --> 0.83083..., -1.3097...; 545...; (a 5 period and cyclic since we can begin with any of the constants). The r-t table for odd N begins as follows:
3...............1
5...............1, 2
7...............1, 2, 3
9...............1, 2, 4
...............3 (singleton terms reduce to "1") (9 has two rows)
11...............1, 2, 4, 3, 5
13...............1, 2, 4, 5, 3, 6
15...............1, 2, 4, 7
................3, 6 (dividing through by the gcd gives (1, 2))
................5. (singleton terms reduce to "1")
The result is that 15 has 3 factors (since 3 rows), and the values of those factors are the previous terms "N", corresponding to the r-t terms in each row. Thus, the first row is new, the second (1, 2), corresponds to N = 5, and the "1" in row 3 corresponds to N = 3. The factors are those values apart from 15 and 1. Note that all of the unreduced r-t terms in all rows for N form a complete set of the terms 1 through (N-1)/2 without duplication. (End)
From Gary W. Adamson, Sep 30 2019: (Start)
The 3 factors of the 7th degree polynomial for 15: (x^7 - x^6 - 6x^5 + 5x^4 + 10x^3 - 6x^2 - 4x + 1) can be determined by getting the roots for 2*cos(j*Pi/1), j = (1, 2, 4, 7) and finding the corresponding polynomial, which is x^4 + x^3 - 4x^2 - 4x + 1. This is the minimal polynomial for N = 15 as shown in Table 2, p. 46 of (Lang). The degree of this polynomial is 4, corresponding to the entry in A003558 for 15, = 4. The trajectories (3, 6) and (5) are j values for 2*cos(j*Pi/15) which are roots to x^2 - x - 1 (relating to the pentagon), and (x - 1), relating to the triangle. (End)
From Gary W. Adamson, Aug 21 2019: (Start)
Matrices M of the form: (1's in the main diagonal, -1's in the subdiagonal, and the rest zeros) are chaotic if we replace (f(x) --> x^2 - 2) with f(x) --> M^2 - 2I, where I is the Identity matrix [1, 0, 0; 0, 1, 0; 0, 0, 1]. For example, with the 3 X 3 matrix M: [0, 0, 1; 0, 1, -1; 1, -1, 0]; the f(x) trajectory is:
....M^2 - 2I: [-1, -1, 0; -1, 0, -1; 0, -1, 0], then for the latter,
....M^2 - 2I: [0, 1, 1; 1, 0, 0; 1, 0, -1]. The cycle ends with period 3 since the next matrix is (-1) * the seed matrix. As in the case with f(x) --> x^2 - 2, the eigenvalues of the 3 chaotic matrices are (abs) 1.24697, 0.44504... and 1.80193, ... Also, the characteristic equations of the 3 matrices are the same as or variants of row 4 of the triangle below: (x^3 + x - 2x - 1) with different signs. (End)
Received from Herb Conn, Jan 2004: (Start)
Let x = 2*cos(2A) (A = Angle); then
sin(A)/sin A = 1
sin(3A)/sin A = x + 1
sin(5A)/sin A = x^2 + x - 1
sin(7A)/sin A = x^3 + x - 2x - 1
sin(9A)/sin A = x^4 + x^3 - 3x^2 - 2x + 1
... (signed ++--++...). (End)
Or Pascal's triangle (A007318) with duplicated diagonals. Also triangle of coefficients of polynomials defined by P_0(x) = 1 and for n>=1, P_n(x) = F_n(x) + F_(n+1)(x), where F_n(x) is Fibonacci polynomial (cf. A049310): F_n(x) = Sum_{i=0..floor((n-1)/2)} C(n-i-1,i)*x^(n-2*i-1). - Vladimir Shevelev, Apr 12 2012
The matrix inverse is given by
1;
1, 1;
0, -1, 1;
0, 1, -2, 1;
0, 0, 1, -2, 1;
0, 0, -1, 3, -3, 1;
0, 0, 0, -1, 3, -3, 1;
0, 0, 0, 1, -4, 6, -4, 1;
0, 0, 0, 0, 1, -4, 6, -4, 1;
... apart from signs the same as A124645. - R. J. Mathar, Mar 12 2013

Examples

			Triangle T(n, k) begins:
n\k 0  1  2  3   4   5  6   7  8  9 ...
---------------------------------------
[0] 1,
[1] 1, 1,
[2] 1, 1, 1,
[3] 1, 1, 2, 1,
[4] 1, 1, 3, 2,  1,
[5] 1, 1, 4, 3,  3,  1,
[6] 1, 1, 5, 4,  6,  3,  1,
[7] 1, 1, 6, 5, 10,  6,  4,  1,
[8] 1, 1, 7, 6, 15, 10, 10,  4,  1,
[9] 1, 1, 8, 7, 21, 15, 20, 10,  5, 1,
---------------------------------------
From _Gary W. Adamson_, Oct 23 2019: (Start)
Consider the roots of the polynomials corresponding to odd N such that for N=7 the polynomial is (x^3 + x^2 - 2x - 1) and the roots (a, b, c) are (-1.8019377..., 1.247697..., and -0.445041...). The discriminant of a polynomial derived from the roots is the square of the product of successive differences: ((a-b), (b-c), (c-a))^2 in this case, resulting in 49, matching the method derived from the coefficients of a cubic. For our purposes we use the product of the differences, not the square, resulting in (3.048...) * (1.69202...) * (1.35689...) = 7.0. Conjecture: for all polynomials in the set, the product of the differences of the roots = the corresponding N. For N = 7, we get x^3 - 7x + 7. It appears that for all prime N's, these resulting companion polynomials are monic (left coefficient is 1), and all other coefficients are N or multiples thereof, with the rightmost term = N. The companion polynomials for the first few primes are:
  N =  5:  x^2 - 5;
  N =  7:  x^3 - 7x + 7;
  N = 11:  x^5 - 11x^3 + 11x^2 + 11x - 11;
  N = 13:  x^6 - 13x^4 + 13x^3 + 26x^2 - 39x + 13;
  N = 17:  x^8 - 17x^6 + 17x^5 + 68x^4 - 119x^3 + 17x^2 + 51x - 17;
  N = 19:  x^9 - 19x^7 + 19x^6 + 95x^5 - 171x^4 - 19x^3 + 190x^2 - 114x + 19. (End)
		

Crossrefs

Cf. A065942 (central stalk sequence), A000045 (row sums), A108299.
Reflected version of A046854.
Some triangle sums (see A180662): A000045 (Fi1), A016116 (Kn21), A000295 (Kn23), A094967 (Fi2), A000931 (Ca2), A001519 (Gi3), A000930 (Ze3).

Programs

  • Haskell
    a065941 n k = a065941_tabl !! n !! k
    a065941_row n = a065941_tabl !! n
    a065941_tabl = iterate (\row ->
       zipWith (+) ([0] ++ row) (zipWith (*) (row ++ [0]) a059841_list)) [1]
    -- Reinhard Zumkeller, May 07 2012
    
  • Magma
    [Binomial(n - Floor((k+1)/2), Floor(k/2)): k in [0..n], n in [0..15]]; // G. C. Greubel, Jul 10 2019
    
  • Maple
    A065941 := proc(n,k): binomial(n-floor((k+1)/2),floor(k/2)) end: seq(seq(A065941(n,k), k=0..n), n=0..15); # Johannes W. Meijer, Aug 11 2011
    A065941 := proc(n,k) option remember: local j: if k=0 then 1 elif k=1 then 1: elif k>=2 then add(procname(j,k-2), j=k-2..n-2) fi: end: seq(seq(A065941(n,k), k=0..n), n=0..15);  # Johannes W. Meijer, Aug 11 2011
    # The function qStirling2 is defined in A333143.
    seq(print(seq(qStirling2(n, k, -1), k=0..n)), n=0..9);
    # Peter Luschny, Mar 09 2020
  • Mathematica
    Flatten[Table[Binomial[n-Floor[(k+1)/2],Floor[k/2]],{n,0,15},{k,0,n}]] (* Harvey P. Dale, Dec 11 2011 *)
  • PARI
    T065941(n, k) = binomial(n-(k+1)\2, k\2); \\ Michel Marcus, Apr 28 2014
    
  • Sage
    [[binomial(n - floor((k+1)/2), floor(k/2)) for k in (0..n)] for n in (0..15)] # G. C. Greubel, Jul 10 2019

Formula

T(n, k) = binomial(n-floor((k+1)/2), floor(k/2)).
As a square array read by antidiagonals, this is given by T1(n, k) = binomial(floor(n/2) + k, k). - Paul Barry, Mar 11 2003
Triangle is a reflection of that in A066170 (absolute values). - Gary W. Adamson, Feb 16 2004
Recurrences: T(k, 0) = 1, T(k, n) = T(k-1, n) + T(k-2, n-2), or T(k, n) = T(k-1, n) + T(k-1, n-1) if n even, T(k-1, n-1) if n odd. - Ralf Stephan, May 17 2004
G.f.: sum[n, sum[k, T(k, n)x^ky^n]] = (1+xy)/(1-y-x^2y^2). sum[n>=0, T(k, n)y^n] = y^k/(1-y)^[k/2]. - Ralf Stephan, May 17 2004
T(n, k) = A108299(n, k)*A087960(k) = abs(A108299(n, k)). - Reinhard Zumkeller, Jun 01 2005
From Johannes W. Meijer, Aug 11 2011: (Start)
T(n,k) = A046854(n, n-k) = abs(A066170(n, n-k)).
T(n+k, n-k) = A109223(n,k).
T(n, k) = sum(T(j, k-2), j=k-2..n-2), 2 <= k <= n, n>=2;
T(n, 0) =1, T(n+1, 1) = 1, n >= 0. (End)
For n > 1: T(n, k) = T(n-2, k) + T(n-1, k), 1 < k < n. - Reinhard Zumkeller, Apr 24 2013

A008794 Squares repeated; a(n) = floor(n/2)^2.

Original entry on oeis.org

0, 0, 1, 1, 4, 4, 9, 9, 16, 16, 25, 25, 36, 36, 49, 49, 64, 64, 81, 81, 100, 100, 121, 121, 144, 144, 169, 169, 196, 196, 225, 225, 256, 256, 289, 289, 324, 324, 361, 361, 400, 400, 441, 441, 484, 484, 529, 529, 576, 576
Offset: 0

Views

Author

Keywords

Comments

Also number of non-attacking kings on (n-1) X (n-1) board (cf. A030978). - Koksal Karakus (karakusk(AT)hotmail.com), May 27 2002
Also the independence number and clique covering number of the (n-1) X (n-1) king graph. - Eric W. Weisstein, Jun 20 2017
Maximum number of 2 X 2 tiles that fit on an n X n board. - Jon Perry, Aug 10 2003
(n)-(1) + (n-1)-(2) + (n-3)-(3) + ... + (n-r)-(r) ... n terms. E.g., 5-1+4-2+3 = 9, 6-1+5-2+4-3 = 9, 7-1+6-2+5-3+4 = 16, 8-1+7-2+6-3+5-4 = 16. - Amarnath Murthy, Jul 24 2005
The smallest possible number of white cells in a solution to an n X n nurikabe grid. - Tanya Khovanova, Feb 24 2009
(1 + x + 4*x^2 + 4*x^3 + 9*x^4 + ...) = (1/(1-x))*(1 + 3*x^2 + 5*x^4 + 7*x^6 + ...). - Gary W. Adamson, Apr 07 2010
If the set {1,2,...,n} is divided in half (a part having size ceiling(n/2) and the rest), then a(n+1) is the largest possible difference between the totals of these parts. - Vladimir Shevelev, Oct 14 2017
a(n+1) is the sum of the smallest parts of the partitions of 2n into two odd parts. - Wesley Ivan Hurt, Dec 06 2017
a(n-1) is the largest number of single cells of an n X n grid that share no edge or vertex with each other or those of the grid perimeter. - Stefano Spezia, Jul 30 2021
The binomial transform is 0, 0, 1, 4, 14, 44, 128, 352, 928, 2368, 5888... (see A007466). - R. J. Mathar, Feb 25 2023

Crossrefs

Programs

  • GAP
    Flat(List([0..24],n->[n^2,n^2])); # Muniru A Asiru, Oct 09 2018
    
  • Magma
    [(2*n-1)*(-1)^n/8+(2*n^2-2*n +1)/8: n in [0..60]]; // Vincenzo Librandi, Aug 21 2011
    
  • Maple
    A008794:=n->floor(n/2)^2: seq(A008794(n), n=0..50); # Wesley Ivan Hurt, Dec 08 2017
  • Mathematica
    With[{sq = Range[0, 30]^2}, Riffle[sq, sq]] (* Harvey P. Dale, Nov 20 2015 *)
    Table[Floor[n/2]^2, {n, 0, 49}] (* Michael De Vlieger, Oct 21 2016 *)
    Table[(2 n - 1) (-1)^n/8 + (2 n^2 - 2 n + 1)/8, {n, 0, 49}] (* Michael De Vlieger, Oct 21 2016 *)
    CoefficientList[Series[x^2*(1 + x^2)/((1 - x) (1 - x^2)^2), {x, 0, 49}], x] (* Michael De Vlieger, Oct 21 2016 *)
    CoefficientList[Series[((x^2-x)Cosh[x]+(1+x+x^2)Sinh[x])/4,{x,0,50}],x]*Table[k!,{k,0,50}] (* Stefano Spezia, Oct 07 2018 *)
  • PARI
    a(n)=(n\2)^2 \\ Charles R Greathouse IV, Sep 24 2015
    
  • PARI
    first(n) = Vec(x^2*(1 + x^2)/((1 - x)*(1 - x^2)^2) + O(x^n), -n) \\ Iain Fox, Dec 08 2017
    
  • Python
    def A008794(n): return (n//2)**2 # Chai Wah Wu, Jun 07 2022
  • Sage
    [((-1)^n*(2*n-1) +(2*n^2-2*n +1))/8 for n in (0..50)] # G. C. Greubel, Sep 11 2019
    

Formula

G.f.: x^2*(1 + x^2)/((1 - x)*(1 - x^2)^2).
a(n) = floor(n/2)^2.
From Paul Barry, May 31 2003: (Start)
a(n) = (2*n - 1)*(-1)^n/8 + (2*n^2 - 2*n + 1)/8.
a(n+1) = Sum_{k=0..n} k*(1-(-1)^k)/2. (End)
a(n+2) = Sum_{k=0..n} A109613(k)*A059841(n-k). - Reinhard Zumkeller, Dec 05 2009
a(n) = A182579(n,n-2) for n > 1. - Reinhard Zumkeller, May 07 2012
3*a(n) = A032766(n)^2 - A032766(n^2). - Bruno Berselli, Oct 21 2016
a(n) = Sum_{i=1..n-1; i odd} i. - Olivier Pirson, Nov 06 2017
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n > 4. - Iain Fox, Dec 08 2017
E.g.f.: ((x^2 - x)*cosh(x) + (1 + x + x^2)*sinh(x))/4. - Stefano Spezia, Oct 07 2018

A054977 a(0)=2, a(n)=1 for n >= 1.

Original entry on oeis.org

2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Henry Gould, May 29 2000

Keywords

Comments

Arises in Gilbreath-Proth conjecture; see A036262.
a(n) is also the continued fraction for (3+sqrt(5))/2. - Enrique Pérez Herrero, May 16 2010
a(n) is also the denominator for odd Bernoulli Numbers. - Enrique Pérez Herrero, Jul 17 2010
a(n) = 3 - A040000(n); a(n) = A182579(n+1,1). - Reinhard Zumkeller, May 07 2012
From Paul Curtz, Feb 04 2014: (Start)
Difference table of a(n):
2, 1, 1, 1, 1, 1, 1, ...
-1, 0, 0, 0, 0, 0, 0, ...
1, 0, 0, 0, 0, 0, 0, ...
-1, 0, 0, 0, 0, 0, 0, ...
1, 0, 0, 0, 0, 0, 0, ...
-1, 0, 0, 0, 0, 0, 0, ... .
a(n) is an autosequence of second kind. Its inverse binomial transform is the signed sequence with the main diagonal (here A000038) double of the following diagonal (here A000007). Here the other diagonals are also A000007.
b(n) = A000032(n) - a(n) = 0, 0, 2, 3, 6, 10, 17, 28, ... = 0, followed by A001610(n) is the autosequence of second kind preceding A000032(n).
The corresponding autosequence of first kind, 0 followed by 1's, is A057427(n).
The Akiyama-Tanigawa transform applied to a(n) yields a(n).
(End)
Harmonic or factorial (base) expansion of e, cf. MathWorld link. - M. F. Hasler, Nov 25 2018
Decimal expansion of 19/90. - Elmo R. Oliveira, Aug 09 2024

Crossrefs

Programs

Formula

a(n) = A027642(2*n+1). - Enrique Pérez Herrero, Jul 17 2010
G.f.: (2-x)/(1-x). - Wolfdieter Lang, Oct 05 2014
Sum_{k>=1} a(n)/n! = exp(1). - G. C. Greubel, Nov 26 2018
Showing 1-7 of 7 results.