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 11-17 of 17 results.

A070281 Smallest prime which is the sum of n consecutive primes, or 0 if no such prime exists.

Original entry on oeis.org

2, 5, 23, 17, 53, 41, 197, 0, 127, 0, 233, 197, 691, 281, 379, 0, 499, 0, 857, 0, 953, 0, 1151, 0, 1259, 0, 1583, 0, 2099, 0, 2399, 0, 2417, 0, 2579, 0, 2909, 0, 3803, 0, 3821, 0, 4217, 0, 4651, 0, 5107, 0, 5813, 0, 6829, 0, 6079, 0, 6599, 0, 14153, 0, 10091, 7699
Offset: 1

Views

Author

Amarnath Murthy, May 07 2002

Keywords

Comments

Sequence A013918 lists the nonzero numbers occurring at even n.

Examples

			a(60) = 7699 because Sum_{k=1..60} prime(k) = 7699 and 7699 is the smallest possible prime formed by summing 60 consecutive primes. - _Sean A. Irvine_, Jun 07 2024
		

Crossrefs

Cf. A070934.

Programs

  • Mathematica
    f[n_] := Block[{k = 1, s},If[Mod[n, 2] == 0,s = Sum[Prime[i], {i, k, k + n - 1}];If[PrimeQ[s], s, 0],While[s = Sum[Prime[i], {i, k, k + n - 1}] ; ! PrimeQ[s], k++ ];s]];Table[f[n], {n, 65}] (* Ray Chandler, Sep 27 2006 *)

Extensions

Corrected and extended by Jim Nastos, Jun 15 2002
Extended by Ray Chandler, Sep 27 2006
a(60) corrected by Giovanni Resta, May 31 2017
Original a(60) restored by Sean A. Irvine, Jun 07 2024

A356477 a(n) is the start of the first sequence of 2*n+1 consecutive primes p_1, p_2, ..., p_(2*n+1) such that p_1*p_2 + p_2*p_3 + ... + p_(2*n)*p_(2*n+1) + p_(2*n+1)*p_1 is prime.

Original entry on oeis.org

2, 19, 19, 2, 23, 2, 7, 7, 2, 5, 113, 5, 29, 13, 67, 53, 11, 11, 5, 23, 7, 43, 5, 2, 31, 73, 13, 3, 89, 5, 11, 3, 89, 31, 43, 2, 37, 2, 23, 7, 11, 19, 43, 23, 5, 2, 23, 3, 29, 5, 17, 3, 31, 29, 53, 29, 7, 13, 73, 3, 5, 43, 29, 17, 5, 37, 19, 11, 71, 7, 2, 43, 13, 19, 2, 59, 7, 29, 113, 13, 5, 11
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 08 2022

Keywords

Examples

			a(2) = 19 because 19 is the start of the 2*2+1 = 5 consecutive primes 19, 23, 29, 31, 37 with 19*23 + 23*29 + 29*31 + 31*37 + 37*19 = 3853 prime, and no earlier 5-tuple of consecutive primes works.
		

Crossrefs

Programs

  • Maple
    f:= proc(m) local P,x,i,n;
      n:= 2*m+1;
      P:= Vector(n,ithprime);
    do
       x:= add(P[i]*P[i+1],i=1..n-1)+P[n]*P[1];
       if isprime(x) then return P[1] fi;
       P[1..n-1]:= P[2..n];
       P[n]:= nextprime(P[n]);
    od
    end proc:
    map(f, [$1..100]);
  • Python
    from sympy import isprime, nextprime, prime, primerange
    def a(n):
        p = list(primerange(1, prime(2*n+1)+1))
        while True:
            if isprime(sum(p[i]*p[i+1] for i in range(len(p)-1))+p[-1]*p[0]):
                return p[0]
            p = p[1:] + [nextprime(p[-1])]
    print([a(n) for n in range(1, 83)]) # Michael S. Branicky, Aug 08 2022

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

A216004 Primes that are the sum of 2001 consecutive primes.

Original entry on oeis.org

16344247, 16588633, 16711217, 17416457, 17700139, 17806721, 17860039, 17895613, 18091313, 18144727, 18483739, 18573209, 18698791, 19040773, 19384609, 19529849, 19620719, 19748129, 19784543, 19802759, 20421971, 20476777, 20531593, 20806141, 21283169, 21356563
Offset: 1

Views

Author

Syed Iddi Hasan, Aug 30 2012

Keywords

Comments

Corresponding initial terms of 2001-tuples: 7, 61, 97, 313, 419, 449, 463, 479, 563, 577, 691, 733, 773, 911, 1039, 1093, 1123, 1187, 1201, 1213, 1459, 1483, 1493, 1607. The indices of these primes: 4, 18, 25, 65, 81, 87, 90, 92, 103, 106, 125, 130, 137, 156, 175, 183, 188, 195, 197, 198, 232, 235, 238, 253. - Zak Seidov, Feb 27 2013

Examples

			a(1) = sum(prime(k), k = 4..2004),  a(2) = sum(prime(k), k = 18..2018),... - _Zak Seidov_, Feb 27 2013
		

Crossrefs

Programs

  • Mathematica
    m = 2001; a = 2; b = Prime[m]; s = Sum[Prime[k], {k, m}]; Reap[Do[If[PrimeQ[s], Sow[s]]; b = NextPrime[b]; s = s - a + b; a = NextPrime[a], {m}]][[2, 1]] (* Zak Seidov, Feb 27 2013 *)
    Select[Total/@Partition[Prime[Range[2500]],2001,1],PrimeQ] (* Harvey P. Dale, Mar 13 2018 *)

A122654 Smallest prime p such that p^2 equal to the sum of 2n+1 consecutive odd primes, or 1 if such a prime does not exist.

Original entry on oeis.org

7, 31, 13, 29, 107, 293, 821, 379, 293, 83, 31, 241, 37, 653, 43, 211, 73, 1123, 311, 1567, 1607, 929, 233, 4801, 601, 5087, 307, 163, 709, 1021, 983, 191, 1327, 241, 5443, 157, 277, 151, 743, 4651, 32371, 1493, 1373, 8521, 683, 7919, 947, 1279, 10847, 1613
Offset: 1

Views

Author

Alexander Adamchuk, Sep 21 2006

Keywords

Examples

			a(1) = 7 because A122560[1] = 7 and 7^2 = 49 = 13 + 17 + 19 = p(6) + p(7) + p(8).
		

Crossrefs

Extensions

More terms from Don Reble, Sep 22 2006

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

A125270 Coefficient of x^2 in polynomial whose zeros are 5 consecutive primes starting with the n-th prime.

Original entry on oeis.org

1358, 3954, 10478, 22210, 43490, 78014, 129530, 206650, 324350, 466270, 621466, 853742, 1132130, 1436690, 1870850, 2388050, 2886370, 3440410, 4133410, 4904906, 5926654, 7195670, 8425430, 9792950, 11040910, 12098990, 13917898, 16097810
Offset: 1

Views

Author

Artur Jasinski, Jan 16 2007

Keywords

Comments

Sums of all distinct products of 3 out of 5 consecutive primes, starting with the n-th prime; value of 3rd elementary symmetric function on the 5 consecutive primes.

Crossrefs

Programs

  • Mathematica
    a = {}; Do[AppendTo[a, (Prime[x] Prime[x + 1] Prime[x + 2] + Prime[x] Prime[x + 1] Prime[x + 3] + Prime[x] Prime[x + 1] Prime[x + 4] + Prime[x] Prime[x + 2] Prime[x + 3] + Prime[x] Prime[x + 2] Prime[x + 4] + Prime[x] Prime[x + 3] Prime[x + 4] + Prime[x + 1] Prime[x + 2] Prime[x + 3] + Prime[x + 1] Prime[x + 2] Prime[x + 4] + Prime[x + 1] Prime[x + 3] Prime[x + 4] + Prime[x + 2] Prime[x + 3] Prime[x + 4])], {x, 1, 100}]; a
    fcp[{p_,q_,r_,s_,t_}]:=p*q(r+s+t)+(p+q)r(s+t)+(p+q+r)s*t; fcp/@Partition[ Prime[ Range[40]],5,1] (* Harvey P. Dale, Sep 05 2014 *)

Formula

Let p = Prime(n), q = Prime(n+1), r = Prime(n+2), s = Prime(n+3) and t = Prime(n+4). Then a(n) = p q (r+s+t) + (p + q) r (s + t) + (p + q + r) s t.

Extensions

Edited and corrected by Franklin T. Adams-Watters, Jan 23 2007
Previous Showing 11-17 of 17 results.