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!)
A163248 Sum of the n-th composite number plus the number of composite numbers less than the n-th noncomposite number. 1

%I #17 Dec 08 2015 08:57:37

%S 4,6,8,10,12,17,20,24,26,31,38,40,46,51,53,57,63,69,72,79,83,85,91,95,

%T 102,110,114,117,122,124,128,143,147,153,155,165,168,174,180,184,190,

%U 197,200,210,212,216,218,231,243,247

%N Sum of the n-th composite number plus the number of composite numbers less than the n-th noncomposite number.

%H Bo Gyu Jeong, <a href="/A163248/b163248.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A002808(n) + A162177(n) = A008578(n) + A073169(n).

%p nnc:= 1: nc:= 0; b[nnc]:= 0:b[0]:= 0:

%p for x from 2 to 1000 do

%p if isprime(x) then

%p nnc:= nnc+1; b[nnc]:= b[nnc-1];

%p else

%p b[nnc]:= b[nnc]+1;

%p nc:= nc+1;

%p c[nc]:= x;

%p fi

%p od:

%p seq(b[n-1]+c[n],n=1..min(nnc,nc)); # _Robert Israel_, Jan 09 2015

%K nonn,easy,less

%O 1,1

%A _Jaroslav Krizek_, Jul 23 2009

%E Corrected for Aug 2009 change of offset in A158611 and A008578 by _Jaroslav Krizek_, Jan 27 2010

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 April 23 02:53 EDT 2024. Contains 371906 sequences. (Running on oeis4.)