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

A370685 Semiprimes that are also the sums of two, three and four successive semiprimes.

Original entry on oeis.org

2045, 2705, 2855, 14614, 18838, 28437, 31299, 43603, 68807, 76841, 77386, 88041, 108415, 116822, 194605, 213679, 218729, 252094, 255202, 269653, 290449, 294683, 302761, 305362, 310799, 339382, 348242, 361055, 398111, 445066, 445174, 459761, 464567, 489809, 496081, 501386, 515981, 534777, 544405
Offset: 1

Views

Author

Robert Israel, Feb 26 2024

Keywords

Examples

			a(3) = 2855 is a term because 2855 = 5 * 571 is a semiprime, A001358(423) = 1418 = 2*709 and A001358(424) = 1437 = 3 * 479 are two successive semiprimes whose sum is 2855, A001358(285) = 949 = 13 * 73, A001358(286) = 951 = 3 * 317 and A001358(287) = 955 = 5 * 191 are three successive semiprimes whose sum is 2855, and A001358(216) = 707 = 7 * 101, A001358(217) = 713 = 23 * 31, A001358(218) = 717 = 3 * 239, A001358(219) = 718 = 2 * 359 are four successive semiprimes whose sum is 2855.
		

Crossrefs

Cf. A001358, A370162. Intersection of A092192, A131610 and A158339.

Programs

  • Maple
    N:= 10^6: # for terms <= N
    P:= select(isprime, [2, seq(i, i=3..N/2, 2)]):
    nP:= nops(P):
    SP:= 0:
    for i from 1 while P[i]^2 <= N do
      m:= ListTools:-BinaryPlace(P, N/P[i]);
      SP:= SP, op(P[i]*P[i..m]);
    od:
    SP:= sort([SP]):
    SS:= ListTools:-PartialSums(SP):
    SS2:= {seq(SS[i]-SS[i-2], i=3..nops(SS))}:
    SS3:= {seq(SS[i]-SS[i-3], i=4..nops(SS))}:
    SS4:= {seq(SS[i]-SS[i-4], i=5..nops(SS))}:
    A:=SS2 intersect SS3 intersect SS4 intersect convert(SP, set):
    A:= sort(convert(A, list)):

A370687 a(n) is the first number that is the sum of k successive semiprimes for 1 <= k <= n.

Original entry on oeis.org

4, 10, 134, 2045, 2705, 16626281
Offset: 1

Views

Author

Robert Israel, Feb 27 2024

Keywords

Comments

a(7) > 5 * 10^8 if it exists.

Examples

			a(3) = 134 because 134 = 2 * 67 is a semiprime, the sum of two successive semiprimes 65 = 5 * 13 and 69 = 3 * 23, and the sum of three successive semiprimes 39 = 3 * 13, 46 = 2 * 23, 49 = 7 * 7, and is the least such number.
		

Crossrefs

Programs

  • Maple
    N:= 2*10^7: # for terms <= N
    P:= select(isprime, [2, seq(i, i=3..N/2, 2)]):
    nP:= nops(P):
    SP:= 0:
    for i from 1 while P[i]^2 <= N do
      m:= ListTools:-BinaryPlace(P, N/P[i]);
      SP:= SP, op(P[i]*P[i..m]);
    od:
    SP:= sort([SP]):
    SS:= ListTools:-PartialSums(SP):
    V:= Vector(6):
    SI:= Vector(6):
    II:= Vector(6,1):
    for i from 1 to 6 do SI[i]:= SS[i+1]-SS[1] od:
    count:= 1: V[1]:= 4: m:= 4: im:= {1}:
    while count < 6 do
      for j in im do
        II[j]:= II[j]+1;
        SI[j]:= SS[II[j]+j] - SS[II[j]];
      od;
      m:= min(SI);
      im:= select(j -> SI[j] = m, {$1..20});
      for k from 1 to 20 while {$1..k} subset im do
        if V[k] = 0 then V[k]:= m; count:= count+1 fi
      od;
    od:
    convert(V,list);
Showing 1-2 of 2 results.