login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A022899 Number of solutions to c(1)*prime(2) + ... + c(n)*prime(n+1) = 2, where c(i) = +-1 for i > 1, c(1) = 1. 3

%I #18 Jan 27 2024 19:46:33

%S 0,0,0,1,0,0,0,4,0,9,0,14,0,75,0,155,0,724,0,2376,0,6900,0,26937,0,

%T 92823,0,326942,0,1156399,0,3960856,0,14320442,0,53136802,0,190397836,

%U 0,706309816,0,2596474887,0,9540434672,0,35480735090,0,132003300757,0

%N Number of solutions to c(1)*prime(2) + ... + c(n)*prime(n+1) = 2, where c(i) = +-1 for i > 1, c(1) = 1.

%H Alois P. Heinz, <a href="/A022899/b022899.txt">Table of n, a(n) for n = 1..500</a>

%F a(n) = [x^1] Product_{k=3..n+1} (x^prime(k) + 1/x^prime(k)). - _Ilya Gutkovskiy_, Jan 26 2024

%e a(8) counts these 4 solutions: {3, -5, -7, 11, -13, 17, 19, -23}, {3, -5, -7, 11, 13, -17, -19, 23}, {3, -5, 7, -11, -13, 17, -19, 23}, {3, 5, -7, -11, -13, -17, 19, 23}.

%t {f, s} = {2, 2}; Table[t = Map[Prime[# + f - 1] &, Range[2, z]]; Count[Map[Apply[Plus, #] &, Map[t # &, Tuples[{-1, 1}, Length[t]]]], s - Prime[f]], {z, 22}]

%t (* A022899, a(n) = number of solutions of "sum = s" using Prime(f) to Prime(f+n-1) *)

%t n = 8; t = Map[Prime[# + f - 1] &, Range[n]]; Map[#[[2]] &, Select[Map[{Apply[Plus, #], #} &, Map[t # &, Map[Prepend[#, 1] &, Tuples[{-1, 1}, Length[t] - 1]]]], #[[1]] == s &]] (* the 4 solutions of using n=8 primes; _Peter J. C. Moses_, Oct 01 2013 *)

%K nonn

%O 1,8

%A _Clark Kimberling_

%E Corrected and extended by _Clark Kimberling_, Oct 01 2013

%E a(23)-a(49) from _Alois P. Heinz_, Aug 06 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 06:57 EDT 2024. Contains 371265 sequences. (Running on oeis4.)