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!)
A161570 Sum of all numbers from n up to A018252(n). 4
1, 9, 18, 30, 35, 40, 57, 77, 84, 91, 116, 144, 153, 162, 195, 205, 215, 225, 235, 275, 318, 330, 342, 354, 366, 416, 429, 442, 497, 555, 570, 585, 648, 664, 680, 696, 712, 782, 799, 816, 833, 850, 927, 1007, 1026, 1045, 1064, 1083, 1170, 1190, 1210, 1302 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

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

FORMULA

a(n) = A000217(A018252(n)) - A000217(n-1).

EXAMPLE

a(2) = 2 + 3 + 4 = 9;

a(3) = 3 + 4 + 5 + 6 = 18;

a(4) = 4 + 5 + 6 + 7 + 8 = 30.

MAPLE

A018252 := proc(n) option remember ; if n = 1 then 1; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; fi; od: fi; end:

A000217 := proc(n) n*(n+1)/2 ; end:

A161570 := proc(n) A000217( A018252(n)) - A000217(n-1) ; end: seq(A161570(n), n=1..90) ; # R. J. Mathar, Aug 03 2009

PROG

(PARI) print1(n=1); p=3; forprime(q=5, 97, for(k=p+1, q-1, print1(", "k*(k+1)/2-n++*(n-1)/2)); p=q) \\ Charles R Greathouse IV, Sep 03 2011

CROSSREFS

Cf. A018252, A000217.

Sequence in context: A107223 A194152 A044433 * A140089 A183444 A221533

Adjacent sequences:  A161567 A161568 A161569 * A161571 A161572 A161573

KEYWORD

nonn,easy

AUTHOR

Juri-Stepan Gerasimov, Jun 14 2009

EXTENSIONS

a(26) corrected and extended by R. J. Mathar, Aug 03 2009

Definition rephrased by R. J. Mathar, Sep 11 2009

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 August 6 19:52 EDT 2020. Contains 336256 sequences. (Running on oeis4.)