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.

Previous Showing 11-20 of 28 results. Next

A001040 a(n+1) = n*a(n) + a(n-1) with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 1, 3, 10, 43, 225, 1393, 9976, 81201, 740785, 7489051, 83120346, 1004933203, 13147251985, 185066460993, 2789144166880, 44811373131073, 764582487395121, 13807296146243251, 263103209266016890, 5275871481466581051, 111056404320064218961, 2448516766522879398193
Offset: 0

Views

Author

Keywords

Comments

If the initial 0 and 1 are omitted, CONTINUANT transform of 1, 2, 3, 4, 5, ...
a(n+1) is the numerator of the continued fraction given by C(n) = [n, n-1,...,3,2,1], e.g., [1] = 1, [2,1]=3, [3,2,1] = 10/3, [4,3,2,1] = 43/10 etc. Cf. A001053. - Amarnath Murthy, May 02 2001
Along those lines, a(n) is the denominator of the continued fraction [n,n-1,...3,2,1] and is the numerator of the continued fraction [1,2,3,...,n-1]. - Greg Dresden, Feb 20 2020
Starting (1, 3, 10, 43, ...) = eigensequence of triangle A127701. - Gary W. Adamson, Dec 29 2008
For n >=2, a(n) equals the permanent of the (n-1) X (n-1) tridiagonal matrix with 1's along the superdiagonal and the subdiagonal, and consecutive integers from 1 to n along the main diagonal (see Mathematica program below). - John M. Campbell, Jul 08 2011
Generally, solution of the recurrence a(n+1) = n*a(n) + a(n-1) is a(n) = BesselI(n,-2)*(2*a(0)*BesselK(1,2)-2*a(1)*BesselK(0,2)) + (2*a(0)*BesselI(1,2)+2*a(1)*BesselI(0,2))*BesselK(n,2), and asymptotic is a(n) ~ (a(0)*BesselI(1,2)+a(1)*BesselI(0,2)) * (n-1)!. - Vaclav Kotesovec, Jan 05 2013
For n > 0: a(n) = A058294(n,n) = A102473(n,n) = A102472(n,1). - Reinhard Zumkeller, Sep 14 2014
Conjecture: 2*n!*a(n) is the number of open tours by a rook on an (n X 2) chessboard which ends at the opposite line of length n. - Mikhail Kurkov, Nov 19 2019

Examples

			G.f. = x + x^2 + 3*x^3 + 10*x^4 + 43*x^5 + 225*x^6 + 1393*x^7 + 9976*x^8 + ...
		

References

  • Archimedeans Problems Drive, Eureka, 22 (1959), 15.
  • 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

A column of A058294. Cf. A001053.
Cf. A127701. - Gary W. Adamson, Dec 29 2008
Similar recurrences: A001053, A058279, A058307. - Wolfdieter Lang, May 19 2010

Programs

  • Haskell
    a001040 n = a001040_list !! n
    a001040_list = 0 : 1 : zipWith (+)
       a001040_list (zipWith (*) [1..] $ tail a001040_list)
    -- Reinhard Zumkeller, Mar 05 2013
    
  • Magma
    a:=[1,1]; [0] cat [n le 2 select a[n] else (n-1)*Self(n-1) + Self(n-2): n in [1..23]]; // Marius A. Burtea, Nov 19 2019
  • Maple
    A001040 := proc(n)
        if n <= 1 then
            n;
        else
            (n-1)*procname(n-1)+procname(n-2) ;
        end if;
    end proc: # R. J. Mathar, Mar 13 2015
  • Mathematica
    Table[Permanent[Array[KroneckerDelta[#1, #2]*(#1) + KroneckerDelta[#1, #2 - 1] + KroneckerDelta[#1, #2 + 1] &, {n - 1, n - 1}]], {n, 2, 30}] (* John M. Campbell, Jul 08 2011 *)
    Join[{0},RecurrenceTable[{a[0]==1,a[1]==1,a[n]==n a[n-1]+a[n-2]}, a[n], {n,30}]] (* Harvey P. Dale, Aug 14 2011 *)
    FullSimplify[Table[2(-BesselI[n,-2]BesselK[0,2]+BesselI[0,2]BesselK[n,2]),{n,0,20}]] (* Vaclav Kotesovec, Jan 05 2013 *)
  • PARI
    {a(n) = contfracpnqn( vector(abs(n), i, i))[1, 2]}; /* Michael Somos, Sep 25 2005 */
    
  • Sage
    def A001040(n):
        if n < 2: return n
        return factorial(n-1)*hypergeometric([1-n/2,-n/2+1/2], [1,1-n,1-n], 4)
    [round(A001040(n).n(100)) for n in (0..23)] # Peter Luschny, Sep 10 2014
    

Formula

Generalized Fibonacci sequence for (unsigned) Laguerre triangle A021009. a(n+1) = sum{k=0..floor(n/2), C(n-k, k)(n-k)!/k!}. - Paul Barry, May 10 2004
a(-n) = a(n) for all n in Z. - Michael Somos, Sep 25 2005
E.g.f.: -I*Pi*(BesselY(1, 2*I)*BesselI(0, 2*sqrt(1-x)) - I*BesselI(1, 2)*BesselY(0, 2*I*sqrt(1-x))). Such e.g.f. computations were the result of an e-mail exchange with Gary Detlefs. After differentiation and putting x=0 one has to use simplifications. See the Abramowitz-Stegun handbook, p. 360, 9.1.16 and p. 375, 9.63. - Wolfdieter Lang, May 19 2010
Limit_{n->infinity} a(n)/(n-1)! = BesselI(0,2) = 2.279585302336... (see A070910). - Vaclav Kotesovec, Jan 05 2013
a(n) = 2*(BesselI(0,2)*BesselK(n,2) - BesselI(n,-2)*BesselK(0,2)). - Vaclav Kotesovec, Jan 05 2013
a(n) = (n-1)!*hypergeometric([1-n/2,1/2-n/2],[1,1-n,1-n], 4) for n >= 2. - Peter Luschny, Sep 10 2014
0 = a(n)*(-a(n+2)) + a(n+1)*(+a(n+1) + a(n+2) - a(n+3)) + a(n+2)*(+a(n+2)) for all n in Z. - Michael Somos, Sep 13 2014
Observed: a(n) = A070910*(n-1)!*(1 + 1/(n-1) + 1/(2*(n-1)^2) + O((n-1)^-3)). - A.H.M. Smeets, Aug 19 2018
a(n) mod 2 = A166486(n). - Alois P. Heinz, Jul 03 2023

Extensions

Definition clarified by A.H.M. Smeets, Aug 19 2018

A001350 Associated Mersenne numbers.

Original entry on oeis.org

0, 1, 1, 4, 5, 11, 16, 29, 45, 76, 121, 199, 320, 521, 841, 1364, 2205, 3571, 5776, 9349, 15125, 24476, 39601, 64079, 103680, 167761, 271441, 439204, 710645, 1149851, 1860496, 3010349, 4870845, 7881196, 12752041, 20633239, 33385280, 54018521, 87403801, 141422324
Offset: 0

Views

Author

Keywords

Comments

a(n) is last term in the period of the continued fraction expansion of phi^n (phi being the golden number). E.g.: n=10, phi^10=[122,1,121,1,121,1,121,...] (and the period may only have 1 or 2 terms). Also, a(n) = floor(phi^n)-((n+1) mod 2), or a(n) = A014217(n)-((n+1) mod 2). - Thomas Baruchel, Nov 05 2002 [continued fraction value corrected by Jon E. Schoenfield, Jan 20 2019]
a(n) is the resultant of the polynomials x^2-x-1 and x^(n+1)-x^n-1 for n >= 1. - Richard Choulet, Aug 05 2007
This is a divisibility sequence; that is, if n divides m, then a(n) divides a(m). - Michael Somos, Feb 12 2012
Gives the number of arrangements of black and white beads on a necklace with a total of n beads satisfying (1) there is at least one black bead (2) between any two black beads the number of white beads is even and (3) rotations and flippings of a necklace are considered distinct (see Butler). - Peter Bala, Mar 06 2014
This is the case P1 = 1, P2 = 0, Q = -1 of the 3-parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 31 2014
The resultant of the (s_2, s_2+n) pair, where s_n(X) is X^n-X-1, is -a(n). See Rush link. - Michel Marcus, Sep 30 2019

Examples

			G.f. = x + x^2 + 4*x^3 + 5*x^4 + 11*x^5 + 16*x^6 + 29*x^7 + 45*x^8 + 76*x^9 + ...
n=1: a(9)/a(3) = 76/4 = 19; a(18)/a(6) = 5776/16 = 361 = 19^2. - _Bob Selcoe_, Jun 01 2014
		

References

  • 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

  • Magma
    [Floor(-(1 - ((1 + Sqrt(5))/2)^n - (-(1 + Sqrt(5))/2)^(-n) + (-1)^n)): n in [0..40]]; // Vincenzo Librandi, Aug 15 2011
    
  • Maple
    A001350 := n -> add(binomial(k-1, 2*k-n)*n/(n-k), k=0..n-1);
    seq(A001350(n), n=0..39); # Peter Luschny, Sep 26 2014
  • Mathematica
    Clear[f, n]; f[n_] = -(1 - ((1 + Sqrt[5])/2)^n - (-(1 + Sqrt[5])/2)^(-n) + (-1)^n); Table[FullSimplify[ExpandAll[f[n]]], {n, 0, 30}] (* Roger L. Bagula and Gary W. Adamson, Nov 26 2008 *)
    a[ n_] := LucasL[n] - 1 - (-1)^n; (* Michael Somos, May 18 2015 *)
    a[ n_] := SeriesCoefficient[ x D[ Log[ 1 + x / (1 - x - x^2)], x], {x, 0, n}]; (* Michael Somos, May 18 2015 *)
    LinearRecurrence[{1, 2, -1, -1}, {0, 1, 1, 4}, 40] (* Jean-François Alcover, Jan 07 2019 *)
  • PARI
    {a(n) = fibonacci(n+1) + fibonacci(n-1) - 1 - (-1)^n};
    
  • PARI
    {a(n) = my(w = quadgen(5)); simplify( -(w^n - 1) * ((-1/w)^n - 1))}; /* Michael Somos, Feb 12 2012 */
    
  • Python
    from sympy import lucas
    def A001350(n): return lucas(n)-((n&1^1)<<1) # Chai Wah Wu, Sep 23 2023

Formula

G.f.: x*(1+x^2)/((1-x^2)*(1-x-x^2)). - Simon Plouffe in his 1992 dissertation
a(n) = a(n-1) + a(n-2) + 1 -(-1)^n. a(-n) = (-1)^n * a(n).
a(n) = A050140(Fibonacci(n)). - Thomas Baruchel, Nov 05 2002
Convolution of F(n) and {1, 0, 2, 0, 2, ...}. a(n) = Sum_{k=0..n} ((1+(-1)^k)-0^k)*F(n-k) = Sum_{k=0..n} F(k)*((1+(-1)^(n-k))-0^(n-k)). - Paul Barry, Jul 19 2004
a(n) = 2*A074331(n) - A000045(n). - Paul Barry, Jul 19 2004
a(n) = Lucas_number(n) - 1 - (-1)^n = A000032(n) - 1 - (-1)^n. - Hieronymus Fischer, Feb 18 2006
a(n) = -(1 - ((1 + sqrt(5))/2)^n - (-(1 + sqrt(5))/2)^(-n) + (-1)^n). - Roger L. Bagula and Gary W. Adamson, Nov 26 2008
a(n) = n * Sum_{k=1..n} (Sum_{i=ceiling((n-k)/2)..(n-k)} (binomial(i,n-k-i)*binomial(k+i-1,k-1))/k*(-1)^(k+1)), n>0. - Vladimir Kruchinin, Sep 03 2010
a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-4). - Colin Barker, Apr 11 2014
a(n) = sqrt(A152152(n)). - Colin Barker, Apr 11 2014
a(n) = a(2*n)/A000032(n) when n is odd; a(n) = a(2*n)/(A000032(n+2)) when n is even. - Bob Selcoe, Jun 01 2014
a(12n+6)/a(4n+2) = (a(6n+3)/a(2n+1))^2. - Bob Selcoe, Jun 01 2014
a(n) = Sum_{k=0..n-1} binomial(k-1, 2*k-n)*n/(n-k). - Peter Luschny, Sep 26 2014
From Peter Bala, Mar 19 2015: (Start)
a(n) = -(alpha^n - 1)*(beta^n - 1), where alpha = 1/2*(1 + sqrt(5)) and beta = (1/2)*(1 - sqrt(5)).
a(n) = -det(I - M^n) where I is the 2 X 2 identity matrix and M = [ 1, 1; 1, 0 ]. Cf. A129744.
exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + Sum_{n >= 1} Fibonacci(n)*x^n. Cf. A004146. (End)
a(n) = A052952(n-1) + A052952(n-3). - R. J. Mathar, Jul 02 2018
a(n) = (L(2*n+1) - L(n+1)) mod (L(n+1)-1) for n > 0 where L(k)=A000032(k). - Art Baker, Jan 17 2019
a(n) = Sum_{j=n..2*n-1} L(j) mod Sum_{j=0..n-1} L(j) where L(j)=A000032(j). - Art Baker, Jan 20 2019
Convolution of (1, 0, 3, 0, 5, 0, 7, ...) and (1, 1, 1, 2, 3, 5, 8, 13, ...). - Gary W. Adamson, Jul 08 2019
a(n) = Sum_{d|n} d*A060280(d) = Sum_{d|n} A031367(d). [Baake, Roberts, Weiss, eq(2)]. - R. J. Mathar, Oct 19 2021

Extensions

Additional comments from Michael Somos, Aug 01 2002

A000933 Genus of complete graph on n nodes.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 2, 3, 4, 5, 6, 8, 10, 11, 13, 16, 18, 20, 23, 26, 29, 32, 35, 39, 43, 46, 50, 55, 59, 63, 68, 73, 78, 83, 88, 94, 100, 105, 111, 118, 124, 130, 137, 144, 151, 158, 165, 173, 181, 188, 196, 205, 213, 221, 230, 239, 248, 257, 266, 276, 286, 295, 305
Offset: 1

Views

Author

Keywords

Comments

(1+x)*(1+x^3)*(1+x^5)/((1-x^2)*(1-x^4)*(1-x^6)) is the Poincaré series [or Poincare series] (or Molien series) for symmetric invariants in F_2(b_1, b_2, ... b_n) ⊗ E(e_1, e_2, ... e_n) with b_i 2-dimensional, e_i one-dimensional and the permutation action of S_n, in the case n=3.

Examples

			a(1)=a(2)=a(3)=a(4)=0 because K_4 is planar. a(5)=a(6)=a(7)=1 because K_7 can be embedded on the torus of genus 1.
G.f. = x^5 + x^6 + x^7 + 2*x^8 + 3*x^9 + 4*x^10 + 5*x^11 + 6*x^12 + 8*x^13 + ...
		

References

  • A. Adem and R. J. Milgram, Cohomology of Finite Groups, Springer-Verlag, 2nd. ed., 200
  • J. L. Gross and T. W. Tucker, Topological Graph Theory, Wiley, 1987; see I(n) p. 221.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 740.
  • 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

Cf. A007997.

Programs

  • Magma
    [n le 2 select 0 else Ceiling(Binomial(n-3,2)/6): n in [1..70]]; // G. C. Greubel, Dec 08 2022
    
  • Maple
    A000933:=-z**4*(1-z+z**2-z**3+z**4)/(z**2+z+1)/(1+z**2)/(z-1)**3; # Simon Plouffe in his 1992 dissertation
  • Mathematica
    CoefficientList[Series[x^5(1+x^5)/((1-x)(1-x^3)(1-x^4)), {x, 0, 70}], x] (* Harvey P. Dale, Dec 18 2011 *)
    Join[{0, 0}, LinearRecurrence[{2, -2, 3, -3, 2, -2, 1}, {0, 0, 1, 1, 1, 2, 3}, 70]] (* Harvey P. Dale, Dec 18 2011 *)
    Join[{0, 0}, Table[Ceiling[(n - 3) (n - 4)/12], {n, 3, 20}]] (* Eric W. Weisstein, Jan 19 2018 *)
  • PARI
    {a(n) = if( n<3, 0, ceil((n-3) * (n-4) / 12))}; /* Michael Somos, Aug 24 2005 */
    
  • SageMath
    [0,0]+[ceil(binomial(n-3,2)/6) for n in range(3,71)] # G. C. Greubel, Dec 08 2022

Formula

Euler transform of length 10 sequence [ 1, 0, 1, 1, 1, 0, 0, 0, 0, -1]. - Michael Somos, Aug 24 2005
G.f.: x^5*(1+x^5)/((1-x)*(1-x^3)*(1-x^4)).
a(n) = ceiling ( (n-3)*(n-4)/12 ) if n>=3.
a(n) = 2*a(n-1) - 2*a(n-2) + 3*a(n-3) - 3*a(n-4) + 2*a(n-5) - 2*a(n-6) + a(n-7) for n >= 10. - Harvey P. Dale, Dec 18 2011
G.f.: x^5*(1-x+x^2+x^4-x^3) / ((1+x^2) * (1+x+x^2) * (1-x)^3). - R. J. Mathar, Dec 18 2014
a(n) = (49 + 3*(n - 7)*n - 9*cos(n*Pi/2) - 4*cos(2*n*Pi/3) + 9*sin(n*Pi/2) - 4*sqrt(3)*sin(2*n*Pi/3))/36 for n > 2. - Stefano Spezia, Dec 14 2021

A001049 Numbered stops in Manhattan on the Lexington Avenue subway.

Original entry on oeis.org

8, 14, 23, 28, 33, 42, 51, 59, 68, 77, 86, 96, 103, 110, 116, 125
Offset: 1

Views

Author

Keywords

Comments

These are the numbered stops for the #6 train.

References

  • An Adventurer's Guide to Number Theory by R. Friedberg, 1968, McGraw-Hill, p. 30 (corrected).
  • NYC Transit, NYC Subway Map, 2005.

Crossrefs

Extensions

Additional comments from Nyck Byrd (nyc10024(AT)lycos.com), Dec 25 2005

A000934 Chromatic number (or Heawood number) Chi(n) of surface of genus n.

Original entry on oeis.org

4, 7, 8, 9, 10, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 16, 17, 17, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 27, 27, 27, 27, 28, 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, 31, 32, 32
Offset: 0

Views

Author

Keywords

Comments

a(0) = 4 is the celebrated four-color theorem.
"In 1890 P. Heawood discovered the formula ... and proved that the number of colors required to color a map on an n-holed torus (n >= 1) is at most Chi(n). In 1968 G. Ringel and J. W. T. Youngs succeeded in showing that for every n>=1, there is a configuration of Chi(n) countries on an n-holed torus such that each country shares a border with each of the Chi(n)-1 other countries; this shows that Chi(n) colors may be necessary. This completed the proof that Heawood's formula is indeed the correct chromatic number function for the n-holed torus." ... "Heawood's formula is in fact valid for n = 0." - Stan Wagon

References

  • K. Appel and W. Haken, Every planar map is four colorable. With the collaboration of J. Koch. Contemporary Mathematics, 98. American Mathematical Society, Providence, RI, 1989. xvi+741 pp. ISBN: 0-8218-5103-9.
  • K. Appel and W. Haken, "The Four-Color Problem" in Mathematics Today (L. A. Steen editor), Springer NY 1978.
  • K. Appel and W. Haken, "The Solution of the Four-Color Map Problem", Scientific American vol. 237 no.4 pp. 108-121 1977.
  • D. Barnett, Map coloring, Polyhedra and The Four-Color Problem, Dolciani Math. Expositions No. 8, Math. Asso. of Amer., Washington DC 1984.
  • J. H. Cadwell, Topics in Recreational Mathematics, Chapter 8 pp. 76-87 Cambridge Univ. Press 1966.
  • K. J. Devlin, All The Math That's Fit To Print, Chap. 17; 67 pp. 46-8; 161-2 MAA Washington DC 1994.
  • K. J. Devlin, Mathematics: The New Golden Age, Chapter 7, Columbia Univ. Press NY 1999.
  • M. Gardner, New Mathematical Diversions, Chapter 10 pp. 113-123, Math. Assoc. of Amer. Washington DC 1995.
  • J. L. Gross and T. W. Tucker, Topological Graph Theory, Wiley, 1987; see Table 5.1 p. 221.
  • M. E. Lines, Think of a Number, Chapter 10 pp. 91-100 Institute of Physics Pub. London 1990.
  • Robertson, N.; Sanders, D. P.; Seymour, P. and Thomas, R., A new proof of the four-color theorem. Electron. Res. Announc. Amer. Math. Soc. 2 (1996), no. 1, 17-25.
  • W. W. Rouse Ball & H. S. M. Coxeter, Mathematical Recreations and Essays, Chapter VIII pp. 222-242 Dover NY 1987.
  • W. L. Schaaf, Recreational Mathematics. A guide to the literature, Chapter 4.7 pp. 74-6 NCTM Washington DC 1963.
  • W. L. Schaaf, A Bibliography of Recreational Mathematics Vol. 2, Chapter 4.6 pp. 75-9 NCTM Washington DC 1972.
  • 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).
  • I. Stewart, From Here to Infinity, Chapter 8 pp. 104-112, Oxford Univ.Press 1996.
  • H. Tietze, Famous Problems of Mathematics, Chapter XI pp. 226-242 Graylock Press Baltimore MD 1966.
  • Stan Wagon, Mathematica In Action, W.H. Freeman and Company, NY, 1991, pages 232 - 237.
  • R. Wilson, Four Colors Suffice, Princeton Univ. Press, 2002.

Crossrefs

Programs

  • Haskell
    a000934 = floor . (/ 2) . (+ 7) . sqrt . (+ 1) . (* 48) . fromInteger
    -- Reinhard Zumkeller, Dec 03 2012
    
  • Magma
    [Floor((7+Sqrt(1+48*n))/2): n in [0..70]]; // Vincenzo Librandi, Jul 09 2017
  • Maple
    A000934 := n-> floor((7+sqrt(1+48*n))/2);
  • Mathematica
    Table[ Floor[ N[(7 + Sqrt[48n + 1])/2] ], {n, 0, 100} ]
    Floor[(7+Sqrt[1+48*Range[0,100]])/2] (* Harvey P. Dale, Jul 17 2025 *)

Formula

a(n) = floor( (7+sqrt(1+48n))/2 ).

Extensions

More terms from Robert G. Wilson v, Dec 08 2000

A046936 Same rule as Aitken triangle (A011971) except a(0,0)=0, a(1,0)=1.

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 3, 4, 6, 9, 9, 12, 16, 22, 31, 31, 40, 52, 68, 90, 121, 121, 152, 192, 244, 312, 402, 523, 523, 644, 796, 988, 1232, 1544, 1946, 2469, 2469, 2992, 3636, 4432, 5420, 6652, 8196, 10142, 12611, 12611, 15080, 18072, 21708, 26140
Offset: 0

Views

Author

Keywords

Examples

			Triangle starts:
0,
1, 1,
1, 2, 3,
3, 4, 6, 9,
9, 12, 16, 22, 31,
31, 40, 52, 68, 90, 121,
121, 152, 192, 244, 312, 402, 523,
523, 644, 796, 988, 1232, 1544, 1946, 2469,
2469, 2992, 3636, 4432, 5420, 6652, 8196, 10142, 12611,
12611, 15080, ...
		

Crossrefs

Borders give A040027. Reading across rows gives A007604.

Programs

  • Haskell
    a046936 n k = a046936_tabl !! n !! k
    a046936_row n = a046936_tabl !! n
    a046936_tabl = [0] : iterate (\row -> scanl (+) (last row) row) [1,1]
    -- Reinhard Zumkeller, Jan 01 2014
    
  • Mathematica
    a[0, 0] = 0; a[1, 0] = 1; a[n_, 0] := a[n, 0] = a[n-1, n-1]; a[n_, k_] := a[n, k] = a[n, k-1] + a[n-1, k-1]; Table[a[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 15 2013 *)
  • Python
    from itertools import accumulate
    def A046936(): # Compare function Gould_diag in A121207.
        yield [0]
        accu = [1, 1]
        while True:
            yield accu
            accu = list(accumulate([accu[-1]] + accu))
    g = A046936()
    [next(g) for  in range(9)] # _Peter Luschny, Apr 25 2016

A038561 Left-hand border of triangle A046937.

Original entry on oeis.org

1, 2, 3, 8, 24, 83, 324, 1400, 6609, 33758, 185136, 1083233, 6726366, 44130128, 304741623, 2207682188, 16729947276, 132281116715, 1088831511000, 9311082630620, 82569723552561, 758057178490082, 7194283782101844, 70481938088367569
Offset: 0

Views

Author

Keywords

Comments

For n>1: a(n) is the number of entries in the last blocks of all set partitions of [n]. a(3) = 8 because the number of entries in the last blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 3+1+1+2+1 = 8. - Alois P. Heinz, May 08 2017

References

  • H. W. Gould, A linear binomial recurrence and the Bell numbers and polynomials, preprint, 1998

Crossrefs

A040027(n) + B(n), where B(n) = Bell numbers A000110.
Column k=1 of A286416 (for n>1).

Programs

  • Haskell
    a038561 = head . a046937_row  -- Reinhard Zumkeller, Jan 06 2014
  • Maple
    A038561List := proc(m) local A, P, n; A := [1,2]; P := [1];
    for n from 1 to m - 2 do P := ListTools:-PartialSums([A[-1], op(P)]);
    A := [op(A), P[-1]] od; A end: A038561List(24); # Peter Luschny, Mar 24 2022
  • Mathematica
    a[0, 0] = 1; a[1, 0] = 2; a[n_, 0] := a[n-1, n-1]; a[n_, k_] := a[n, k] = a[n, k-1] + a[n-1, k-1]; a[n_] := a[n, 0]; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Jun 06 2013 *)

Formula

G.f. A(x) satisfies: A(x) = 1 + x * (1 + A(x/(1 - x)) / (1 - x)). - Ilya Gutkovskiy, Jun 30 2020

A071074 Sprague-Grundy values for the game of Double Kayles (octal game .7777).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 3, 2, 8, 9, 7, 6, 5, 4, 3, 2, 8, 9, 4, 5, 12, 13, 9, 8, 2, 3, 4, 5, 15, 14, 3, 2, 8, 9, 7, 6, 5, 4, 3, 2, 8, 9, 13, 12, 15, 14, 9, 8, 2, 3, 4, 5, 16, 17, 10, 11, 8, 9, 14, 15, 5, 4, 3, 2, 16, 17, 13, 12, 15, 14, 9, 8, 2, 3, 4, 5, 6, 7, 3, 2, 8, 9, 14, 15, 5, 4, 3, 2
Offset: 0

Views

Author

N. J. A. Sloane, May 26 2002

Keywords

Comments

Sequence is eventually periodic with period 24. The last exception is at n=141. - Eric M. Schmidt, Jan 11 2017

References

  • E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 98.
  • J. H. Conway, On Numbers and Games, Second Edition. A K Peters, Ltd, 2001, p. 129.
  • Guy, R. K. and Smith, C. A. B.; The G-values of various games. Proc. Cambridge Philos. Soc. 52 (1956), 514-526. See page 521.

Crossrefs

Cf. A002186.

Formula

Let b=A002186. Cases A, B: b(n)=0, 2, 5, 7. Cases C, D: b(n)=1, 3, 4, 6, 8. Cases A, C: n even. Cases B, D: n odd. Cases A, D: a(2n)=2*b(n), a(2n+1)=2*b(n)+1. Cases B, C: a(2n)=2*b(n)+1, a(2n+1)=2*b(n).

Extensions

Edited and extended by Christian G. Bower, Oct 22 2002

A001042 a(n) = a(n-1)^2 - a(n-2)^2.

Original entry on oeis.org

1, 2, 3, 5, 16, 231, 53105, 2820087664, 7952894429824835871, 63248529811938901240357985099443351745, 4000376523371723941902615329287219027543200136435757892789536976747706216384
Offset: 0

Views

Author

Keywords

Comments

The next term has 152 digits. - Franklin T. Adams-Watters, Jun 11 2009

References

  • Archimedeans Problems Drive, Eureka, 27 (1964), 6.
  • 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

Cf. A064236 (numbers of digits).

Programs

  • Haskell
    a001042 n = a001042_list !! n
    a001042_list = 1 : 2 : zipWith (-) (tail xs) xs
                   where xs = map (^ 2) a001042_list
    -- Reinhard Zumkeller, Dec 16 2013
  • Mathematica
    RecurrenceTable[{a[0]==1,a[1]==2,a[n]==a[n-1]^2-a[n-2]^2},a,{n,0,12}] (* Harvey P. Dale, Jan 11 2013 *)

Formula

a(n) ~ c^(2^n), where c = 1.1853051643868354640833201434870139866230288004895868726506278977814490371... . - Vaclav Kotesovec, Dec 17 2014

Extensions

More terms from James Sellers, Sep 19 2000.

A001046 a(n) = n*(n-1)*a(n-1)/2 + a(n-2), a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 2, 7, 44, 447, 6749, 142176, 3987677, 143698548, 6470422337, 356016927083, 23503587609815, 1833635850492653, 166884365982441238, 17524692064006822643, 2103129932046801158398, 286043195450428964364771, 43766712033847678348968361
Offset: 0

Views

Author

Keywords

Examples

			a(4) = 4*3*7/2 + 2 = 44.
		

References

  • 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

Cf. A001052.

Programs

  • GAP
    a:=[1,1];; for n in [3..20] do a[n]:=Binomial(n-1,2)*a[n-1]+a[n-2]; od; a; # G. C. Greubel, Sep 20 2019
  • Magma
    I:=[1,1]; [n le 2 select I[n] else Binomial(n-1,2)*Self(n-1) + Self(n-2): n in [1..20]]; // G. C. Greubel, Sep 20 2019
    
  • Maple
    a := proc (n) option remember;
    if n < 2 then 1
    else binomial(n,2)*a(n-1)+a(n-2) fi;
    end proc;
    seq(a(n), n = 0..20); # G. C. Greubel, Sep 20 2019
  • Mathematica
    RecurrenceTable[{a[0]==a[1]==1,a[n]==n(n-1) a[n-1]/2+a[n-2]}, a[n], {n,20}] (* Harvey P. Dale, Sep 07 2011 *)
    t = {1, 1}; Do[AppendTo[t, n*(n-1)*t[[-1]]/2 + t[[-2]]], {n, 2, 20}] (* T. D. Noe, Jun 25 2012 *)
  • PARI
    m=20; v=concat([1,1], vector(m-2)); for(n=3, m, v[n]=binomial(n-1, 2)*v[n-1] + v[n-2] ); v \\ G. C. Greubel, Sep 20 2019
    
  • Sage
    def a(n):
        if (n<2): return 1
        else: return binomial(n,2)*a(n-1)+a(n-2)
    [a(n) for n in (0..20)] # G. C. Greubel, Sep 20 2019
    

Extensions

More terms from James Sellers, Oct 05 2000
Previous Showing 11-20 of 28 results. Next