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.

A369733 Number of solutions to 2*k_1 + 3*k_2 + ... + prime(n)*k_n = 1, where k_i are from {-1,0,1}, i=1..n.

This page as a plain text file.
%I A369733 #7 Jan 30 2024 16:01:22
%S A369733 0,0,1,1,3,8,18,39,95,233,565,1440,3640,9409,24957,66699,177931,
%T A369733 475584,1292985,3517163,9636135,26675682,73847316,205379443,571621138,
%U A369733 1588186858,4435778209,12474517743,35194193531,99781874834,283513309423,799779819641
%N A369733 Number of solutions to 2*k_1 + 3*k_2 + ... + prime(n)*k_n = 1, where k_i are from {-1,0,1}, i=1..n.
%F A369733 a(n) = [x^1] Product_{k=1..n} (x^prime(k) + 1 + 1/x^prime(k)).
%p A369733 s:= proc(n) s(n):= `if`(n<1, 0, ithprime(n)+s(n-1)) end:
%p A369733 b:= proc(n, i) option remember; `if`(n>s(i), 0, `if`(i=0, 1,
%p A369733       b(n, i-1)+b(n+ithprime(i), i-1)+b(abs(n-ithprime(i)), i-1)))
%p A369733     end:
%p A369733 a:= n-> b(1, n):
%p A369733 seq(a(n), n=0..32);  # _Alois P. Heinz_, Jan 30 2024
%t A369733 Table[Coefficient[Product[(x^Prime[k] + 1 + 1/x^Prime[k]), {k, 1, n}], x, 1], {n, 0, 31}]
%Y A369733 Cf. A007576, A063866, A113040, A350880, A369560, A369628.
%K A369733 nonn
%O A369733 0,5
%A A369733 _Ilya Gutkovskiy_, Jan 30 2024