login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = [x^prime(n)] Product_{k=1..n} (x^prime(k) + 1 + 1/x^prime(k)).
3

%I #10 Jan 27 2024 20:48:11

%S 1,1,2,4,6,13,31,77,188,449,1191,3014,7920,21498,57833,154073,412733,

%T 1141274,3106771,8576977,24015471,66489615,185886699,517837152,

%U 1435964205,4034697191,11438332340,32395341851,92396549863,263233759500,736127855014,2093027604453

%N a(n) = [x^prime(n)] Product_{k=1..n} (x^prime(k) + 1 + 1/x^prime(k)).

%H Alois P. Heinz, <a href="/A369390/b369390.txt">Table of n, a(n) for n = 1..400</a>

%p s:= proc(n) s(n):= `if`(n<1, 0, ithprime(n)+s(n-1)) end:

%p b:= proc(n, i) option remember; `if`(n>s(i), 0, `if`(i=0, 1,

%p b(n, i-1)+b(n+ithprime(i), i-1)+b(abs(n-ithprime(i)), i-1)))

%p end:

%p a:= n-> b(ithprime(n), n):

%p seq(a(n), n=1..40); # _Alois P. Heinz_, Jan 22 2024

%t Table[Coefficient[Product[(x^Prime[k] + 1 + 1/x^Prime[k]), {k, 1, n}], x, Prime[n]], {n, 1, 32}]

%Y Cf. A063890, A316706, A350880.

%K nonn

%O 1,3

%A _Ilya Gutkovskiy_, Jan 22 2024