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!)
A242253 Number of primes in the primes-greedy sum (defined at A242252) for the n-th odd prime. 5

%I #7 May 15 2014 10:13:43

%S 1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,

%T 2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,3,2,2,2,2,2,2,3,

%U 2,2,2,2,2,2,2,2,2,2,2,3,2,3,2,2,2,2

%N Number of primes in the primes-greedy sum (defined at A242252) for the n-th odd prime.

%C See A242252 for the definition of primes-greedy sum.

%H Clark Kimberling, <a href="/A242253/b242253.txt">Table of n, a(n) for n = 1..2000</a>

%e n ... n-th odd prime .. primes-greedy sum... a(n)

%e 2 ... 5 ............... 3 + 2 .............. 2

%e 3 ... 7 ............... 5 + 2 .............. 2

%e 4 ... 11 .............. 7 + 3 .............. 2

%e 5 ... 13 .............. 11 + 2 ............. 2

%e 34 .. 149 ............. 139 + 7 + 3 ........ 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, A242254, A242255, A242256, A241833, A000040.

%K nonn,easy

%O 1,2

%A _Clark Kimberling_, May 09 2014

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 August 17 01:38 EDT 2024. Contains 375198 sequences. (Running on oeis4.)