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.

Previous Showing 21-30 of 40 results. Next

A174519 Sum of 3 consecutive primes and of all composite numbers in-between.

Original entry on oeis.org

14, 25, 56, 70, 98, 112, 140, 264, 243, 297, 396, 280, 308, 528, 689, 513, 567, 726, 490, 675, 858, 924, 1350, 1235, 700, 728, 742, 770, 2242, 2318, 1452, 1215, 1859, 1885, 1377, 2041, 1782, 1848, 2249, 1593, 2405, 2431, 1358, 1372, 3060, 5275, 3723, 1582
Offset: 1

Views

Author

Keywords

Comments

2+3+4+5=14, 3+4+5+6+7=25, 5+6+7+8+9+10+11=56, ..

Crossrefs

Programs

  • Mathematica
    f[n_,x_]:=n*x+x*(x+1)/2;Table[Prime[n]+f[Prime[n],Prime[n+2]-Prime[n]-1]+Prime[n+2],{n,5!}]
    sm[{a_,b_,c_}]:=(c-a+1) (a+c)/2; sm/@Partition[Prime[Range[50]],3,1] (* Harvey P. Dale, Mar 11 2012 *)

A188651 Products of two primes (i.e., "semiprimes") that are the sum of three consecutive primes.

Original entry on oeis.org

10, 15, 49, 121, 143, 159, 187, 235, 287, 301, 319, 329, 371, 395, 407, 471, 519, 533, 551, 565, 581, 589, 633, 679, 689, 713, 731, 749, 771, 789, 803, 817, 841, 961, 985, 1079, 1099, 1119, 1135, 1169, 1207, 1271, 1285, 1315, 1349, 1391, 1457, 1477, 1585
Offset: 1

Views

Author

Zak Seidov, Apr 16 2011

Keywords

Comments

Or, semiprimes in A034961 (Sums of three consecutive primes).
Subsequence of square semiprimes: {49, 121, 841, 961, 1849, 22801, 24649, 36481, 69169, ...} = {7, 11, 29, 31, 43, 151, 157, 191, 263, ...}^2 that is also a subsequence of A080665 (Squares in A034961). Cf. also A034962 (Primes A034961).
Somewhat surprisingly, the sum of two consecutive primes is never a semiprime. This follows from that fact that if p+q = 2r for primes p,q,r, then r must between p and q. So if p and q are consecutive, then r does not exist.

Examples

			a(1) = 10 = 2*5 = A034961(1) = prime(1) + prime(2) + prime(3) = 2 + 3 + 5,
a(2) = 15 = 3*5 = A034961(2) = prime(2) + prime(3) + prime(4) = 3 + 5 + 7,
a(3) = 49 = 7*7 = A080665(1) = A034961(6) = prime(6) + prime(7) + prime(8) = 13 + 17 + 19.
		

Programs

  • Mathematica
    semiPrimeQ[n_Integer] := Total[FactorInteger[n]][[2]] == 2; Select[Total /@ Partition[Prime[Range[100]], 3, 1], semiPrimeQ] (* T. D. Noe, Apr 20 2011 *)

A244163 Primes which are the concatenation of three consecutive primes p, q, r while the sum (p + q + r) yields another prime.

Original entry on oeis.org

5711, 111317, 171923, 313741, 414347, 229233239, 389397401, 401409419, 409419421, 449457461, 701709719, 773787797, 787797809, 797809811, 140914231427, 157915831597, 163716571663, 202920392053, 212921312137, 252125312539, 259125932609, 263326472657, 268926932699
Offset: 1

Views

Author

K. D. Bajpai, Jun 21 2014

Keywords

Comments

Subsequence of A030469.
The first five terms of this sequence resemble exactly those of A030469.

Examples

			5711 is in the sequence because the concatenation of [5, 7, 11] = 5711 which is prime. The sum [5 + 7 + 11] = 23 is another prime.
111317 is in the sequence because the concatenation of [11, 13, 17] = 111317 which is prime. The sum [11 + 13 + 17] = 41 is another prime.
		

Crossrefs

Programs

  • Maple
    A244163:= proc() local a,b,c,k,m; a:=ithprime(n); b:=ithprime(n+1); c:=ithprime(n+2); m:=a+b+c; k:=parse(cat(a,b,c)); if isprime(k) and isprime(m) then RETURN (k); fi; end: seq(A244163 (), n=1..500);
  • Mathematica
    prQ[{a_,b_,c_}]:=Module[{p=FromDigits[Flatten[IntegerDigits/@ {a,b,c}]]}, If[ AllTrue[ {p,a+b+c},PrimeQ],p,Nothing]]; prQ/@Partition[ Prime[ Range[ 500]],3,1] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 05 2021 *)

A258269 Primes of the form p^3 + q^2 + r, where p, q, r are consecutive primes.

Original entry on oeis.org

59, 5297, 7417, 81769, 152419, 714479, 1237037, 3330907, 25248317, 64648901, 84801217, 90728159, 286628773, 530133671, 554065817, 823543381, 1028270917, 1096980919, 1299792317, 1321357391, 1417523659, 1574410169, 1648622903, 1997248987, 2084078057, 2556384373
Offset: 1

Views

Author

K. D. Bajpai, May 25 2015

Keywords

Examples

			a(1) = 59 is prime of the form 3^3 + 5^2 + 7.
a(2) = 5297 is prime of the form 17^3 + 19^2 + 23.
		

Crossrefs

Programs

  • Magma
    [k: p in PrimesUpTo (3000) | IsPrime(k) where k is (p^3 + NextPrime(p)^2 + NextPrime(NextPrime(p)))];
    
  • Maple
    A258269:= n-> (ithprime(n)^3+ithprime(n+1)^2+ithprime(n+2)): select(isprime, [seq((A258269(n), n=1..5000))]);
  • Mathematica
    Select[Table[p = Prime[n]; q = NextPrime[p]; r = NextPrime[q]; p^3 + q^2 + r, {n, 5000}], PrimeQ]
  • PARI
    forprime(p=1, 5000, q=nextprime(p+1); r=nextprime(q+1);  k=(p^3 + q^2 + r); if(isprime(k), print1(k,", ")))

A127493 Indices k such that the coefficient [x^1] of the polynomial Product_{j=0..4} (x-prime(k+j)) is prime.

Original entry on oeis.org

1, 5, 8, 9, 22, 29, 45, 49, 60, 69, 87, 89, 90, 107, 114, 124, 125, 131, 134, 138, 145, 156, 171, 183, 188, 191, 203, 204, 207, 212, 219, 255, 261, 290, 298, 303, 329, 330, 343, 344, 349, 354, 378, 397, 398, 400, 403, 454, 456, 466, 474, 515, 549, 560, 570, 578
Offset: 1

Views

Author

Artur Jasinski, Jan 16 2007

Keywords

Comments

A fifth-order polynomial with 5 roots which are the five consecutive primes from prime(k) onward is defined by Product_{j=0..4} (x-prime(k+j)). The sequence is a catalog of the cases where the coefficient of its linear term is prime.
Indices k such that e4(prime(k), prime(k+1), ..., prime(k+4)) is prime, where e4 is the elementary symmetric polynomial summing all products of four variables. - Charles R Greathouse IV, Jun 15 2015

Examples

			For k=2, the polynomial is (x-3)*(x-5)*(x-7)*(x-11)*(x-13) = x^5-39*x^4+574*x^3-3954*x^2+12673*x-15015, where 12673 is not prime, so k=2 is not in the sequence.
For k=5, the polynomial is x^5-83*x^4+2710*x^3-43490*x^2+342889*x-1062347, where 342889 is prime, so k=5 is in the sequence.
		

Crossrefs

Programs

  • Maple
    isA127493 := proc(k)
        local x,j ;
        mul( x-ithprime(k+j),j=0..4) ;
        expand(%) ;
        isprime(coeff(%,x,1)) ;
    end proc:
    A127493 := proc(n)
        option remember ;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA127493(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A127493(n),n=1..60) ; # R. J. Mathar, Apr 23 2023
  • Mathematica
    a = {}; Do[If[PrimeQ[(Prime[x] Prime[x + 1]Prime[x + 2]Prime[x + 3] + Prime[x] Prime[x + 2]Prime[x + 3]Prime[x + 4] + Prime[x] Prime[x + 1]Prime[x + 3]Prime[x + 4] + Prime[x] Prime[x + 1]Prime[x + 2]Prime[x + 4] + Prime[x + 1] Prime[x + 2]Prime[x + 3]Prime[x + 4])], AppendTo[a, x]], {x, 1, 1000}]; a
  • PARI
    e4(v)=sum(i=1,#v-3, v[i]*sum(j=i+1,#v-2, v[j]*sum(k=j+1,#v-1, v[k]*vecsum(v[k+1..#v]))))
    pr(p, n)=my(v=vector(n)); v[1]=p; for(i=2,#v, v[i]=nextprime(v[i-1]+1)); v
    is(n,p=prime(n))=isprime(e4(pr(p,5)))
    v=List(); n=0; forprime(p=2,1e4, if(is(n++,p), listput(v,n))); Vec(v) \\ Charles R Greathouse IV, Jun 15 2015

Extensions

Definition and comment rephrased and examples added by R. J. Mathar, Oct 01 2009

A133659 Primes that are the sum of three consecutive primes as well as the sum of three consecutive composite numbers.

Original entry on oeis.org

23, 31, 41, 59, 71, 109, 131, 199, 211, 251, 269, 311, 487, 503, 701, 829, 941, 1049, 1061, 1151, 1229, 1381, 1511, 1931, 2129, 2179, 2251, 2269, 2393, 2579, 2971, 3041, 3271, 3329, 3581, 3851, 3889, 3911, 4289, 4451, 4481, 4679, 4987, 4999
Offset: 1

Views

Author

Randy L. Ekl, Dec 28 2007

Keywords

Examples

			a(3) = 41 because 41 = 11+13+17 and 41 = 12+14+15.
		

Crossrefs

Programs

  • Mathematica
    a = {}; For[n = 2, n < 10000, n++, If[ ! PrimeQ[n], AppendTo[a, n + Select[Range[n + 1, n + 10], ! PrimeQ[ # ] &][[1]] + Select[Range[n + 1, n + 10], ! PrimeQ[ # ] &][[2]]]]]; b = Table[Prime[i] + Prime[i + 1] + Prime[i + 2], {i, 1, 10000}]; Select[Intersection[a, b], PrimeQ[ # ] &] (* Stefan Steinerberger, Dec 30 2007 *)

Formula

Equals A034962 INTERSECT A060328. - R. J. Mathar, Jan 11 2008

Extensions

More terms from Stefan Steinerberger, Dec 30 2007

A164130 Sums s of squares of three consecutive primes, such that s-+2 are primes.

Original entry on oeis.org

195, 5739, 18459, 32259, 33939, 60291, 74019, 169491, 187131, 244899, 276819, 388179, 783531, 902139, 3588339, 5041491, 5145819, 5193051, 8687091, 9637491, 10227291, 10910019, 11341491, 11757339, 14834379, 15354651, 16115091
Offset: 1

Views

Author

Keywords

Examples

			5^2 + 7^2 + 11^2 = 195 is a sum of the squared consecutive primes 5, 7 and 11, and 193 and 197 are primes, so 195 is a member of the sequence.
		

Crossrefs

Programs

  • Maple
    q:= 2: r:= 3: R:= NULL: count:= 0:
    while count < 100 do
      p:= q; q:= r; r:= nextprime(r);
      s:= p^2+q^2+r^2;
      if isprime(s-2) and isprime(s+2) then
        count:= count+1; R:= R,s;
      fi;
    od:
    R; # Robert Israel, Apr 21 2023
  • Mathematica
    lst={};Do[p=Prime[n]^2+Prime[n+1]^2+Prime[n+2]^2;If[PrimeQ[p-2]&&PrimeQ[p+2], AppendTo[lst,p]],{n,8!}];lst

Formula

A133529 INTERSECT A087679. - R. J. Mathar, Aug 27 2009

Extensions

Comment turned into example by R. J. Mathar, Aug 27 2009

A174520 Sum of all composite numbers in-between prime numbers p(n) and p(n+2).

Original entry on oeis.org

4, 10, 33, 39, 57, 63, 81, 193, 160, 200, 287, 159, 177, 385, 530, 340, 380, 527, 279, 452, 623, 673, 1081, 948, 399, 417, 423, 441, 1893, 1947, 1057, 808, 1434, 1446, 920, 1570, 1295, 1345, 1730, 1060, 1854, 1866, 777, 783, 2453, 4642, 3062, 903, 921, 1873
Offset: 1

Views

Author

Keywords

Comments

2_3_4_5 -> 4, 3_4_5_6_7 -> 4+6=10, 5_6_7_8_9_10_11 -> 6+8+9+10=33, ..

Crossrefs

Programs

  • Mathematica
    f[n_,x_]:=n*x+x*(x+1)/2;Table[f[Prime[n],Prime[n+2]-Prime[n]-1]-Prime[n+1],{n,5!}]

A174521 Primes that are the sum of all composite numbers in-between prime numbers p(n) and p(n+2).

Original entry on oeis.org

193, 673, 1873, 2207, 2833, 4391, 3023, 8209, 5903, 8999, 6047, 9643, 7537, 19843, 10273, 29399, 11953, 12433, 20879, 35999, 36241, 23761, 23831, 24907, 20353, 32401, 33403, 22367, 34129, 57367, 49123, 74311, 51197, 40037, 42773, 71399
Offset: 1

Views

Author

Keywords

Comments

20+21+22+24+25+26+27+28=193,..

Crossrefs

Programs

  • Mathematica
    f[n_,x_]:=n*x+x*(x+1)/2;Select[Table[f[Prime[n],Prime[n+2]-Prime[n]-1]-Prime[n+1],{n,6!}],PrimeQ[ # ]&]
    Select[Table[Total[Select[Range[Prime[n],Prime[n+2]],CompositeQ]],{n,1000}],PrimeQ] (* Harvey P. Dale, May 13 2017 *)

A179007 Sum of 3 consecutive composite odd numbers.

Original entry on oeis.org

45, 61, 73, 85, 95, 107, 119, 133, 145, 155, 163, 175, 185, 197, 209, 221, 233, 243, 253, 263, 271, 279, 287, 299, 315, 331, 343, 351, 357, 363, 369, 377, 387, 397, 409, 419, 429, 435, 445, 455, 467, 475, 485, 495, 505, 515, 523, 535, 545, 555, 561, 571, 585, 599
Offset: 1

Views

Author

Keywords

Examples

			9+15+21=45, 15+21+25=61, 21+25+27=73,..
		

Crossrefs

Programs

  • Mathematica
    t=Select[Range[2, 200], OddQ[#] && ! PrimeQ[#] &]; Plus @@@ Partition[t, 3, 1]
Previous Showing 21-30 of 40 results. Next