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 A294174 #34 Mar 11 2024 01:53:57 %S A294174 0,10,1988,14697,83292,1503397,18859052,93952013,89171409882, %T A294174 9646383703961,209456854921713,3950430820867201, %U A294174 13113506646374409451778 %N A294174 Numbers that can be expressed both as the sum of first primes and as the sum of first composites. %e A294174 From _Jon E. Schoenfield_, Feb 10 2018: (Start) %e A294174 10 is in the sequence because prime(1) + prime(2) + prime(3) = 2 + 3 + 5 = 10 and composite(1) + composite(2) = 4 + 6 = 10 (where composite(i) is the i-th composite number). %e A294174 1988 is in the sequence because Sum_{i=1..33} prime(i) = A007504(33) = Sum_{i=1..51} composite(i) = A053767(51) = 1988. %e A294174 a(n) = A007504(j) %e A294174 n j k = A053767(k) %e A294174 == ======== ======== ================= %e A294174 1 0 0 0 %e A294174 2 3 2 10 %e A294174 3 33 51 1988 %e A294174 4 80 147 14697 %e A294174 5 175 361 83292 %e A294174 6 660 1582 1503397 %e A294174 7 2143 5699 18859052 %e A294174 8 4556 12821 93952013 %e A294174 9 118785 403341 89171409882 %e A294174 10 1131142 4229425 9646383703961 %e A294174 11 5012372 19786181 209456854921713 %e A294174 12 20840220 86192660 3950430820867201 (End) %t A294174 nextComposite[n_] := Block[{k = n + 1}, While[PrimeQ@k, k++]; k]; c = sc = 4; p = sp = 2; lst = {0}; While[p < 1000000000, If[ sc == sp, AppendTo[lst, sc]; c = nextComposite@c; sc += c]; While[ sp < sc, p = NextPrime@ p; sp += p]; While[ sc < sp, c = nextComposite@ c; sc += c]]; lst (* _Robert G. Wilson v_, Feb 11 2018 *) %t A294174 Module[{pr=Accumulate[Prime[Range[5*10^7]]],co=Accumulate[Select[ Range[ 11*10^7], CompositeQ]]},Join[ {0},Intersection[pr,co]]] (* The program generates the first 12 terms of the sequence; to generate the 13th term increase the Range specifications substantially, but the program will take a long time to run. *) (* _Harvey P. Dale_, Sep 17 2019 *) %Y A294174 Intersection of A007504 and A053767. %Y A294174 Cf. A066527, A154587. %K A294174 nonn,more,nice %O A294174 1,2 %A A294174 _Max Alekseyev_, Feb 10 2018