This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A237589 #22 Jan 18 2022 02:40:39 %S A237589 1,4,9,16,27,40,57,76,99,128,159,196,237,280,327,380,439,500,567,638, %T A237589 711,790,873,962,1059,1160,1263,1370,1479,1592,1719,1850,1987,2126, %U A237589 2275,2426,2583,2746,2913,3086,3265,3446,3637,3830,4027,4226,4437,4660,4887 %N A237589 Sum of first n odd noncomposite numbers. %C A237589 Partial sums of A006005. %F A237589 a(n) = A007504(n) - 1 = A014284(n+1) - 2. %e A237589 For n = 5 the first five odd noncomposite numbers are 1, 3, 5, 7, 11, so a(5) = 1 + 3 + 5 + 7 + 11 = 27. %p A237589 a := proc(n) option remember; `if`(n=1, 1, a(n-1) + ithprime(n)) end: %p A237589 seq(a(n), n=1..49); # _Peter Luschny_, Sep 20 2018 %t A237589 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 *) %o A237589 (PARI) terms(n) = my(s=1, i=0); forprime(p=3, , if(i >= n, break, print1(s, ", "); i++; s=s+p)) %o A237589 /* Print initial 50 terms as follows */ %o A237589 terms(50) \\ _Felix Fröhlich_, Sep 20 2018 %Y A237589 Cf. A000040, A006005, A007504, A008578, A014284. %K A237589 nonn,easy %O A237589 1,2 %A A237589 _Omar E. Pol_, Feb 21 2014