|
|
A350895
|
|
a(n) = 1 + a(n-1) * prime(n), starting a(0) = 1.
|
|
2
|
|
|
1, 3, 10, 51, 358, 3939, 51208, 870537, 16540204, 380424693, 11032316098, 342001799039, 12654066564444, 518816729142205, 22309119353114816, 1048528609596396353, 55572016308609006710, 3278748962207931395891, 200003686694683815149352, 13400247008543815615006585
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
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.
|
|
LINKS
|
|
|
FORMULA
|
|
|
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 *)
|
|
PROG
|
(PARI) a(n) = if (n, 1 + a(n-1)*prime(n), 1); \\ Michel Marcus, Jan 22 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|