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!)
A237589 Sum of first n odd noncomposite numbers. 3
1, 4, 9, 16, 27, 40, 57, 76, 99, 128, 159, 196, 237, 280, 327, 380, 439, 500, 567, 638, 711, 790, 873, 962, 1059, 1160, 1263, 1370, 1479, 1592, 1719, 1850, 1987, 2126, 2275, 2426, 2583, 2746, 2913, 3086, 3265, 3446, 3637, 3830, 4027, 4226, 4437, 4660, 4887 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Partial sums of A006005.
LINKS
FORMULA
a(n) = A007504(n) - 1 = A014284(n+1) - 2.
EXAMPLE
For n = 5 the first five odd noncomposite numbers are 1, 3, 5, 7, 11, so a(5) = 1 + 3 + 5 + 7 + 11 = 27.
MAPLE
a := proc(n) option remember; `if`(n=1, 1, a(n-1) + ithprime(n)) end:
seq(a(n), n=1..49); # Peter Luschny, Sep 20 2018
MATHEMATICA
a[1]=1; a[n_]:=a[n]=a[n-1]+Prime[n]; Table[a[n], {n, 1, 49}] (* Robert P. P. McKone, Jan 18 2022 *)
PROG
(PARI) terms(n) = my(s=1, i=0); forprime(p=3, , if(i >= n, break, print1(s, ", "); i++; s=s+p))
/* Print initial 50 terms as follows */
terms(50) \\ Felix Fröhlich, Sep 20 2018
CROSSREFS
Sequence in context: A066969 A213495 A109593 * A138981 A138993 A339330
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Feb 21 2014
STATUS
approved

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 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)