login
Primes that are not primes-greedy summable, as defined at A242252.
5

%I #6 May 15 2014 10:14:26

%S 2,3,11,17,23,29,37,41,47,53,59,67,71,79,83,89,97,101,107,113,127,131,

%T 137,157,163,167,173,179,197,211,223,227,233,239,257,263,269,277,281,

%U 307,311,317,331,337,353,359,367,373,379,383,389,397,401,409,439

%N Primes that are not primes-greedy summable, as defined at A242252.

%C See A242252 for the definitions of greedy sum and summability. A242255 and A242256 partition the primes.

%H Clark Kimberling, <a href="/A242256/b242256.txt">Table of n, a(n) for n = 1..1000</a>

%e n ... a(n) .... primes-greedy sum ( = a(n) - A242252(n) for n > 1)

%e 1 ... 2 ....... (undefined)

%e 2 ... 3 ........ 2

%e 3 ... 11 ....... 7 + 3

%e 4 ... 17 ....... 13 + 3

%e 5 ... 23 ....... 19 + 3

%t z = 200; s = Table[Prime[n], {n, 1, z}]; t = Table[{s[[n]], #, Total[#] == s[[n]]} &[ DeleteCases[-Differences[FoldList[If[#1 - #2 >= 0, #1 - #2, #1] &, s[[n]], Reverse[Select[s, # < s[[n]] &]]]], 0]], {n, z}]; r[n_] := s[[n]] - Total[t[[n]][[2]]]; tr = Table[r[n], {n, 2, z}] (* A242252 *)

%t c = Table[Length[t[[n]][[2]]], {n, 2, z}] (* A242253 *)

%t f = 1 + Flatten[Position[tr, 0]] (* A242254 *)

%t Prime[f] (* A242255 *)

%t f1 = Prime[Complement[Range[Max[f]], f]] (* A242256 *)

%t (* _Peter J. C. Moses_, May 06 2014 *)

%Y Cf. A242252, A242253, A242254, A242255, A241833, A000040.

%K nonn,easy

%O 1,1

%A _Clark Kimberling_, May 09 2014