login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

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. 1
0, 0, 0, 1, 0, 0, 0, 4, 0, 9, 0, 14, 0, 75, 0, 155, 0, 724, 0, 2376, 0, 6900 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,8

LINKS

Table of n, a(n) for n=1..22.

EXAMPLE

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}.

MATHEMATICA

{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}]

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

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 Moses, Oct 01 2013 *)

CROSSREFS

Sequence in context: A013496 A187172 A241667 * A081148 A187606 A138478

Adjacent sequences:  A022896 A022897 A022898 * A022900 A022901 A022902

KEYWORD

nonn

AUTHOR

Clark Kimberling

EXTENSIONS

Corrected and extended by Clark Kimberling, Oct 01 2013

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified November 27 13:22 EST 2014. Contains 250196 sequences.