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.
%I A350880 #18 Apr 27 2025 09:56:31 %S A350880 1,1,1,3,5,7,17,39,95,233,561,1435,3643,9417,24973,66695,177915, %T A350880 475629,1293017,3517223,9636365,26676197,73848517,205382439,571628347, %U A350880 1588203787,4435819313,12474619295,35194448271,99782519701,283514955585,799783925547 %N A350880 a(n) is the constant term in expansion of Product_{k=1..n} (x^prime(k) + 1 + 1/x^prime(k)). %C A350880 a(n) is the number of solutions to 0 = Sum_{i=1..n} c_i * prime(i) with c_i in {-1,0,1}. a(3) = 3: -2-3+5, +2+3-5, 0+0+0. - _Alois P. Heinz_, Dec 28 2023 %H A350880 Alois P. Heinz, <a href="/A350880/b350880.txt">Table of n, a(n) for n = 0..400</a> %p A350880 s:= proc(n) s(n):= `if`(n<1, 0, ithprime(n)+s(n-1)) end: %p A350880 b:= proc(n, i) option remember; `if`(n>s(i), 0, `if`(i=0, 1, %p A350880 b(n, i-1)+b(n+ithprime(i), i-1)+b(abs(n-ithprime(i)), i-1))) %p A350880 end: %p A350880 a:= n-> b(0, n): %p A350880 seq(a(n), n=0..40); # _Alois P. Heinz_, Dec 28 2023 %t A350880 s[n_] := s[n] = If[n < 1, 0, Prime[n] + s[n-1]]; %t A350880 b[n_, i_] := b[n, i] = If[n > s[i], 0, If[i == 0, 1, b[n, i-1] + b[n + Prime[i], i-1] + b[Abs[n - Prime[i]], i-1]]]; %t A350880 a[n_] := b[0, n]; %t A350880 Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Apr 27 2025, after _Alois P. Heinz_ *) %o A350880 (PARI) a(n) = polcoef (prod(k=1, n, x^prime(k) + 1 + 1/x^prime(k)), 0); \\ _Michel Marcus_, Jan 21 2022 %Y A350880 Cf. A000040, A007576, A022894. %K A350880 nonn %O A350880 0,4 %A A350880 _Ilya Gutkovskiy_, Jan 20 2022