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.

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

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

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

A098206 A first order iteration: n-th term is obtained from (n-1)-th by adding n-th prime and then multiplying by the n-th prime; initial value is 1.

Original entry on oeis.org

1, 12, 85, 644, 7205, 93834, 1595467, 30314234, 697227911, 20219610260, 626807919021, 23191893005146, 950867613212667, 40887307368146530, 1921703446302889119, 101850282654053126116, 6009166676589134444325
Offset: 1

Views

Author

Labos Elemer, Oct 19 2004

Keywords

Examples

			n=4: a(4)=(a(3)+7)*7=(85+7)*7=644.
		

Crossrefs

Programs

  • Maple
    a:= n -> mul(ithprime(j),j=2..n) + add(ithprime(k)*mul(ithprime(j),j=k..n),k=2..n):
    seq(a(n), n=1..30); # Robert Israel, Feb 12 2015
  • Mathematica
    f[x_]:=(f[x-1]+Prime[x])*Prime[x];f[1]=0;Table[f[w], {w, 1, 25}]
    nxt[{n_,a_}]:=Module[{p=Prime[n+1]},{n+1,p(a+p)}]; NestList[nxt,{1,1},20][[All,2]] (* Harvey P. Dale, Jun 18 2021 *)

Formula

a(n) = (a(n-1)+prime(n))*prime(n), a(1)=1.
a(n) = product(j=2..n, prime(j)) + sum(k=2..n, prime(k)*product(j=k..n, prime(j))). - Robert Israel, Feb 12 2015

A098205 A first order iteration: n-th term is obtained from (n-1)-th by adding n-th prime and then multiplying by the n-th prime; initial value is 0.

Original entry on oeis.org

0, 9, 70, 539, 6050, 78819, 1340212, 25464389, 585681476, 16984763645, 526527673956, 19481523937741, 798742481449062, 34345926702311515, 1614258555008643414, 85555703415458103751, 5047786501512028124790
Offset: 1

Views

Author

Labos Elemer, Oct 19 2004

Keywords

Comments

Difference between sequences generated by this recursion with iv=1[A098206] and iv=0[A098205] provides A070826, i.e. half of n-th primorial number. Analogous recursion is A019461.

Examples

			a[4]=(70+p[4])*p[4]=(70+7)*7=490+49=539=
		

Crossrefs

Programs

  • Mathematica
    f[x_] :=(f[x-1]+Prime[x])*Prime[x];f[1]=0; Table[f[w], {w, 1, 25}]

Formula

a[n]=(a[n-1]+p[n])*p[n], a[0]=0.
Showing 1-7 of 7 results.