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.

A350895 a(n) = 1 + a(n-1) * prime(n), starting a(0) = 1.

Original entry on oeis.org

1, 3, 10, 51, 358, 3939, 51208, 870537, 16540204, 380424693, 11032316098, 342001799039, 12654066564444, 518816729142205, 22309119353114816, 1048528609596396353, 55572016308609006710, 3278748962207931395891, 200003686694683815149352, 13400247008543815615006585
Offset: 0

Views

Author

Alois P. Heinz, Jan 21 2022

Keywords

Comments

a(n) is the sum of all (j+1)-th products of (n-j) successive primes for j=0..n: a(3) = 2*3*5 + 3*5 + 5 + 1 = ((1*2 + 1)*3 + 1)*5 + 1 = 51.

Crossrefs

Row sums of A096334.

Programs

  • Maple
    a:= proc(n) option remember;
         `if`(n=0, 1, 1+a(n-1)*ithprime(n))
        end:
    seq(a(n), n=0..23);
  • Mathematica
    Nest[Append[#1, 1 + #1[[-1]] Prime[#2]] & @@ {#, Length@ #} &, {1}, 19] (* Michael De Vlieger, Jan 22 2022 *)
    nxt[{n_,a_}]:={n+1,a Prime[n+1]+1}; NestList[nxt,{0,1},20][[;;,2]] (* Harvey P. Dale, Jul 30 2023 *)
  • PARI
    a(n) = if (n, 1 + a(n-1)*prime(n), 1); \\ Michel Marcus, Jan 22 2022

Formula

a(n) = Sum_{k=0..n} A096334(n,k) = Sum_{k=0..n} A002110(n)/A002110(k).
a(n) mod 2 = A135528(n+1).