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 A113040 #31 Jan 25 2024 19:02:15 %S A113040 1,1,3,6,16,45,138,439,1417,4698,16021,55146,190274,671224,2404289, %T A113040 8535117,30635869,110496946,401422210,1467402238,5393176633, %U A113040 19883249002,73856531314,273602448261,1017563027699,3803902663467,14266523388813,53564969402478 %N A113040 Number of solutions to +-p(1)+-p(2)+-...+-p(2n)=1 where p(i) is the i-th prime. %C A113040 +-p(1)+-p(2)+-...+-p(2n+1)=1 has no solutions because the l.h.s. is even. %H A113040 Alois P. Heinz and Ray Chandler, <a href="/A113040/b113040.txt">Table of n, a(n) for n = 1..1000</a> (first 130 terms from Alois P. Heinz) %F A113040 a(n) = A022895(2n) + A261061(n). - _M. F. Hasler_, Aug 09 2015 %F A113040 Conjecture: limit_{n->infinity} a(n)^(1/n) = 4. - _Vaclav Kotesovec_, Jun 05 2019 %F A113040 a(n) = [x^1] Product_{k=1..2*n} (x^prime(k) + 1/x^prime(k)). - _Ilya Gutkovskiy_, Jan 25 2024 %e A113040 2 + 3 + 5 - 7 + 11 - 13 = - 2 + 3 + 5 - 7 - 11 + 13 = - 2 + 3 - 5 + 7 + 11 - 13 = 1 so a(3) = 3. %p A113040 A113040:=proc(n) local i,j,p,t; t:= NULL; for j from 2 to 2*n by 2 do p:=1; for i to j do p:=p*(x^(-ithprime(i))+x^(ithprime(i))); od; t:=t,coeff(p,x,1); od; t; end; %p A113040 # second Maple program: %p A113040 sp:= proc(n) sp(n):= `if`(n=0, 0, ithprime(n)+sp(n-1)) end: %p A113040 b := proc(n,i) option remember; `if`(n>sp(i), 0, `if`(i=0, 1, %p A113040 b(n+ithprime(i), i-1)+ b(abs(n-ithprime(i)), i-1))) %p A113040 end: %p A113040 a:= n-> b(1, 2*n): %p A113040 seq(a(n), n=1..40); # _Alois P. Heinz_, Aug 05 2012 %t A113040 sp[n_] := If[n == 0, 0, Prime[n]+sp[n-1]]; b[n_, i_] := b[n, i] =If[n > sp[i], 0, If[i == 0, 1, b[n+Prime[i], i-1] + b[Abs[n-Prime[i]], i-1]]]; a[n_] := b[1, 2*n]; Table[a[n], {n, 1, 40}] (* _Jean-François Alcover_, Nov 11 2015, after _Alois P. Heinz_ *) %Y A113040 Cf. A083309, A022894 - A022904, A022920, A261057 - A261063 and A261044 - A261045; A215036. %Y A113040 Bisection (even part) of A306443. %K A113040 nonn %O A113040 1,3 %A A113040 _Floor van Lamoen_, Oct 12 2005