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.

A000127 Maximal number of regions obtained by joining n points around a circle by straight lines. Also number of regions in 4-space formed by n-1 hyperplanes.

Original entry on oeis.org

1, 2, 4, 8, 16, 31, 57, 99, 163, 256, 386, 562, 794, 1093, 1471, 1941, 2517, 3214, 4048, 5036, 6196, 7547, 9109, 10903, 12951, 15276, 17902, 20854, 24158, 27841, 31931, 36457, 41449, 46938, 52956, 59536, 66712, 74519, 82993, 92171, 102091, 112792, 124314, 136698
Offset: 1

Views

Author

Keywords

Comments

a(n) is the sum of the first five terms in the n-th row of Pascal's triangle. - Geoffrey Critzer, Jan 18 2009
{a(k): 1 <= k <= 5} = divisors of 16. - Reinhard Zumkeller, Jun 17 2009
Equals binomial transform of [1, 1, 1, 1, 1, 0, 0, 0, ...]. - Gary W. Adamson, Mar 02 2010
From Bernard Schott, Apr 05 2021: (Start)
As a(n) = 2^(n-1) for n = 1..5, it is misleading to believe that a(n) = 2^(n-1) for n > 5 (see Patrick Popescu-Pampu link); other curiosities: a(6) = 2^5 - 1 and a(10) = 2^8.
The sequence of the first differences is A000125, the sequence of the second differences is A000124, the sequence of the third differences is A000027 and the sequence of the fourth differences is the all 1's sequence A000012 (see J. H. Conway and R. K. Guy reference, p. 80). (End)
a(n) is the number of binary words of length n matching the regular expression 0*1*0*1*0*. A000124 and A000125 count binary words of the form 0*1*0* and 1*0*1*0*, respectively. - Manfred Scheucher, Jun 22 2023

Examples

			a(7)=99 because the first five terms in the 7th row of Pascal's triangle are 1 + 7 + 21 + 35 + 35 = 99. - _Geoffrey Critzer_, Jan 18 2009
G.f. = x + 2*x^2 + 4*x^3 + 8*x^4 + 16*x^5 + 31*x^6 + 57*x^7 + 99*x^8 + 163*x^9 + ...
		

References

  • R. B. Banks, Slicing Pizzas, Racing Turtles and Further Adventures in Applied Mathematics, Princeton Univ. Press, 1999. See p. 28.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 72, Problem 2.
  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, Chap. 3.
  • J. H. Conway and R. K. Guy, Le Livre des Nombres, Eyrolles, 1998, p. 80.
  • J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique Des Nombres, Problem 33 pp. 18; 128 Ellipses Paris 2004.
  • A. Deledicq and D. Missenard, A La Recherche des Régions Perdues, Math. & Malices, No. 22 Summer 1995 issue pp. 22-3 ACL-Editions Paris.
  • M. Gardner, Mathematical Circus, pp. 177; 180-1 Alfred A. Knopf NY 1979.
  • M. Gardner, The Colossal Book of Mathematics, 2001, p. 561.
  • James Gleick, Faster, Vintage Books, NY, 2000 (see pp. 259-261).
  • M. de Guzman, Aventures Mathématiques, Prob. B pp. 115-120 PPUR Lausanne 1990.
  • Ross Honsberger; Mathematical Gems I, Chap. 9.
  • Ross Honsberger; Mathematical Morsels, Chap. 3.
  • Jeux Mathématiques et Logiques, Vol. 3 pp. 12; 51 Prob. 14 FFJM-SERMAP Paris 1988.
  • J. N. Kapur, Reflections of a Mathematician, Chap.36, pp. 337-343, Arya Book Depot, New Delhi 1996.
  • C. D. Miller, V. E. Heeren, J. Hornsby, M. L. Morrow and J. Van Newenhizen, Mathematical Ideas, Tenth Edition, Pearson, Addison-Wesley, Boston, 2003, Cptr 1, 'The Art of Problem Solving, page 6.
  • I. Niven, Mathematics of Choice, pp. 158; 195 Prob. 40 NML 15 MAA 1965.
  • C. S. Ogilvy, Tomorrow's Math, pp. 144-6 OUP 1972.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 252-255.
  • Alfred S. Posamentier & Ingmar Lehmann, The (Fabulous) Fibonacci Numbers, Prometheus Books, NY, 2007, page 81-87.
  • A. M. Robert, A Course in p-adic Analysis, Springer-Verlag, 2000; p. 213.
  • 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).

Crossrefs

Programs

  • Haskell
    a000127 = sum . take 5 . a007318_row  -- Reinhard Zumkeller, Nov 24 2012
    
  • Magma
    [(n^4-6*n^3+23*n^2-18*n+24)/24: n in [1..50]]; // Vincenzo Librandi, Feb 16 2015
    
  • Maple
    A000127 := n->(n^4 - 6*n^3 + 23*n^2 - 18*n + 24)/24;
    with (combstruct):ZL:=[S, {S=Sequence(U, card=1)}, unlabeled]: seq(count(subs(r=6, ZL), size=m), m=0..41); # Zerinvary Lajos, Mar 08 2008
  • Mathematica
    f[n_] := Sum[Binomial[n, i], {i, 0, 4}]; Table[f@n, {n, 0, 40}] (* Robert G. Wilson v, Jun 29 2007 *)
    Total/@Table[Binomial[n-1,k],{n,50},{k,0,4}] (* or *) LinearRecurrence[ {5,-10,10,-5,1},{1,2,4,8,16},50] (* Harvey P. Dale, Aug 24 2011 *)
    Table[(n^4 - 6 n^3 + 23 n^2 - 18 n + 24) / 24, {n, 100}] (* Vincenzo Librandi, Feb 16 2015 *)
    a[ n_] := Binomial[n, 4] + Binomial[n, 2] + 1; (* Michael Somos, Dec 23 2017 *)
  • PARI
    a(n)=(n^4-6*n^3+23*n^2-18*n+24)/24 \\ Charles R Greathouse IV, Mar 22 2016
    
  • PARI
    {a(n) = binomial(n, 4) + binomial(n, 2) + 1}; /* Michael Somos, Dec 23 2017 */
    
  • Python
    def A000127(n): return n*(n*(n*(n - 6) + 23) - 18)//24 + 1 # Chai Wah Wu, Sep 18 2021

Formula

a(n) = C(n-1, 4) + C(n-1, 3) + ... + C(n-1, 0) = A055795(n) + 1 = C(n, 4) + C(n-1, 2) + n.
a(n) = Sum_{k=0..2} C(n, 2k). - Joel Sanderi (sanderi(AT)itstud.chalmers.se), Sep 08 2004
a(n) = (n^4 - 6*n^3 + 23*n^2 - 18*n + 24)/24.
G.f.: (1 - 3*x + 4*x^2 - 2*x^3 + x^4)/(1-x)^5. (for offset 0) - Simon Plouffe in his 1992 dissertation
E.g.f.: (1 + x + x^2/2 + x^3/6 + x^4/24)*exp(x) (for offset 0). [Typos corrected by Juan M. Marquez, Jan 24 2011]
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5), n > 4. - Harvey P. Dale, Aug 24 2011
a(n) = A000124(A000217(n-1)) - n*A000217(n-2) - A034827(n), n > 1. - Melvin Peralta, Feb 15 2016
a(n) = A223718(-n). - Michael Somos, Dec 23 2017
For n > 2, a(n) = n + 1 + sum_{i=2..(n-2)}sum_{j=1..(n-i)}(1+(i-1)(j-1)). - Alec Jones, Nov 17 2019

Extensions

Formula corrected and additional references from torsten.sillke(AT)lhsystems.com
Additional correction from Jonas Paulson (jonasso(AT)sdf.lonestar.org), Oct 30 2003