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 10 results.

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

Original entry on oeis.org

0, 1, 6, 27, 124, 645, 3906, 27391, 219192, 1972809, 19728190, 217010211, 2604122676, 33853594957, 473950329594, 7109254944135, 113748079106416, 1933717344809361, 34806912206568822, 661331331924807979
Offset: 0

Views

Author

N. J. A. Sloane, "Urkonsaud_admin" (miti(AT)tula.sitek.net)

Keywords

Comments

Exponential convolution of factorials (A000142) and squares (A000290). - Vladimir Reshetnikov, Oct 07 2016

Crossrefs

Programs

  • Maple
    f := proc(n) options remember; if n <= 1 then n elif n = 2 then 6 else -n*(n-2)*f(n-3)+(n-3)*n*f(n-2)+3*n*f(n-1)/(n-1); fi; end;
  • Mathematica
    a=0;lst={a};Do[a=(a+n)*n;AppendTo[lst, a], {n, 2*4!}];lst (* Vladimir Joseph Stephan Orlovsky, Dec 14 2008 *)
    RecurrenceTable[{a[0]==0,a[n]==n(n+a[n-1])},a[n],{n,20}] (* Harvey P. Dale, Oct 22 2011 *)
    Round@Table[(2 E Gamma[n, 1] - 1) n, {n, 0, 20}] (* Round is equivalent to FullSimplify here, but is much faster - Vladimir Reshetnikov, Oct 07 2016 *)

Formula

a(n) = A019461(2n).
For n>=2, a(n) = floor(2*e*n! - n - 2). - Benoit Cloitre, Feb 16 2003
a(n) = sum_{k=0...n} (n! / k!) * k^2. - Ross La Haye, Sep 21 2004
E.g.f.: x*(1+x)*exp(x)/(1-x). - Vladeta Jovovic, Dec 01 2004

Extensions

Better description from Henry Bottomley, May 15 2000

A019460 Add 1, multiply by 1, add 2, multiply by 2, etc., start with 2.

Original entry on oeis.org

2, 3, 3, 5, 10, 13, 39, 43, 172, 177, 885, 891, 5346, 5353, 37471, 37479, 299832, 299841, 2698569, 2698579, 26985790, 26985801, 296843811, 296843823, 3562125876, 3562125889, 46307636557, 46307636571, 648306911994, 648306912009, 9724603680135, 9724603680151, 155593658882416
Offset: 0

Views

Author

Keywords

Comments

After a(7) = 43, the next prime in the sequence is a(649) with 676 digits. - M. F. Hasler, Jan 12 2011

References

  • New York Times, Oct 13, 1996.

Crossrefs

Cf. A019461 (same, but start with 0), A019463 (start with 1), A019462 (start with 3), A082448 (start with 4).
Cf. A082458, A019464, A019465, A019466 (similar, but first multiply, then add; starting with 0,1,2,3).

Programs

  • Mathematica
    a[n_] := If[ OddQ@n, a[n - 1] + (n + 1)/2, a[n - 1]*n/2]; a[0] = 2; Table[ a@n, {n, 0, 28}] (* Robert G. Wilson v, Jul 21 2009 *)
  • PARI
    A019460(n)=2*(A000522(n\2)+(n\2)!)-if(bittest(n,0),1,n\2+2)
    /* For producing the terms in increasing order, the following 'hack' can be used M. F. Hasler, Jan 12 2011 */
    lastn=0; an1=1; A000522(n)={ an1=if(n, n==lastn && return(an1); n==lastn+1||error(); an1*lastn=n)+1 }
    
  • Python
    l=[2]
    for n in range(1, 101):
        l.append(l[n - 1] + ((n + 1)//2) if n%2 else l[n - 1]*(n//2))
    print(l) # Indranil Ghosh, Jul 05 2017

Formula

a(2n) = 2*(A000522(n) + n!) - n - 2.
a(2n+1) = 2*(A000522(n) + n!) - 1.
Recursive: a(0) = 2, a(n) = (1 + floor((n-1)/2) - ceiling((n-1)/2))*(a(n-1) + (n+2)/2) + (ceiling((n-1)/2) - floor((n-1)/2))*(n/2)*a(n-1). - Wesley Ivan Hurt, Jan 12 2013

Extensions

One more term from Robert G. Wilson v, Jul 21 2009
Formula provided by Nathaniel Johnston, Nov 11 2010
Formula double-checked and PARI code added by M. F. Hasler, Nov 12 2010
Edited by M. F. Hasler, Feb 25 2018

A019466 Multiply by 1, add 1, multiply by 2, add 2, etc.; start with 3.

Original entry on oeis.org

3, 3, 4, 8, 10, 30, 33, 132, 136, 680, 685, 4110, 4116, 28812, 28819, 230552, 230560, 2075040, 2075049, 20750490, 20750500, 228255500, 228255511, 2739066132, 2739066144, 35607859872, 35607859885, 498510038390, 498510038404, 7477650576060, 7477650576075, 119642409217200
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A082458 (same, but start with 0), A019464 (start with 1), A019465 (start with 2).
Cf. A019460 .. A019463 & A082448 (similar, but first add, then multiply).

Programs

  • Mathematica
    Module[{a = 3}, Join[{a}, Flatten[Array[{a *= #, a += #} &, 20]]]] (* Paolo Xausa, Oct 24 2024 *)
  • PARI
    A019466(n,a=3)={for(i=2,n+1,if(bittest(i,0),a+=i\2,a*=i\2));a} \\ M. F. Hasler, Feb 25 2018

Extensions

Edited by M. F. Hasler, Feb 25 2018

A082458 Multiply by 1, add 1, multiply by 2, add 2, etc., starting with 0.

Original entry on oeis.org

0, 0, 1, 2, 4, 12, 15, 60, 64, 320, 325, 1950, 1956, 13692, 13699, 109592, 109600, 986400, 986409, 9864090, 9864100, 108505100, 108505111, 1302061332, 1302061344, 16926797472, 16926797485, 236975164790, 236975164804, 3554627472060, 3554627472075, 56874039553200, 56874039553216
Offset: 0

Views

Author

Vladeta Jovovic, Apr 25 2003

Keywords

Comments

Bisections: A007526 and A038154.

Crossrefs

Cf. A019464 (same, but start with 1), A019465 (start with 2), A019466 (start with 3).
Cf. A019460 .. A019463 & A082448 (similar, but first add, then multiply).

Programs

  • Mathematica
    Module[{a = 0}, Join[{a}, Flatten[Array[{a *= #, a += #} &, 20]]]] (* Paolo Xausa, Oct 24 2024 *)
  • PARI
    a(n)=if(n<2,0,if(n%2,(n+1)/2*(floor(exp(1)*((n-1)/2)!)-1),floor(exp(1)*(n/2)!)-1))
    
  • PARI
    A082458(n,a=0)={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>=2, a(2n)=floor(e*n!)-1, a(2*n+1)=(n+1)*(floor(e*n!)-1). - Benoit Cloitre, Apr 28 2003

Extensions

Edited by M. F. Hasler, Feb 25 2018

A019463 Add 1, multiply by 1, add 2, multiply by 2, etc., start with 1.

Original entry on oeis.org

1, 2, 2, 4, 8, 11, 33, 37, 148, 153, 765, 771, 4626, 4633, 32431, 32439, 259512, 259521, 2335689, 2335699, 23356990, 23357001, 256927011, 256927023, 3083124276, 3083124289, 40080615757, 40080615771, 561128620794, 561128620809, 8416929312135, 8416929312151, 134670868994416
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A019461 (same, but start with 0), A019460 (start with 2), A019462, (start with 3), A082448. (start with 4).
Cf. A082458, A019464, A019465, A019466 (similar, but first multiply, then add).
Cf. A019762.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, (t->
          `if`(n::odd, t+(n+1)/2, t*n/2))(a(n-1)))
        end:
    seq(a(n), n=0..32);  # Alois P. Heinz, Jan 16 2024
  • Mathematica
    For[i=1;lst={1},i<15,i++,AppendTo[lst,i+Last[lst]];AppendTo[lst,i Last[lst]]];lst (* Harvey P. Dale, Feb 25 2012 *)
    FoldList[If[OddQ[#2], #1 + (#2 + 1)/2, #1 * (#2/2)]&, 1, Range[32]] (* AnneMarie Torresen, Nov 26 2023 *)
  • PARI
    A019463(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

Limit_{n->oo} a(2n)/n! = 1 + 2e = 1 + A019762. - Jon E. Schoenfield, Jan 16 2024

Extensions

Edited by M. F. Hasler, Feb 25 2018

A082448 Add 1, multiply by 1, add 2, multiply by 2, etc.; start with 4.

Original entry on oeis.org

4, 5, 5, 7, 14, 17, 51, 55, 220, 225, 1125, 1131, 6786, 6793, 47551, 47559, 380472, 380481, 3424329, 3424339, 34243390, 34243401, 376677411, 376677423, 4520129076, 4520129089, 58761678157, 58761678171, 822663494394, 822663494409, 12339952416135, 12339952416151, 197439238658416
Offset: 0

Views

Author

N. J. A. Sloane, based on a suggestion of Nick MacDonald, Apr 25 2003

Keywords

Crossrefs

Cf. A019461 (same, but start with 0), A019463 (start with 1), A019460 (start with 2), A019462 (start with 3).
Cf. A082458, A019464 .. A019466 (similar, but first multiply, then add).

Programs

  • Mathematica
    k = 0; NestList[(k++; {Last@# + k, k(k + Last@#)}) &, {4}, 16] // Flatten
  • PARI
    a=4; for(n=1,150,print(a,","); b=if(n%2-1,a*ceil(n/2),a+ceil(n/2)); a=b)
    
  • PARI
    A082448(n,a=4)={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>=2, a(2n)=floor((2e+4)*n!)-n-2, a(2n+1)=floor((2e+4)*n!)-1.

Extensions

More terms from Benoit Cloitre, Apr 26 2003
Edited by M. F. Hasler, Feb 25 2018

A019461 Add 1, multiply by 1, add 2, multiply by 2, etc.; start with 0.

Original entry on oeis.org

0, 1, 1, 3, 6, 9, 27, 31, 124, 129, 645, 651, 3906, 3913, 27391, 27399, 219192, 219201, 1972809, 1972819, 19728190, 19728201, 217010211, 217010223, 2604122676, 2604122689, 33853594957, 33853594971, 473950329594, 473950329609, 7109254944135, 7109254944151, 113748079106416
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A019463 (same, but start with 1), A019460 (start with 2), A019462 (start with 3), A082448 (start with 4).
Cf. A082458, A019464 .. A019466 (similar, but first multiply, then add).

Programs

  • Maple
    A019461 := proc(n) option remember; if n = 0 then 0 elif n mod 2 = 1 then (n+1)/2+A019461(n-1) else (n/2)*A019461(n-1); fi; end;
  • Mathematica
    Module[{a = 0}, Join[{a}, Flatten[Array[{a += #, a *= #} &, 20]]]] (* Paolo Xausa, Oct 24 2024 *)
  • PARI
    A019461(n,a=0)={for(i=2,n+1,if(bittest(i,0),a*=i\2,a+=i\2));a} \\ M. F. Hasler, Feb 25 2018

Extensions

Edited by M. F. Hasler, Feb 25 2018

A019462 Add 1, multiply by 1, add 2, multiply by 2, etc., start with 3.

Original entry on oeis.org

3, 4, 4, 6, 12, 15, 45, 49, 196, 201, 1005, 1011, 6066, 6073, 42511, 42519, 340152, 340161, 3061449, 3061459, 30614590, 30614601, 336760611, 336760623, 4041127476, 4041127489, 52534657357, 52534657371, 735485203194, 735485203209, 11032278048135, 11032278048151
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A019461 (same, but start with 0), A019463 (start with 1), A019460 (start with 2), A082448 (start with 4).
Cf. A082458, A019464 .. A019466 (similar, but first multiply, then add).

Programs

  • Mathematica
    Module[{a = 3}, Flatten[{a, Array[{a += #, a *= #} &, 20]}]] (* Paolo Xausa, Oct 24 2024 *)
  • PARI
    A019462(n, a=3)={for(i=2, n+1, if(bittest(i, 0), a*=i\2, a+=i\2)); a} \\ M. F. Hasler, Feb 25 2018

Extensions

Edited by M. F. Hasler, Feb 25 2018

A082459 Multiply by 1, add 1, multiply by 2, add 2, etc.

Original entry on oeis.org

-1, -1, 0, 0, 2, 6, 9, 36, 40, 200, 205, 1230, 1236, 8652, 8659, 69272, 69280, 623520, 623529, 6235290, 6235300, 68588300, 68588311, 823059732, 823059744, 10699776672, 10699776685, 149796873590, 149796873604, 2246953104060, 2246953104075, 35951249665200, 35951249665216
Offset: 0

Views

Author

Vladeta Jovovic, Apr 25 2003

Keywords

Comments

Bisections: A038156 and A038157.

Crossrefs

Programs

  • Maple
    seq(op(simplify([exp(1)*GAMMA(k+1,1)-k!-1, exp(1)*GAMMA(k+2,1)-(k+1)!-k-2])),k=0..20); # Robert Israel, Jan 11 2018
  • Mathematica
    FoldList[If[OddQ@ #2, #1 ((#2 + 1)/2), #1 + #2/2] &, -1, Range@ 31] (* Michael De Vlieger, Jan 11 2018 *)

Formula

From Robert Israel, Jan 11 2018: (Start)
a(2*k) = e*Gamma(k+1,1) - k! - 1.
a(2*k+1) = e*Gamma(k+2,1) - (k+1)! - k - 2. (End)

A356639 Number of integer sequences b with b(1) = 1, b(m) > 0 and b(m+1) - b(m) > 0, of length n which transform under the map S into a nonnegative integer sequence. The transform c = S(b) is defined by c(m) = Product_{k=1..m} b(k) / Product_{k=2..m} (b(k) - b(k-1)).

Original entry on oeis.org

1, 1, 3, 17, 155, 2677, 73327, 3578339, 329652351
Offset: 1

Views

Author

Thomas Scheuerle, Aug 19 2022

Keywords

Comments

This sequence can be calculated by a recursive algorithm:
Let B1 be an array of finite length, the "1" denotes that it is the first generation. Let B1' be the reversed version of B1. Let C be the element-wise product C = B1 * B1'. Then B2 is a concatenation of taking each element of B1 and add all divisors of the corresponding element in C. If we start with B1 = {1} then we get this sequence of arrays: B2 = {2}, B3 = {3, 4, 6}, ... . a(n) is the length of the array Bn. In short the length of Bn+1 and so a(n+1) is the sum over A000005(Bn * Bn').
The transform used in the definition of this sequence is its own inverse, so if c = S(b) then b = S(c). The eigensequence is 2^n = S(2^n).
There exist some transformation pairs of infinite sequences in the database:
A026549 <--> A038754; A100071 <--> A001405; A058295 <--> A------;
A111286 <--> A098011; A093968 <--> A205825; A166447 <--> A------;
A079352 <--> A------; A082458 <--> A------; A008233 <--> A264635;
A138278 <--> A------; A006501 <--> A264557; A336496 <--> A------;
A019464 <--> A------; A062112 <--> A------; A171647 <--> A359039;
A279312 <--> A------; A031923 <--> A------.
These transformation pairs are conjectured:
A137326 <--> A------; A066332 <--> A300902; A208147 <--> A308546;
A057895 <--> A------; A349080 <--> A------; A019442 <--> A------;
A349079 <--> A------.
("A------" means not yet in the database.)
Some sequences in the lists above may need offset adjustment to force a beginning with 1,2,... in the transformation.
If we allowed signed rational numbers, further interesting transformation pairs could be observed. For example, 1/n will transform into factorials with alternating sign. 2^(-n) transforms into ones with alternating sign and 1/A000045(n) into A000045 with alternating sign.

Examples

			a(4) = 17. The 17 transformation pairs of length 4 are:
  {1, 2, 3, 4}  = S({1, 2, 6, 24}).
  {1, 2, 3, 5}  = S({1, 2, 6, 15}).
  {1, 2, 3, 6}  = S({1, 2, 6, 12}).
  {1, 2, 3, 9}  = S({1, 2, 6, 9}).
  {1, 2, 3, 12} = S({1, 2, 6, 8}).
  {1, 2, 3, 21} = S({1, 2, 6, 7}).
  {1, 2, 4, 5}  = S({1, 2, 4, 20}).
  {1, 2, 4, 6}  = S({1, 2, 4, 12}).
  {1, 2, 4, 8}  = S({1, 2, 4, 8}).
  {1, 2, 4, 12} = S({1, 2, 4, 6}).
  {1, 2, 4, 20} = S({1, 2, 4, 5}).
  {1, 2, 6, 7}  = S({1, 2, 3, 21}).
  {1, 2, 6, 8}  = S({1, 2, 3, 12}).
  {1, 2, 6, 9}  = S({1, 2, 3, 9}).
  {1, 2, 6, 12} = S({1, 2, 3, 6}).
  {1, 2, 6, 15} = S({1, 2, 3, 5}).
  {1, 2, 6, 24} = S({1, 2, 3, 4}).
b(1) = 1 by definition, b(2) = 1+1 as 1 has only 1 as divisor.
a(3) = A000005(b(2)*b(2)) = 3.
The divisors of b(2) are 1,2,4. So b(3) can be b(2)+1, b(2)+2 and b(2)+4.
a(4) = A000005((b(2)+1)*(b(2)+4)) + A000005((b(2)+2)*(b(2)+2)) + A000005((b(2)+4)*(b(2)+1)) = 17.
		

Crossrefs

Showing 1-10 of 10 results.