login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A022902 Number of solutions to c(1)*prime(3)+...+c(n)*prime(n+2) = 2, where c(i) = +-1 for i>1, c(1) = 1. 3
0, 0, 0, 0, 0, 1, 0, 1, 0, 5, 0, 18, 0, 59, 0, 180, 0, 576, 0, 1993, 0, 6864, 0, 23804, 0, 83796, 0, 300913, 0, 1066508, 0, 3831226, 0, 13815422, 0, 50187328, 0, 183452325, 0, 674196751, 0, 2485443437, 0, 9232423194, 0, 34201130579, 0, 127197104929, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,10

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..500

EXAMPLE

a(10) counts these 5 solutions: {5, -7, -11, 13, -17, 19, -23, 29, 31, -37}, {5, -7, -11, 13, -17, 19, 23, -29, -31, 37}, {5, -7, 11, 13, -17, -19, -23, -29, 31, 37}, {5, 7, -11, -13, -17, 19, -23, 29, -31, 37}, {5, 7, -11, -13, 17, -19, -23, -29, 31, 37}.

MATHEMATICA

{f, s} = {3, 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}]

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

n = 10; 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 5 solutions of using n=10 primes; Peter J. C. Moses, Oct 01 2013 *)

CROSSREFS

Sequence in context: A093782 A085105 A094031 * A291926 A056461 A167355

Adjacent sequences:  A022899 A022900 A022901 * A022903 A022904 A022905

KEYWORD

nonn

AUTHOR

Clark Kimberling

EXTENSIONS

Corrected and extended by Clark Kimberling, Oct 01 2013

a(23)-a(49) from Alois P. Heinz, Aug 06 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 17 12:14 EST 2020. Contains 331996 sequences. (Running on oeis4.)