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-10 of 15 results. Next

A127346 Primes in A127345.

Original entry on oeis.org

31, 71, 167, 311, 1151, 3119, 4871, 5711, 6791, 14831, 24071, 33911, 60167, 79031, 101159, 106367, 115631, 158231, 235751, 259751, 366791, 402551, 455471, 565919, 635711, 644951, 1124831, 1347971, 1510799, 1547927, 1743419, 1851671, 2048471
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

Primes of the form prime(k)*prime(k+1) + prime(k)*prime(k+2) + prime(k+1)*prime(k+2).
A prime number n is in the sequence if for some k it is the coefficient of x^1 of the polynomial Product_{j=0..2} (x-prime(k+j)); the roots of this polynomial are prime(k), ..., prime(k+2).

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[If[PrimeQ[Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x + 1] Prime[x + 2]], AppendTo[a, Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x + 1] Prime[x + 2]], AppendTo[b, Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x + 1] Prime[x + 2]]], {x, 1, 100}]; Print[a] (* Artur Jasinski, Jan 11 2007 *)
    s[li_] := li[[1]]*(li[[2]]+li[[3]])+li[[2]]*li[[3]]; Select[(s[#]&/@Partition[Prime[Range[100]], 3, 1]), PrimeQ] (* Zak Seidov, Jan 13 2012 *)
  • PARI
    {m=143;k=2;for(n=1,m,a=sum(i=n,n+k-1,sum(j=i+1,n+k,prime(i)*prime(j)));if(isprime(a),print1(a,",")))} \\ Klaus Brockhaus, Jan 21 2007
    
  • PARI
    {m=143;k=2;for(n=1,m,a=polcoeff(prod(j=0,k,(x-prime(n+j))),1);if(isprime(a),print1(a,",")))} \\ Klaus Brockhaus, Jan 21 2007
    
  • PARI
    p=2; q=3; forprime(r=5, 1e3, if(isprime(t=p*q+p*r+q*r), print1(t", ")); p=q; q=r) \\ Charles R Greathouse IV, Jan 13 2012

Formula

a(n) = A127345(A204231(n)). - Zak Seidov, Jan 13 2012

Extensions

Edited and extended by Klaus Brockhaus, Jan 21 2007

A127347 Composites in A127345.

Original entry on oeis.org

551, 791, 1655, 2279, 3935, 8391, 9959, 11639, 13175, 16559, 18383, 20975, 27419, 30191, 32231, 36071, 40511, 45791, 51983, 55199, 64199, 69599, 73911, 84311, 89751, 94679, 112511, 122759, 133419, 145571, 153671, 163775, 169439, 178079
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

Composites of the form prime(k)*prime(k+1)+prime(k)*prime(k+2)+prime(k+1)*prime(k+2).
A composite number n is in the sequence if for some k it is the coefficient of x^1 of the polynomial Prod_{j=0..2}(x-prime(k+j)); the roots of this polynomial are prime(k), ..., prime(k+2).

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[If[PrimeQ[Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x + 1] Prime[x + 2]], AppendTo[a, Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x + 1] Prime[x + 2]], AppendTo[b, Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x + 1] Prime[x + 2]]], {x, 1, 100}]; Print[a]; Print[b]
    Select[Total[Times@@@Subsets[#,{2}]]&/@Partition[Prime[ Range[80]], 3,1],!PrimeQ[#]&] (* Harvey P. Dale, May 27 2012 *)
  • PARI
    {m=52;k=2;for(n=1,m,a=sum(i=n,n+k-1,sum(j=i+1,n+k,prime(i)*prime(j)));if(!isprime(a),print1(a,",")))}  \\ Klaus Brockhaus, Jan 21 2007
    
  • PARI
    {m=52;k=2;for(n=1,m,a=polcoeff(prod(j=0,k,(x-prime(n+j))),1);if(!isprime(a),print1(a,",")))} \\ Klaus Brockhaus, Jan 21 2007

Extensions

Edited and extended by Klaus Brockhaus, Jan 21 2007

A204231 Position of primes in A127345.

Original entry on oeis.org

1, 2, 3, 4, 7, 10, 12, 13, 14, 19, 23, 27, 33, 37, 41, 42, 44, 49, 59, 61, 69, 72, 76, 83, 88, 89, 111, 121, 126, 127, 134, 137, 143, 144, 146, 149, 159, 163, 170, 177, 178, 186, 189, 195, 197, 198, 204, 208, 214, 217, 220, 224, 228, 233, 234, 236, 243, 247, 248, 249, 276, 278, 288, 294, 295, 335, 338, 353, 354, 380, 382, 384, 395, 401, 402, 408, 411, 427
Offset: 1

Views

Author

Zak Seidov, Jan 13 2012

Keywords

Crossrefs

Programs

  • PARI
    p=2; q=3; n=0; forprime(r=5, 1e3, n++; if(isprime(p*q+p*r+q*r), print1(n", ")); p=q; q=r) \\ Charles R Greathouse IV, Jan 13 2012

Formula

A127346(n) = A127345(a(n)).

A287609 Intersection of A034961 and A127345.

Original entry on oeis.org

31, 71, 311, 551, 1151, 14831, 45791, 455471, 2035271, 6345239, 7241615, 8290031, 8329991, 9086231, 9324351, 10449575, 11497199, 15454151, 16515815, 18337271, 20650811, 22946591, 27609311, 33220079, 40487471, 44106191, 45015791, 49021199, 53315519, 54536519
Offset: 1

Views

Author

Zak Seidov, May 27 2017

Keywords

Comments

Surprisingly many terms are prime numbers: 31,71,311,1151,14831,455471.
Positions of a(n) in A127345: {1,2,4,5,7,19,30,76,142}.
Positions of a(n) in A034961: {4,8,26,41,75,660,1780,14009,54929}.
Positions of primes in a(n): {1,2,3,5,6,8,21,22,25,32,37,39,40,45,49,50, 59,62,66,69,...}. - Michael De Vlieger, May 28 2017

Examples

			31 is in the sequence because it is both the total of three consecutive primes (7 + 11 + 13) and it is (2*3 + 2*5 + 3*5) = (6 + 10 + 15). - _Michael De Vlieger_, May 28 2017
		

Crossrefs

Programs

  • Mathematica
    Intersection[Map[Total, #], Map[#1 #2 + #1 #3 + #2 #3 & @@ # &, #]] &@ Partition[Prime@ Range[10^6], 3, 1] (* Michael De Vlieger, May 28 2017 *)
  • Python
    from _future_ import division
    from sympy import isprime, prevprime, nextprime
    A287609_list, p, q, r = [], 2, 3, 5
    while r < 10**6:
        n = p*(q+r) + q*r
        m = n//3
        pm, nm = prevprime(m), nextprime(m)
        k = n - pm - nm
        if isprime(m):
            if m == k:
                A287609_list.append(n)
        else:
            if nextprime(nm) == k or prevprime(pm) == k:
                A287609_list.append(n)
        p, q, r = q, r, nextprime(r) # Chai Wah Wu, May 31 2017

Extensions

More terms from Michael De Vlieger, May 28 2017

A127351 Prime numbers n such that A127350(k) = 2*n for some k.

Original entry on oeis.org

2003, 7883, 31151, 35363, 394739, 434939, 541007, 564983, 837929, 865979, 2453999, 2680493, 3479303, 3536219, 4145717, 4367267, 4706311, 5414159, 6541103, 6856019, 8804231, 9109223, 10227323, 10296059, 10701683, 10795507
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

Primes of the form (Sum_{i=k..k+3}Sum_{j=i+1..k+4}prime(i)*prime(j))/2.
Primes of the form a/2 where a is the coefficient of x^3 of the polynomial Prod_{j=0,4}(x-prime(k+j)) for some k.

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[(Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x] Prime[x + 3] + Prime[x] Prime[x + 4] + Prime[x + 1] Prime[x + 2] + Prime[x + 1] Prime[x + 3] + Prime[x + 1] Prime[x + 4] + Prime[x + 2] Prime[x + 3] + Prime[x + 2] Prime[x + 4] + Prime[x + 3] Prime[x + 4])/2], AppendTo[a, (Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x] Prime[x + 3] + Prime[x] Prime[x + 4] + Prime[x + 1] Prime[x + 2] + Prime[x + 1] Prime[x + 3] + Prime[x + 1] Prime[x + 4] + Prime[x + 2] Prime[x + 3] + Prime[x + 2] Prime[x + 4] + Prime[x + 3] Prime[x + 4])/2]], {x, 1, 1000}]; a
  • PARI
    {m=235;k=4;for(n=1,m,a=sum(i=n,n+k-1,sum(j=i+1,n+k,prime(i)*prime(j)));if(isprime(b=a/2),print1(b,",")))} \\ Klaus Brockhaus, Jan 21 2007
    
  • PARI
    {m=235;k=4;for(n=1,m,a=polcoeff(prod(j=0,k,(x-prime(n+j))),3);if(isprime(b=a/2),print1(b,",")))} \\ Klaus Brockhaus, Jan 21 2007

Extensions

Edited by Klaus Brockhaus, Jan 21 2007

A127349 a(n) = Sum_{i=n..n+1} Sum_{j=i+1..n+2} Sum_{k=j+1..n+3} prime(i)*prime(j)*prime(k).

Original entry on oeis.org

247, 886, 2556, 6288, 12900, 22392, 40808, 63978, 105000, 161142, 216232, 294168, 385544, 507782, 658820, 858000, 1067502, 1251952, 1518910, 1783854, 2114748, 2618148, 3147710, 3696090, 4239528, 4626300, 5033232, 5898936, 6871200
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

a(n) = absolute value of the coefficient of x^1 of the polynomial Product_{j=0..3} (x - prime(n+j)) of degree 4; the roots of this polynomial are prime(n), ..., prime(n+3); cf. Vieta's formulas.
All terms with exception of the first one are even.
Arithmetic derivative (see A003415) of prime(n)*prime(n+1)*prime(n+2)*prime(n+3). - Giorgio Balzarotti, May 26 2011

Crossrefs

Programs

  • Magma
    [NthPrime(n)*NthPrime(n+1)*NthPrime(n+2) + NthPrime(n)*NthPrime(n+2)*NthPrime(n+3) + NthPrime(n)*NthPrime(n+1)* NthPrime(n+3) + NthPrime(n+1)*NthPrime(n+2)*NthPrime(n+3): n in [1..30]]; // Vincenzo Librandi, Feb 12 2018
  • Maple
    P := select(isprime, [2, seq(i, i = 1 .. 1000, 2)]):
    f := L) -> convert(L, `*`)*add(1/t, t = L):
    seq(f(P[i..i+3]),i=1..nops(P)-3); # Robert Israel, Feb 11 2018
  • Mathematica
    Table[Prime[n] Prime[n+1] Prime[n+2] + Prime[n] Prime[n+2] Prime[n+3] + Prime[n] Prime[n+1] Prime[n+3] + Prime[n+1] Prime[n+2] Prime[n+3], {n, 100}]
  • PARI
    {m=29;h=3;for(n=1,m,print1(sum(i=n,n+h-2,sum(j=i+1,n+h-1,sum(k=j+1,n+h,prime(i)*prime(j)*prime(k)))),","))} \\ Klaus Brockhaus, Jan 21 2007
    
  • PARI
    {m=29;k=3;for(n=1,m,print1(abs(polcoeff(prod(j=0,k,(x-prime(n+j))),1)),","))} \\ Klaus Brockhaus, Jan 21 2007
    

Formula

a(n) = A046302(n)*Sum_{i=n..n+3} 1/prime(i). - Robert Israel, Feb 11 2018

Extensions

Edited by Klaus Brockhaus, Jan 21 2007

A127348 Coefficient of x^2 in the polynomial (x-p(n))*(x-p(n+1))*(x-p(n+2))*(x-p(n+3)), where p(k) is the k-th prime.

Original entry on oeis.org

101, 236, 466, 838, 1330, 1918, 2862, 3856, 5350, 7096, 8622, 10558, 12654, 15228, 18090, 21550, 24916, 27702, 31500, 35068, 39298, 45322, 51240, 56980, 62398, 66130, 69958, 77854, 86230, 96618, 106888, 115842, 124342, 133122, 144090, 152568, 163282, 174348
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Examples

			a(1)=101 because (x-2)*(x-3)*(x-5)*(x-7) = x^4 - 17x^3 + 101x^2 - 247x + 210.
		

Crossrefs

Programs

  • Maple
    a:=n->coeff(expand((x-ithprime(n))*(x-ithprime(n+1))*(x-ithprime(n+2))*(x-ithprime(n+3))),x,2): seq(a(n),n=1..45); # Emeric Deutsch, Jan 20 2007
  • Mathematica
    Table[Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x] Prime[x + 3] + Prime[x + 1] Prime[x + 2] + Prime[x + 1] Prime[x + 3] + Prime[x + 2] Prime[x + 3], {x, 1, 100}]
    Total[Times@@@Subsets[#,{2}]]&/@Partition[Prime[Range[40]],4,1] (* Harvey P. Dale, Apr 15 2019 *)
  • PARI
    {m=35;k=3;for(n=1,m,print1(sum(i=n,n+k-1,sum(j=i+1,n+k,prime(i)*prime(j))),","))} \\ Klaus Brockhaus, Jan 21 2007
    
  • PARI
    {m=35;k=3;for(n=1,m,print1(abs(polcoeff(prod(j=0,k,(x-prime(n+j))),2)),","))} \\ Klaus Brockhaus, Jan 21 2007

Formula

a(n) = p(n)*p(n+1) + p(n)*p(n+2) + p(n)*p(n+3) + p(n+1)*p(n+2) + p(n+1)*p(n+3) + p(n+2)*p(n+3), where p(k) is the k-th prime (by Viete's formula relating the zeros and the coefficients of a polynomial). - Emeric Deutsch, Jan 20 2007

Extensions

Edited by Emeric Deutsch and Klaus Brockhaus, Jan 20 2007

A127350 a(n) = Sum_{i=n..n+3} Sum_{j=i+1..n+4} prime(i)*prime(j).

Original entry on oeis.org

288, 574, 1078, 1750, 2710, 4006, 5590, 7630, 10270, 13030, 15766, 19462, 23510, 27550, 32830, 38590, 43750, 49190, 55570, 62302, 70726, 80470, 89350, 98710, 106870, 113590, 124822, 137590, 151990, 167230, 186454, 199798, 214774, 230270, 247630, 262942, 281422
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

a(n) = absolute value of the coefficient of x^3 of the polynomial Prod_{j=0,4}(x-prime(n+j)) of degree 5; the roots of this polynomial are prime(n), ..., prime(n+4); cf. Vieta's formulas.
All terms are even.

Crossrefs

Programs

  • Mathematica
    Table[Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x] Prime[x + 3] + Prime[x] Prime[x + 4] + Prime[x + 1] Prime[x + 2] + Prime[x + 1] Prime[x + 3] + Prime[x + 1] Prime[x + 4] + Prime[x + 2] Prime[x + 3] + Prime[x + 2] Prime[x + 4] + Prime[x + 3] Prime[x + 4], {x, 1, 100}]
  • PARI
    {m=34;k=4;for(n=1,m,print1(sum(i=n,n+k-1,sum(j=i+1,n+k,prime(i)*prime(j))),","))} \\ Klaus Brockhaus, Jan 21 2007
    
  • PARI
    {m=34;k=4;for(n=1,m,print1(abs(polcoeff(prod(j=0,k,(x-prime(n+j))),3)),","))} \\ Klaus Brockhaus, Jan 21 2007

Extensions

Edited by Klaus Brockhaus, Jan 21 2007

A127491 Primes which are half of the absolute coefficients [x^2] of the 5th-order polynomials with prime roots as defined in A127489.

Original entry on oeis.org

310733, 426871, 15722159, 166492163, 177861107, 270396557, 342955763, 406947461, 1606837039, 1908243773, 2902193117, 3386269021, 5441167877, 6953015807, 7671152921, 10005413687, 10979785673, 14774655421, 16546239937
Offset: 1

Views

Author

Artur Jasinski, Jan 16 2007

Keywords

Comments

The polynomials are of the form (x-prime(i))*(x-prime(i+1))*..*(x-prime(i+4)). The quadratic terms have coefficients which are of the form -sum_{j

Examples

			The first contribution is from the 11th polynomial, (x-prime(11)) *(x-prime(12)) *(x-prime(13)) *(x-prime(14)) *(x-prime(15)) = x^5 -199x^4 +15766x^3 -621466x^2 +12185065x -95041567,
where the coefficient of [x^2] is -621466. Its sign-reversed half is 310733, a prime.
		

Programs

  • Maple
    isA127491 := proc(k)
        local x,j,p ;
        mul( x-ithprime(k+j),j=0..4) ;
        expand(%) ;
        abs(coeff(%,x,2)/2) ;
        isprime(%)
    end proc:
    A127491k := proc(n)
        option remember ;
        if n = 0 then
            0;
        else
            for k from procname(n-1)+1 do
                if isA127491(k) then
                    return k ;
                end if;
            end do:
        end if;
    end proc:
    A127491 := proc(n)
        option remember ;
        local k ;
        k := A127491k(n) ;
        mul( x-ithprime(k+j),j=0..4) ;
        expand(%) ;
        abs(coeff(%,x,2)/2) ;
    end proc:
    seq(A127491(n),n=1..60) ; # R. J. Mathar, Apr 23 2023

Extensions

Entries replaced to comply with the definition. - R. J. Mathar, Sep 26 2011

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

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

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
Showing 1-10 of 15 results. Next