cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A013921 Composite numbers that are equal to the sum of the first k composites for some k.

Original entry on oeis.org

4, 10, 18, 27, 49, 63, 78, 94, 112, 132, 153, 175, 224, 250, 305, 335, 400, 434, 469, 505, 543, 582, 622, 664, 708, 753, 799, 847, 896, 946, 1158, 1214, 1271, 1329, 1389, 1514, 1578, 1643, 1846, 1916, 1988, 2062, 2290, 2368, 2448, 2529, 2611, 2695, 2780, 2866
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{nn=100,comps},comps=Complement[Range[4,nn],Prime[ Range[ PrimePi[ nn]]]]; Select[Accumulate[comps],!PrimeQ[#]&]] (* Harvey P. Dale, May 21 2014 *)
  • PARI
    isok(c) = if ((c>1) && !isprime(c), my(s=0); forcomposite(x=1, oo, s+=x; if (s == c, return(1)); if (s > c, return(0)))); \\ Michel Marcus, Nov 25 2022

Formula

a(n) = A053767(A013919(n)). [Found by LODA miner] - Christian Krause, Nov 24 2022

Extensions

More terms from David W. Wilson
Name edited by Michel Marcus, Nov 25 2022

A013919 Numbers n such that sum of first n composites is composite.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 38, 39, 40, 41, 42, 44, 45, 46, 49, 50, 51, 52, 55, 56, 57, 58, 59, 60, 61, 62, 65, 66, 67, 69, 70, 71, 72, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 87, 88, 89, 90, 91, 92, 93
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    f[ n_Integer ] := Block[ {k = n + PrimePi[ n ] + 1}, While[ k - PrimePi[ k ] - 1 != n, k++ ]; k ]; s = 0; Do[ s = s + f[ n ]; If[ ! PrimeQ[ s ], Print[ n ] ], {n, 1, 100} ]
    With[{comps=Rest[Select[Range[150],!PrimeQ[#]&]]},Rest[Flatten[ Position[ Accumulate[ comps],?(!PrimeQ[#]&)]]]] (* _Harvey P. Dale, Oct 16 2013 *)

Extensions

More terms from David W. Wilson

A020642 n-th composite is sum of first k composites for some k.

Original entry on oeis.org

1, 5, 10, 17, 33, 44, 56, 69, 82, 99, 116, 134, 175, 196, 242, 267, 321, 349, 377, 408, 442, 475, 507, 542, 581, 619, 659, 700, 741, 785, 966, 1015, 1065, 1111, 1167, 1273, 1329, 1383, 1563, 1622, 1687, 1751, 1949, 2017, 2084, 2159, 2231, 2302, 2375, 2449, 2685
Offset: 1

Views

Author

Keywords

Crossrefs

Showing 1-3 of 3 results.