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.

A140464 1 together with terms of A037174.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 47, 61, 73, 107, 167, 179, 313, 347, 421, 479, 719, 863, 1153, 1213, 1283, 1307, 1523, 3467, 3733, 4007, 4621, 4787, 5087, 5113, 5413, 7523, 7703, 9817, 10333, 12347, 12539, 13381, 17027, 18553, 19717, 19813, 23399, 26003, 31873, 36097
Offset: 1

Views

Author

Jonathan Vos Post, Jun 23 2008

Keywords

Crossrefs

Cf. A037174.

Extensions

Data corrected by Giovanni Resta, Jun 20 2016

A060328 Primes which are the sum of three consecutive composite numbers.

Original entry on oeis.org

23, 31, 41, 59, 67, 71, 109, 113, 131, 139, 157, 199, 211, 239, 251, 269, 293, 311, 337, 379, 383, 409, 419, 487, 491, 499, 503, 521, 571, 599, 631, 701, 751, 769, 773, 787, 829, 877, 881, 919, 941, 953, 991, 1009, 1013, 1039, 1049, 1061, 1103, 1117, 1151
Offset: 1

Views

Author

Robert G. Wilson v, Mar 30 2001

Keywords

Comments

"Consecutive" necessarily means consecutive in the list of composite numbers as opposed to consecutive in the integers, as the sum of any 3 consecutive integers is a multiple of 3. - Peter Munn, Aug 20 2023

Examples

			a(3) = 41 is equal to 12+14+15.
		

Crossrefs

Primes that are the sum of other numbers of consecutive composite numbers: A060254 (2), A060329 (4), A060330 (5), A060331 (6), A060332 (7), A060333 (8). See also A037174.
Cf. A034962.
Complement within A166039\{5, 11} of A151741.

Programs

  • Mathematica
    composite[ n_Integer ] := (k = n + PrimePi[ n ] + 1; While[ k - PrimePi[ k ] - 1 != n, k++ ]; k); b = {}; Do[ p = composite[ n ] + composite[ n + 1 ] + composite[ n + 2 ]; If[ PrimeQ[ p ], b = Append[ b, p ] ], {n, 1, 1000} ]; b

A133576 Numbers which are sums of consecutive composites.

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81
Offset: 1

Views

Author

Jonathan Vos Post, Dec 26 2007

Keywords

Comments

This is to composites A002808 as A034707 is to primes A000040. The complement of this sequence, numbers which are not sums of consecutive composites, begins 1, 2, 3, 5, 7, ... (A140464).

Examples

			Every composite is in this sequence as one consecutive composite. We account for primes thus:
a(10) = 17 = 8 + 9.
a(12) = 19 = 9 + 10.
a(16) = 23 = 6 + 8 + 9.
a(22) = 29 = 14 + 15.
a(24) = 31 = 9 + 10 + 12.
a(30) = 37 = 4 + 6 + 8 + 9 + 10.
a(34) = 41 = 20 + 21 = 12 + 14 + 15.
a(36) = 43 = 21 + 22.
Not included = 47.
a(45) = 53 = 26 + 27 = 8 + 9 + 10 + 12 + 14.
a(51) = 59 = 18 + 20 + 21 = 6 + 8 + 9 + 10 + 12 + 14.
Not included = 61.
a(58) = 67 = 33 + 34 = 21 + 22 + 24 = 10 + 12 + 14 + 15 + 16.
a(62) = 71 = 35 + 36 = 22 + 24 + 25 = 4 + 6 + 8 + 9 + 10 + 12 + 14.
Not included = 73.
a(69) = 79 = 39 + 40.
a(73) = 83 = 14 + 15 + 16 + 18 + 20.
a(79) = 89 = 44 + 45.
a(87) = 97 = 48 + 49 = 22 + 24 + 25 + 26.
a(91) = 101 = 50 + 51.
a(93) = 103 = 51 + 52.
		

Crossrefs

Cf. A002808, A034707, A037174, A140464 (complement).

Programs

  • Maple
    isA133576 := proc(n)
        local i,j ;
        for i from 1 do
            if A002808(i) > n then
                return false;
            end if;
            for j from i do
                s := add( A002808(l),l=i..j) ;
                if s > n then
                    break;
                elif s = n then
                    return true;
                end if;
            end do:
        end do:
    end proc:
    A133576 := proc(n)
        local a;
        if n = 1 then
            return A002808(1) ;
        else
            for a from procname(n-1)+1 do
                if isA133576(a) then
                    return a;
                end if;
            end do:
        end if ;
    end proc:
    seq(A133576(n),n=1..71) ; # R. J. Mathar, Feb 14 2015
  • Mathematica
    okQ[n_] := If[CompositeQ[n], True, MemberQ[IntegerPartitions[n, All, Select[Range[n], CompositeQ]], p_List /; Length[p] == Length[Union[p]] && AllTrue[Complement[Range[p[[-1]], p[[1]]], p], PrimeQ]]];
    Select[Range[150], okQ] (* Jean-François Alcover, Oct 27 2023 *)
Showing 1-3 of 3 results.