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-5 of 5 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

A053782 Numbers k such that the sum of the first k composite numbers is prime.

Original entry on oeis.org

5, 14, 17, 20, 35, 36, 37, 43, 47, 48, 53, 54, 63, 64, 68, 73, 74, 75, 86, 101, 106, 127, 142, 149, 154, 159, 208, 209, 214, 221, 231, 234, 250, 254, 258, 259, 272, 283, 302, 304, 329, 332, 346, 352, 374, 398, 417, 424, 439, 440, 445, 458, 471, 550, 551, 556
Offset: 1

Views

Author

G. L. Honaker, Jr., Mar 30 2000

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, 1000} ]
    With[{cn=Accumulate[Select[Range[1000],CompositeQ]]},Position[cn,?PrimeQ]]// Flatten (* _Harvey P. Dale, Feb 09 2023 *)
  • PARI
    lista(nn) = {my(s = 0, nb = 0); forcomposite(c=1, nn, s += c; nb++; if (isprime(s), print1(nb, ", ")););} \\ Michel Marcus, May 13 2018
  • Python
    from sympy import isprime
    A053782_list, n, m, s = [], 1, 4, 4
    while len(A053782_list) < 10000:
        if isprime(s):
            A053782_list.append(n)
        m += 1
        if isprime(m):
            m += 1
        n += 1
        s += m # Chai Wah Wu, May 13 2018
    

Extensions

More terms from Robert G. Wilson v, Mar 22 2001

A013920 Composite numbers k such that the sum of all composites <= k is composite.

Original entry on oeis.org

4, 6, 8, 9, 12, 14, 15, 16, 18, 20, 21, 22, 25, 26, 28, 30, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 55, 56, 57, 58, 60, 63, 64, 65, 69, 70, 72, 74, 77, 78, 80, 81, 82, 84, 85, 86, 90, 91, 92, 94, 95, 96, 98, 104, 105, 106, 108, 110, 111, 112, 114, 115, 116, 118, 119
Offset: 1

Views

Author

Keywords

Crossrefs

Extensions

More terms from David W. Wilson

A364796 Numbers k such that the sum of the first k prime powers (not including 1) is a prime power.

Original entry on oeis.org

1, 2, 3, 6, 8, 13, 18, 20, 22, 37, 41, 43, 46, 62, 87, 89, 95, 99, 111, 115, 118, 124, 130, 146, 150, 160, 164, 168, 180, 192, 201, 205, 211, 221, 263, 283, 287, 315, 339, 352, 356, 364, 396, 398, 408, 418, 434, 442, 450, 476, 508, 512, 526, 534, 536, 548, 556, 582
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 08 2023

Keywords

Examples

			8 is a term because the sum of the first 8 prime powers 2 + 3 + 4 + 5 + 7 + 8 + 9 + 11 = 49 is a prime power.
		

Crossrefs

Programs

  • Mathematica
    Position[Accumulate[Select[Range[4000], PrimePowerQ]], _?PrimePowerQ, Heads -> False] // Flatten
  • PARI
    list(lim) = {my(k = 0, s = 0); for(p = 1, lim, if(isprimepower(p), k++; s += p; if(isprimepower(s), print1(k, ", "))));} \\ Amiram Eldar, Jun 20 2025

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-5 of 5 results.