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-10 of 14 results. Next

A019464 Multiply by 1, add 1, multiply by 2, add 2, etc., start with 1.

Original entry on oeis.org

1, 1, 2, 4, 6, 18, 21, 84, 88, 440, 445, 2670, 2676, 18732, 18739, 149912, 149920, 1349280, 1349289, 13492890, 13492900, 148421900, 148421911, 1781062932, 1781062944, 23153818272, 23153818285, 324153455990, 324153456004, 4862301840060, 4862301840075, 77796829441200
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A033540 (=a(2n)).
Cf. A082458 (same, but start with 0), A019465 (start with 2), A019466 (start with 3).
Cf. A019460 .. A019463 & A082448 (similar, but first add, then multiply).

Programs

  • Haskell
    a019464 n = a019464_list !! n
    a019464_list = 1 : concat (unfoldr ma (1, [1, 1])) where
       ma (x, [_, j]) = Just (ij', (x + 1, ij')) where ij' = [x * j, x * j + x]
    -- Reinhard Zumkeller, Nov 14 2011
    
  • Mathematica
    a[n_?EvenQ] := n/2 + a[n-1]; a[n_?OddQ] := (n+1)*a[n-1]/2;
    a[0] = 1; Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Nov 15 2011 *)
  • PARI
    A019464(n,a=1)={for(i=2,n+1,if(bittest(i,0),a+=i\2,a*=i\2));a} \\ M. F. Hasler, Feb 25 2018

Formula

For n>=1, a(2n)=floor((1+e)*(n-1)!)-1, a(2n+1)=floor((1+e)*(n+1)!)-n-2. - Benoit Cloitre, Apr 29 2003
a(n+1) = (1/2)*a(n)*(n+1 mod 2)*(n+2) + (1/2)*(n mod 2)*(2*a(n)+n+1). - Francois Jooste (pin(AT)myway.com), Jun 25 2003
a(n) = (n mod 2)*(floor((1+e)*(floor(n/2)+1)!)-floor(n/2)-2)+((n+1) mod 2)*(floor((1+e)*floor(n/2)!)-1) for n >= 1 with a(0) = 1. - Wesley Ivan Hurt, Aug 04 2025

Extensions

Edited by M. F. Hasler, Feb 25 2018

A344262 a(0)=1; for n>0, a(n) = a(n-1)*n+1 if n is even, (a(n-1)+1)*n otherwise.

Original entry on oeis.org

1, 2, 5, 18, 73, 370, 2221, 15554, 124433, 1119906, 11199061, 123189682, 1478276185, 19217590418, 269046265853, 4035693987810, 64571103804961, 1097708764684354, 19758757764318373, 375416397522049106, 7508327950440982121, 157674886959260624562
Offset: 0

Views

Author

Amrit Awasthi, May 13 2021

Keywords

Examples

			a(0) = 1;
a(1) = (a(0)+1)*1 =  (1+1)*1 =   2;
a(2) = (a(1)*2)+1 =  (2*2)+1 =   5;
a(3) = (a(2)+1)*3 =  (5+1)*3 =  18;
a(4) = (a(3)*4)+1 = (18*4)+1 =  73;
a(5) = (a(4)+1)*5 = (73+1)*5 = 370.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) a(n):= n*a(n-1) + n^(n mod 2) end: a(0):= 1:
    seq(a(n), n=0..22);  # Alois P. Heinz, May 14 2021
  • Mathematica
    a[1] = 1; a[n_] := a[n] = If[OddQ[n], (n - 1)*a[n - 1] + 1, (n - 1)*(a[n - 1] + 1)]; Array[a, 25] (* Amiram Eldar, May 13 2021 *)

Formula

E.g.f.: (x+1)*cosh(x)/(1-x). - Alois P. Heinz, May 14 2021
Lim_{n->infinity} a(n)/n! = 2*cosh(1) = A137204 = 2*A073743. - Amrit Awasthi, May 15 2021
a(n) = A344317(n) - A155521(n-1) for n > 0. - Alois P. Heinz, May 18 2021

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

Original entry on oeis.org

2, 3, 7, 22, 89, 446, 2677, 18740, 149921, 1349290, 13492901, 148421912, 1781062945, 23153818286, 324153456005, 4862301840076, 77796829441217, 1322546100500690, 23805829809012421, 452310766371236000, 9046215327424720001, 189970521875919120022
Offset: 0

Views

Author

Keywords

Examples

			G.f. = 2 + 3*x + 7*x^2+ 22*x^3 + 89*x^4 + 446*x^5 + 2677*x^6 + 18740*x^7 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ (1 + Exp[x]) / (1 - x), {x, 0, n}]] (* Michael Somos, Sep 04 2013 *)
    Range[0, 20]! CoefficientList[Series[(1 + Exp[x])/(1 - x), {x, 0, 20}], x] (* Vincenzo Librandi, Feb 17 2014 *)
  • PARI
    {a(n) = if( n<0, 0, n! * sum(k=0, n, 1/k!, 1))}; /* Michael Somos, Sep 04 2013 */

Formula

a(n) = A033540(n+1) + 1.
a(n) = n! * (1 + Sum(1/k!, k=0..n)) = A000522(n) + n!. - Michael Somos, Mar 26 1999
E.g.f.: (1+exp(x))/(1-x).
a(n) = floor(n!*(e+1)), n>0. - Gary Detlefs, Jul 18 2010
D-finite with recurrence: a(n) +(-n-1)*a(n-1) +(n-1)*a(n-2)=0. - R. J. Mathar, Feb 16 2014
0 = +a(n)*(+a(n+1) -3*a(n+2) +a(n+3)) +a(n+1)*(+a(n+1) -a(n+3)) +a(n+2)*(+a(n+2)) if n>=0. - Michael Somos, Oct 23 2017

A090805 A simple recurrence with one error.

Original entry on oeis.org

1, 2, 6, 21, 85, 430, 2586, 18109, 144880, 1303929, 13039300, 143432311, 1721187744, 22375440685, 313256169604, 4698842544075, 75181480705216, 1278085171988689, 23005533095796420, 437105128820131999, 8742102576402640000, 183584154104455440021, 4038851390298019680484
Offset: 0

Views

Author

N. J. A. Sloane, Feb 12 2004

Keywords

Comments

I included this in the OEIS only because was published on a web page. The explanation is my own - perhaps the original proposer had a different explanation.

Examples

			1..add.1..multiply.by 1 -> 2
2..add.1..multiply.by 2 -> 6
6......1............. 3 -> 21
21.....1............. 4 -> 88 but here you make a mistake and instead multiply by 4 and add 1, getting 85
85.....1............. 5 -> 430
430....1............. 6 -> 2586
etc
		

References

  • Found on a puzzle page.

Crossrefs

Programs

  • Maple
    a:= proc(n) a(n):= n*a(n-1) + `if`(n=4, 1, n) end: a(0):= 1:
    seq(a(n), n=0..22);  # Alois P. Heinz, May 14 2021
  • Mathematica
    a={1};Do[n=Length[a];a=Append[a,If[n==4,Last[a]n+1,(Last[a]+1)n]],22];a (* Jake L Lande, Jul 28 2024 *)

Formula

a(0) = 1; a(n) = n*(a(n-1) + 1) but make an error if n = 4.
Hans Havermann points out that the first 7 terms could also be produced by the recurrence f[x] = f[x - 1]*(x - 1) + GCD[3*f[x - 1], (x - 1)] with f[1] = 1. (This gives the continuation 1, 2, 6, 21, 85, 430, 2586, 18103, 144825, 1303434, 13034342, ...) But given the nature of the other problems on this quiz, I think my explanation is more likely.

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

Original entry on oeis.org

1, 3, 10, 36, 152, 770, 4632, 32438, 259520, 2335698, 23357000, 256927022, 3083124288, 40080615770, 561128620808, 8416929312150, 134670868994432, 2289404772905378, 41209285912296840, 782976432333639998, 15659528646672800000, 328850101580128800042
Offset: 0

Views

Author

Philippe Deléham, Sep 26 2009

Keywords

Crossrefs

Programs

  • Mathematica
    FoldList[#1*#2 + 2 #2 &, 1, Range[19]](* Robert G. Wilson v, Jul 07 2012 *)
    NestList[{#[[1]]+1,(#[[1]]+1)(#[[2]]+2)}&,{0,1},20][[All,2]] (* Harvey P. Dale, Jul 03 2021 *)

Formula

a(n) = n! + 2*floor(e*n!)-2, n>0. - Gary Detlefs, Jun 06 2010
E.g.f.: (1 + 2 * x * exp(x)) / (1 - x). - Ilya Gutkovskiy, Oct 11 2021

Extensions

Definition corrected by Philippe Deléham, Sep 28 2009

A189243 Number of ways to dissect a nonsquare rectangle into n rectangles with equal area.

Original entry on oeis.org

1, 2, 6, 21, 88, 390, 1914
Offset: 1

Views

Author

Yi Yang, Apr 19 2011

Keywords

Comments

Dissections which differ by rotations or reflections are counted as distinct.
Rectangles may have different shapes.
a(1) to a(5) are the same (but not a(6)) as:
A033540 a(n+1) = n*(a(n)+1), n >= 1, a(1) = 1.
If the dissections with a cross (where four squares share a vertex) were counted twice then a(1) to a(5) would be the same as the 'guillotine partitions' counted by A006318. - Geoffrey H. Morley, Dec 31 2012

Examples

			There are 6 ways to form a rectangle from 3 rectangles with same area:
+-----+ +-+-+-+ +-----+ +--+--+ +-+---+ +---+-+
|     | | | | | |     | |  |  | | |   | |   | |
+-----+ | | | | +--+--+ |  |  | | |   | |   | |
|     | | | | | |  |  | |  |  | | +---+ +---+ |
+-----+ | | | | |  |  | +--+--+ | |   | |   | |
|     | | | | | |  |  | |     | | |   | |   | |
+-----+ +-+-+-+ +--+--+ +-----+ +-+---+ +---+-+
So a(3)=6.
From _Geoffrey H. Morley_, Dec 03 2012: (Start)
b(n) in the given formula is the sum of the appropriate tilings from certain 'frames'. A number that appears in a subrectangle in a frame is the number of rectangles into which the subrectangle is to be divided. Tilings are also counted that are from a reflection and/or half-turn of the frame.
For n = 6 there are 3(X2) frames:
+---+-+-+  +-+-----+  +-+-----+
|   | | |  | |     |  | |     |
|   | | |  | +---+-+  | |  2  |
+-+-+ | |  | |   | |  | |     |
| | | | |  | +---+ |  | +---+-+
| | +-+-+  | |   | |  | |   | |
| | |   |  +-+---+ |  +-+---+ |
| | |   |  |     | |  |     | |
+-+-+---+  +-----+-+  +-----+-+
  2 ways     2 ways     8 ways
The only other frames which yield desired tilings are obtained by rotating each frame above by 90 degrees and scaling it to fit a rectangle with the inverse aspect ratio.
So b(6) = 2(2+2+8) = 24, and a(6) = b(6)+4*a(5)+2*a(4)-4*a(3)-2*a(2) = 24+4*88+2*21-4*6-2*2 = 390.
For n = 7 we can use 7(X2) frames:
+---+--+
|   |  |
|   |  |
| 4 |3 |
|   |  |
|   |  |
|   |  |
+---+--+
63 ways [of creating tilings counted by b(7)]
+---+--+  +-+----+  +--+---+  +-----++  +--+---+  +----+-+
|   |  |  | |    |  |  |   |  ++----+|  |  |   |  ++-+-+ |
|   +-++  | +---++  |2 | 2 |  ||    ||  |  +-+-+  || | | |
| 3 | ||  |2|   ||  |  +--++  ||    ||  |2 | | |  || | | |
|   | ||  | | 2 ||  |  |  ||  || 3  ||  |  | | |  || +-+-+
|   | ||  | |   ||  +--+--+|  ||    ||  +--+-+2|  || |   |
+---+-+|  +-+---+|  |     ||  |+----++  |    | |  |+-+---+
+-----++  +-----++  +-----++  ++-----+  +----+-+  ++-----+
24 ways   16 ways   12 ways   10 ways    8 ways    4 ways
As for n = 6, these are only half the frames and tilings.
So b(7) = 2(63+24+16+12+10+8+4) = 274, and a(7) = b(7)+4*a(6)+2*a(5)-4*a(4)-2*a(3) = 274+4*390+2*88-4*21-2*6 = 1914.
(End)
		

Crossrefs

See the analogous sequences A219861 and A108066 where we count dissections up to symmetry of nonsquare rectangles and squares respectively. - Geoffrey H. Morley, Dec 03 2012

Formula

For n > 4, a(n) = b(n)+
+-------+ +-------+ +-------+ +---+---+ +---+---+
| | | | | | | | | | | |
+-------+ +-------+ +-------+ +---+---+ +---+---+
|[a(n-1)| | | | | |[a(n-2)| | |
|-a(n-2)|*4+| a(n-2)|*2+| a(n-3)|*4+|-a(n-3)|*4+| a(n-4)|*2
|-a(n-3)| +-------+ +---+---+ |-a(n-4)| +---+---+
|] | | | | | | |] | | | |
+-------+ +-------+ +---+---+ +-------+ +---+---+
= b(n)+4*a(n-1)+2*a(n-2)-4*a(n-3)-2*a(n-4) where b(n) is the number of tilings in which no side of the rectangle comprises the side of a tile or the equal sides of two congruent tiles. For example, b(5) = 2. '*2' counts, say, rotation clockwise by 90 degrees (and rescaling the aspect ratio), while '*4' counts all rotations. - Geoffrey H. Morley, Dec 07 2012

Extensions

Edited by N. J. A. Sloane, Apr 21 2011
a(7) added by Geoffrey H. Morley, Dec 03 2012
a(7) corrected by Geoffrey H. Morley, Dec 05 2012

A344229 a(n) = n*a(n-1) + n^signum(n mod 4), a(0) = 1.

Original entry on oeis.org

1, 2, 6, 21, 85, 430, 2586, 18109, 144873, 1303866, 13038670, 143425381, 1721104573, 22374359462, 313241032482, 4698615487245, 75177847795921, 1278023412530674, 23004421425552150, 437084007085490869, 8741680141709817381, 183575282975906165022
Offset: 0

Views

Author

Alois P. Heinz, May 12 2021

Keywords

Comments

This sequence is one of many possible solutions to puzzle 16 on the Meerdaelquiz puzzle page, cf. the Delestinne link and A090805.

Crossrefs

Programs

  • Maple
    a:= proc(n) a(n):= n*a(n-1) + n^signum(n mod 4) end: a(0):= 1:
    seq(a(n), n=0..23);

A368762 a(n) = n! * (1 + Sum_{k=0..n} binomial(k+1,2) / k!).

Original entry on oeis.org

1, 2, 7, 27, 118, 605, 3651, 25585, 204716, 1842489, 18424945, 202674461, 2432093610, 31617217021, 442641038399, 6639615576105, 106233849217816, 1805975436703025, 32507557860654621, 617643599352437989, 12352871987048759990, 259410311728023960021
Offset: 0

Views

Author

Seiichi Manyama, Jan 04 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace((1+x*sum(k=0, 1, binomial(1, k)*x^k/(k+1)!)*exp(x))/(1-x)))

Formula

a(0) = 1; a(n) = n*a(n-1) + binomial(n+1,2).
a(n) = n! + A103519(n).
E.g.f.: (1 + x * (1+x/2) * exp(x)) / (1-x).

A368763 a(n) = n! * (1 + Sum_{k=0..n} binomial(k+2,3) / k!).

Original entry on oeis.org

1, 2, 8, 34, 156, 815, 4946, 34706, 277768, 2500077, 25000990, 275011176, 3300134476, 42901748643, 600624481562, 9009367224110, 144149875586576, 2450547884972761, 44109861929510838, 838087376660707252, 16761747533214146580, 351996698197497079951
Offset: 0

Views

Author

Seiichi Manyama, Jan 04 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace((1+x*sum(k=0, 2, binomial(2, k)*x^k/(k+1)!)*exp(x))/(1-x)))

Formula

a(0) = 1; a(n) = n*a(n-1) + binomial(n+2,3).
a(n) = n! + A368574(n).
E.g.f.: (1 + x * (1+x+x^2/6) * exp(x)) / (1-x).

A368764 a(n) = n! * (1 + Sum_{k=0..n} binomial(k+3,4) / k!).

Original entry on oeis.org

1, 2, 9, 42, 203, 1085, 6636, 46662, 373626, 3363129, 33632005, 369953056, 4439438037, 57712696301, 807977750594, 12119666261970, 193914660195396, 3296549223326577, 59337886019884371, 1127419834377810364, 22548396687556216135, 473516330438680549461
Offset: 0

Views

Author

Seiichi Manyama, Jan 04 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace((1+x*sum(k=0, 3, binomial(3, k)*x^k/(k+1)!)*exp(x))/(1-x)))

Formula

a(0) = 1; a(n) = n*a(n-1) + binomial(n+3,4).
a(n) = n! + A368575(n).
E.g.f.: (1 + x * (1+3*x/2+x^2/2+x^3/24) * exp(x)) / (1-x).
Showing 1-10 of 14 results. Next