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.

A155974 Partial sums of A053872.

Original entry on oeis.org

37, 236, 513, 880, 1877, 2926, 4029, 5480, 7189, 8966, 11103, 13316, 16269, 19310, 22717, 26606, 30595, 34686, 39995, 47188, 55071, 66184, 79941, 95024, 111097, 128190, 156833, 185742, 216001, 248204, 283293, 319270, 360149, 402306, 445757
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    s1=s2=0;lst={};Do[If[PrimeQ[n],NULL,s1+=n;If[PrimeQ[s1],s2+=s1;AppendTo[lst,s2]]],{n,2,6!}];lst

Extensions

Definition corrected by N. J. A. Sloane, Feb 02 2009

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

A381251 a(n) is the number of ways to write prime(n) as a sum of distinct composites.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 3, 4, 10, 14, 27, 40, 52, 74, 133, 229, 276, 457, 626, 744, 1189, 1599, 2498, 4450, 5862, 6752, 8835, 10139, 13189, 32481, 41614, 60099, 67900, 122825, 138101, 195147, 274193, 342783, 477381, 661502, 736865, 1252245, 1390615, 1711496, 1897886
Offset: 1

Views

Author

Felix Huber, Apr 19 2025

Keywords

Comments

Subsequence of A204389.
All sums have an odd number of odd composite summands (A071904).

Examples

			a(8) = 3 because prime(8) = 19 can be written in 3 ways as a sum of distinct composites: 19 = 9 + 10 = 9 + 4 + 6 = 15 + 4.
		

Crossrefs

Programs

  • Maple
    P:= [seq(ithprime(i),i=1..100)]:
    C:= {$2..P[-1]} minus convert(P,set):
    G:= mul(1+x^c,c=C):
    seq(coeff(G,x,P[i]),i=1..100); # Robert Israel, Apr 22 2025

Formula

a(n) = A204389(A000040(n)). - R. J. Mathar, Apr 22 2025
Showing 1-3 of 3 results.