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 53 results. Next

A165982 Primes that are 4 plus the sum of three consecutive primes.

Original entry on oeis.org

19, 53, 101, 113, 163, 191, 227, 239, 353, 443, 461, 491, 523, 569, 593, 683, 821, 887, 1019, 1103, 1123, 1289, 1307, 1319, 1481, 1693, 1721, 1783, 1811, 1871, 1997, 2203, 2237, 2273, 2333, 2459, 2741, 2789, 3001, 3023, 3089, 3251, 3313, 3373, 3407, 3491
Offset: 1

Views

Author

Vincenzo Librandi, Oct 03 2009

Keywords

Comments

Primes of the form 4+A034961(k).

Examples

			A000040(8)  =  19 = 4 + A034961(2).
A000040(16) =  53 = 4 + A034961(6).
A000040(26) = 101 = 4 + A034961(10).
		

Programs

  • Mathematica
    Select[Total[#]+4&/@Partition[Prime[Range[200]],3,1],PrimeQ]  (* Harvey P. Dale, Jan 12 2011 *)

Extensions

1721 inserted by R. J. Mathar, Oct 05 2009

A166039 Sums of three consecutive nonprimes A141468.

Original entry on oeis.org

5, 11, 18, 23, 27, 31, 36, 41, 45, 49, 54, 59, 63, 67, 71, 75, 78, 81, 85, 90, 95, 99, 102, 105, 109, 113, 117, 121, 126, 131, 135, 139, 143, 147, 150, 153, 157, 161, 165, 168, 171, 175, 180, 185, 189, 192, 195, 199, 203, 207, 211, 216, 221, 225, 228, 231, 235
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 05 2009

Keywords

Examples

			a(1) = 0 + 1 + 4 =  5;
a(2) = 1 + 4 + 6 = 11;
a(3) = 4 + 6 + 8 = 18.
		

Crossrefs

Programs

  • Maple
    A002808 := proc(n) option remember; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then return a; fi; od: fi; end: A141468 := proc(n) if n <= 2 then n-1 ; else A002808(n-2) ; fi; end: A166039 := proc(n) add(A141468(j),j=n..n+2) ; end: seq(A166039(n),n=1..120) ; # R. J. Mathar, Oct 10 2009
  • Mathematica
    With[{nn=100},Total/@Partition[Complement[Range[0,nn],Prime[ Range[ PrimePi[ nn]]]],3,1]] (* Harvey P. Dale, Aug 05 2015 *)

A127492 Indices m of primes such that Sum_{k=0..2, k

Original entry on oeis.org

2, 10, 17, 49, 71, 72, 75, 145, 161, 167, 170, 184, 244, 250, 257, 266, 267, 282, 286, 301, 307, 325, 343, 391, 405, 429, 450, 537, 556, 561, 584, 685, 710, 743, 790, 835, 861, 904, 928, 953
Offset: 1

Views

Author

Artur Jasinski, Jan 16 2007

Keywords

Comments

Let p_0 .. p_4 be five consecutive primes, starting with the m-th prime. The index m is in the sequence if the absolute value [x^0] of the polynomial (x-p_0)*[(x-p_1)*(x-p_2) + (x-p_2)*(x-p_3) + (x-p_3)*(x-p_4)] + (x-p_1)*[(x-p_2)*(x-p_3) + (x-p_3)*(x-p_4)] + (x-p_2)*(x-p_3)*(x-p_4) is two times a prime. The correspondence with A127491: the coefficient [x^2] of the polynomial (x-p_0)*(x-p_1)*..*(x-p_4) is the sum of 10 products of a set of 3 out of the 5 primes. Here the sum is restricted to the 6 products where the two largest of the 3 primes are consecutive. - R. J. Mathar, Apr 23 2023

Crossrefs

Programs

  • Maple
    isA127492 := proc(k)
        local x,j ;
        (x-ithprime(k))* mul( x-ithprime(k+j),j=1..2)
        +(x-ithprime(k))* mul( x-ithprime(k+j),j=2..3)
        +(x-ithprime(k))* mul( x-ithprime(k+j),j=3..4)
        +(x-ithprime(k+1))* mul( x-ithprime(k+j),j=2..3)
        +(x-ithprime(k+1))* mul( x-ithprime(k+j),j=3..4)
        +(x-ithprime(k+2))* mul( x-ithprime(k+j),j=3..4) ;
        p := abs(coeff(expand(%/2),x,0)) ;
        if type(p,'integer') then
            isprime(p) ;
        else
            false ;
        end if ;
    end proc:
    for k from 1 to 900 do
        if isA127492(k) then
            printf("%a,",k) ;
        end if ;
    end do: # R. J. Mathar, Apr 23 2023
  • Mathematica
    a = {}; Do[If[PrimeQ[(Prime[x] Prime[x + 1]Prime[x + 2] + Prime[x] Prime[x + 2]Prime[x + 3] + Prime[x] Prime[x + 3] Prime[x + 4] + Prime[x + 1] Prime[x + 2]Prime[x + 3] + Prime[x + 1] Prime[x + 3]Prime[x + 4] + Prime[x + 2] Prime[x + 3] Prime[x + 4])/2], AppendTo[a, x]], {x, 1, 1000}]; a
    prQ[{a_,b_,c_,d_,e_}]:=PrimeQ[(a b c+a c d+a d e+b c d+b d e+c d e)/2]; PrimePi/@Select[ Partition[ Prime[Range[1000]],5,1],prQ][[;;,1]] (* Harvey P. Dale, Apr 21 2023 *)

Extensions

Definition simplified by R. J. Mathar, Apr 23 2023
Edited by Jon E. Schoenfield, Jul 23 2023

A165985 Primes that are 8 plus the sum of three consecutive primes.

Original entry on oeis.org

23, 31, 67, 79, 139, 151, 167, 181, 277, 337, 379, 433, 479, 541, 641, 709, 739, 757, 797, 811, 919, 1069, 1087, 1237, 1279, 1399, 1619, 1697, 1787, 1801, 1951, 2083, 2137, 2207, 2311, 2503, 2557, 2659, 2713, 2767, 2833, 2939, 3049, 3061, 3079, 3169, 3301, 3547, 3677
Offset: 1

Views

Author

Vincenzo Librandi, Oct 03 2009

Keywords

Comments

Primes of the form 8+A034961(k).

Examples

			A000040(9)= 23 = 8+ A034961(2). A000040(11) = 31 = 8+A034961(3). A000040(19) = 67 = 8+A034961(7).
		

Programs

  • Mathematica
    Select[Total[#] + 8&/@Partition[Prime[Range[900]], 3, 1], PrimeQ] (* Vincenzo Librandi, Oct 13 2012 *)

Extensions

Extended by R. J. Mathar, Oct 05 2009

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 *)

A270267 Carmichael numbers (A002997) that are the sum of three consecutive primes.

Original entry on oeis.org

252601, 410041, 1615681, 2113921, 10606681, 10877581, 11921001, 26932081, 44238481, 54767881, 82929001, 120981601, 128697361, 208969201, 246446929, 255160621, 278152381, 280067761, 311388337, 325546585, 334783585, 416964241, 533860309, 593234929, 672389641
Offset: 1

Views

Author

Altug Alkan, Mar 14 2016

Keywords

Comments

In other words, Carmichael numbers of the form p + q + r where p, q and r are consecutive primes.
If a Carmichael number is the sum of n consecutive primes, it is so obvious that the minimum value of n is 3.
Intersection of A002997 and A034961.

Examples

			84191, 84199 and 84211 are consecutive primes and sum of them is 252601 that is a Carmichael number.
136657, 136691 and 136693 are consecutive primes and sum of them is 410041 that is a Carmichael number.
538553, 538561 and 538567 are consecutive primes and sum of them is 1615681 that is a Carmichael number.
		

Crossrefs

Programs

  • PARI
    isA002997(n) = {my(f); bittest(n, 0) && !for(i=1, #f=factor(n)~, (f[2, i]==1 && n%(f[1, i]-1)==1)||return) && #f>1}
    a034961(n) = my(p=prime(n), q=nextprime(p+1)); p+q+nextprime(q+1);
    for(n=1, 1e6, if(isA002997(a034961(n)), print1(a034961(n), ", ")));

Extensions

More terms from Amiram Eldar, Jun 25 2019

A283873 Smallest number that is the sum of n successive primes and also the sum of n successive semiprimes, n > 1.

Original entry on oeis.org

24, 749, 48, 311, 690, 251, 2706, 2773, 6504, 1081, 2162, 1753, 11356, 6223, 1392, 2303, 9838, 637, 14510, 1995, 3154, 21459, 72960, 5691, 8140, 1475, 2350, 3647, 1593, 7607, 55074, 2719, 9852, 12143, 106562, 12615, 9036, 19883, 15438, 28369, 8560, 8415, 3831
Offset: 2

Views

Author

Zak Seidov, Mar 17 2017

Keywords

Comments

The sequence is non-monotone.

Examples

			a(2) = 24 = A000040(5) + A000040(6) = 11 + 13 = A001358(4) + A001358(5) = 10 + 14,
a(3) = 749 = A000040(53) + A000040(54) + A000040(55) = 241 + 251 + 257 = A001358(79) + A001358(80) + A001358(81) = 247 + 249 + 253.
		

Crossrefs

Cf. A000040 Primes, A001358 Semiprimes, A118717 Sum of two consecutive semiprimes.
Sum of k consecutive primes: A001043 k=2, A034961 k=3, A034963 k=4, A034964 k=5, A127333 k=6, A127334 k=7, A127335 k=8, A127336 k=9, A127337 k=10, A127338 k=11, A127339 k=12.

Programs

  • Maple
    issp:= n-> is(not isprime(n) and numtheory[bigomega](n)=2):
    ithsp:= proc(n) option remember; local k; for k from 1+
            `if`(n=1, 1, ithsp(n-1)) while not issp(k) do od; k
            end:
    ps:= proc(i, j) option remember;
           ithprime(j)+`if`(i=j, 0, ps(i, j-1))
         end:
    ss:= proc(i, j) option remember;
           ithsp(j)+`if`(i=j, 0, ss(i, j-1))
         end:
    a:= proc(n) option remember; local i, j, k, l, p, s;
          i, j, k, l, p, s:= 1, n, 1, n, ps(1, n), ss(1, n);
          do if p=s then return p
           elif pAlois P. Heinz, Mar 24 2017
  • Mathematica
    sp=Select[Range[4,100000],2==PrimeOmega[#]&];pr=Prime[Range[PrimePi[Max[sp]]]];
    Table[Intersection[(Total/@Partition[pr,k,1]),Total/@Partition[sp,k,1]][[1]],{k,2,100}]

Extensions

More terms from Alois P. Heinz, Mar 24 2017

A097505 Triangle read by rows: T(n,k) = Sum_{j=1..k} Prime(n+j-1).

Original entry on oeis.org

2, 3, 8, 5, 12, 23, 7, 18, 31, 48, 11, 24, 41, 60, 83, 13, 30, 49, 72, 101, 132, 17, 36, 59, 88, 119, 156, 197, 19, 42, 71, 102, 139, 180, 223, 270, 23, 52, 83, 120, 161, 204, 251, 304, 363, 29, 60, 97, 138, 181, 228, 281, 340, 401, 468, 31, 68, 109, 152, 199, 252, 311, 372, 439, 510, 583
Offset: 1

Author

Reinhard Zumkeller, Aug 26 2004

Keywords

Programs

  • Magma
    [&+[NthPrime(n+j-1): j in [1..k]] : k in [1..n], n in [1..12]]; // G. C. Greubel, Jan 19 2020
    
  • Maple
    seq(seq( sum(ithprime(n+j-1), j=1..k), k=1..n), n=1..12); # G. C. Greubel, Jan 19 2020
  • Mathematica
    Table[Sum[Prime[n+j-1], {j,k}], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Jan 19 2020 *)
  • PARI
    T(n,k) = sum(j=1,k, prime(n+j-1)); \\ G. C. Greubel, Jan 19 2020
    
  • Sage
    [[sum(nth_prime(n+j-1) for j in (1..k)) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Jan 19 2020

Formula

T(n,k) = A007504(n+k) - A007504(n-1).
T(n,0) = A000040(n).
T(n,1) = A001043(n) for n>1.
T(n,2) = A034961(n) for n>1.

A100500 a(n) = prime(3n-2) + prime(3n-1) + prime(3n).

Original entry on oeis.org

10, 31, 59, 97, 131, 173, 211, 251, 301, 329, 395, 439, 487, 533, 581, 633, 689, 731, 789, 829, 883, 941, 1015, 1061, 1119, 1169, 1229, 1285, 1331, 1381, 1433, 1493, 1553, 1645, 1703, 1757, 1807, 1849, 1915, 1959, 2011, 2075, 2155, 2215, 2269, 2329, 2417, 2471
Offset: 1

Author

Jun Mizuki (suzuki32(AT)sanken.osaka-u.ac.jp), Nov 23 2004

Keywords

Examples

			a(1) = 10 = 2 + 3 + 5 = prime(1) + prime(2) + prime(3).
a(2) = 31 = 7 + 11 + 13 = prime(4) + prime(5) + prime(6).
a(3) = 59 = 17 + 19 + 23 = prime(7) + prime(8) + prime(9).
		

Crossrefs

Programs

  • Magma
    [&+[NthPrime(n+k): k in [0..2]]: n in [1..1000 by 3]]; // Vincenzo Librandi, Apr 23 2011
    
  • Mathematica
    Total/@Partition[Prime[Range[150]],3] (* Harvey P. Dale, May 25 2011 *)
  • Python
    from sympy import prime, nextprime
    def a(n):
        p = prime(3*n - 2); q = nextprime(p); r = nextprime(q)
        return p + q + r
    print([a(n) for n in range(1, 49)]) # Michael S. Branicky, Oct 31 2021
    
  • SageMath
    def A100500(n): return sum(nth_prime(3*n-j) for j in range(3))
    [A100500(n) for n in range(1,61)] # G. C. Greubel, Apr 03 2023

Formula

a(n) = A034961(3n-2). - R. J. Mathar, Apr 20 2009, Jun 17 2009
Previous Showing 21-30 of 53 results. Next