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 31-40 of 174 results. Next

A127333 Numbers that are the sum of 6 consecutive primes.

Original entry on oeis.org

41, 56, 72, 90, 112, 132, 156, 180, 204, 228, 252, 280, 304, 330, 358, 384, 410, 434, 462, 492, 522, 552, 580, 606, 630, 660, 690, 724, 756, 796, 834, 864, 896, 926, 960, 990, 1020, 1054, 1084, 1114, 1140, 1172, 1214, 1250, 1286, 1322, 1362, 1392, 1420
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

a(n) is the absolute value of coefficient of x^5 of the polynomial Prod_{j=0,5}(x-prime(n+j)) of degree 6; the zeros of this polynomial are prime(n), ..., prime(n+5).

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..5] ]: n in [1..80] ]; /* Vincenzo Librandi, Apr 03 2011 */
  • Mathematica
    a = {}; Do[AppendTo[a, Sum[Prime[x + n], {n, 0, 5}]], {x, 1, 50}]; a
    Total/@Partition[Prime[Range[60]],6,1] (* Harvey P. Dale, Mar 12 2015 *)
  • PARI
    {m=50;k=6;for(n=0,m-1,print1(a=sum(j=1,k,prime(n+j)),","))} \\ Klaus Brockhaus, Jan 12 2007
    
  • PARI
    {m=50;k=6;for(n=1,m,print1(abs(polcoeff(prod(j=0,k-1,(x-prime(n+j))),k-1)),","))} \\ Klaus Brockhaus, Jan 12 2007
    

Extensions

Edited by Klaus Brockhaus, Jan 12 2007

A127335 Numbers that are the sum of 8 successive primes.

Original entry on oeis.org

77, 98, 124, 150, 180, 210, 240, 270, 304, 340, 372, 408, 442, 474, 510, 546, 582, 620, 660, 696, 732, 768, 802, 846, 888, 928, 966, 1012, 1056, 1104, 1154, 1194, 1236, 1278, 1320, 1362, 1404, 1444, 1480, 1524, 1574, 1622, 1670, 1712, 1758, 1802, 1854, 1900
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

a(n) is the absolute value of coefficient of x^7 of the polynomial Prod_{j=0,7}(x-prime(n+j)) of degree 8; the roots of this polynomial are prime(n), ..., prime(n+7).

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..7] ]: n in [1..90] ]; // Vincenzo Librandi, Apr 03 2011
  • Maple
    S:= [0,op(ListTools:-PartialSums(select(isprime, [2,seq(i,i=3..1000,2)])))]:
    S[9..-1]-S[1..-9]; # Robert Israel, Nov 27 2017
  • Mathematica
    a = {}; Do[AppendTo[a, Sum[Prime[x + n], {n, 0, 7}]], {x, 1, 50}]; a
    Total/@Partition[Prime[Range[60]],8,1] (* Harvey P. Dale, Sep 10 2019 *)
  • PARI
    {m=48;k=8;for(n=1,m,print1(a=sum(j=0,k-1,prime(n+j)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • PARI
    {m=48;k=8;for(n=1,m,print1(abs(polcoeff(prod(j=0,k-1,(x-prime(n+j))),k-1)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • PARI
    a(n)=my(p=prime(n));p+sum(i=2,8,p=nextprime(p+1)) \\ Charles R Greathouse IV, Apr 19 2015
    

Formula

a(n) ~ 8n log n. - Charles R Greathouse IV, Apr 19 2015

Extensions

Edited by Klaus Brockhaus, Jan 13 2007

A118134 Primes p such that 4p is the sum of two consecutive primes.

Original entry on oeis.org

2, 3, 13, 17, 43, 67, 127, 137, 167, 193, 223, 283, 487, 563, 613, 617, 643, 647, 773, 1033, 1187, 1193, 1277, 1427, 1453, 1483, 1543, 1663, 1847, 1949, 2027, 2143, 2297, 2371, 2423, 2437, 2477, 2503, 2609, 2683, 2843, 2857, 2927, 3119, 3137, 3163, 3253, 3433
Offset: 1

Views

Author

Anton Vrba (antonvrba(AT)yahoo.com), May 13 2006

Keywords

Comments

From Zak Seidov, Jun 18 2016: (Start)
Minimal difference between odd terms is 4.
a(n+1) - a(n) = 4 for n = {3, 15, 17, 147, 209, 277, 414, 422, 495, 825, 1053, 1380, 1504, 2078, 2264, 2375, 2605, 4224, 4495, 5180, 5825, 6497, 7107, 7372, 8951} and a(n) = {13, 613, 643, 16183, 24763, 37993, 63853, 65323, 81703, 154153, 210853, 295873, 327823, 479023, 537583, 568903, 632323, 1111723, 1195543, 1415833, 1626433, 1853443, 2060503, 2146813, 2702893} == 13 mod 30. (End)

Examples

			13 is there because it is prime and 4*13 = 23+29.
		

Crossrefs

Cf. A001043 (sums of two consecutive primes).

Programs

  • Mathematica
    pr = Prime[Range[1000]]; Select[(Total /@ Partition[pr, 2, 1])/4, PrimeQ] (* Zak Seidov, Jun 29 2017 *)
  • PARI
    is(n)=isprime(n) && precprime(2*n)+nextprime(2*n)==4*n \\ Charles R Greathouse IV, Apr 24 2015

Extensions

Edited by Don Reble, Jul 23 2006

A126148 Primes p such that pq+p+q is prime, where q is the next prime after p.

Original entry on oeis.org

2, 3, 5, 11, 13, 17, 19, 23, 41, 43, 47, 59, 79, 83, 89, 101, 109, 113, 137, 163, 167, 173, 223, 229, 257, 311, 383, 389, 409, 419, 439, 443, 479, 521, 547, 557, 577, 593, 613, 643, 647, 683, 773, 797, 809, 811, 853, 953, 983, 1019, 1049, 1097, 1109, 1151, 1171
Offset: 1

Views

Author

J. M. Bergot, Mar 07 2007

Keywords

Examples

			Take p = 13 and q = 17: product is 221 and sum is 30; add them to get 251, a prime. So 13 is a member.
		

Crossrefs

Programs

  • Maple
    a:=proc(n) if isprime(ithprime(n)*ithprime(n+1) +ithprime(n) +ithprime(n+1)) then ithprime(n) fi end: seq(a(n), n=1..250); # Emeric Deutsch, Mar 08 2007
  • Mathematica
    Prime@Select[Range[200], PrimeQ[Prime[ # ]Prime[ # + 1] + Prime[ # ] + Prime[ # + 1]] &] (* Ray Chandler, Mar 07 2007 *)
  • PARI
    v=List();p=2;forprime(q=3,1e4, if(isprime(p*q+p+q), listput(v,p)); p=q); Vec(v) \\ Charles R Greathouse IV, Jul 26 2012

Extensions

Extended by Ray Chandler, Emeric Deutsch and Robert G. Wilson v, Mar 07 2007

A127336 Numbers that are the sum of 9 consecutive primes.

Original entry on oeis.org

100, 127, 155, 187, 221, 253, 287, 323, 363, 401, 439, 479, 515, 553, 593, 635, 679, 721, 763, 803, 841, 881, 929, 977, 1025, 1067, 1115, 1163, 1213, 1267, 1321, 1367, 1415, 1459, 1511, 1555, 1601, 1643, 1691, 1747, 1801, 1851, 1903, 1951, 1999, 2053
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

a(n) = absolute value of coefficient of x^8 of the polynomial Product_{j=0..8}(x - prime(n+j)) of degree 9; the roots of this polynomial are prime(n), ..., prime(n+8).

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..8] ]: n in [1..100] ]; // Vincenzo Librandi, Apr 03 2011
    
  • Mathematica
    A127336 = {}; Do[AppendTo[A127336, Sum[Prime[x + n], {n, 0, 8}]], {x, 1, 50}]; A127336 (* Artur Jasinski, Jan 11 2007 *)
    Table[Plus@@Prime[Range[n, n + 8]], {n, 50}] (* Alonso del Arte, Aug 27 2013 *)
    Total/@Partition[Prime[Range[60]],9,1] (* Harvey P. Dale, Nov 18 2020 *)
  • PARI
    {m=46;k=9;for(n=1,m,print1(a=sum(j=0,k-1,prime(n+j)),","))} \\ Klaus Brockhaus, Jan 13 2007
    {m=46;k=9;for(n=1,m,print1(abs(polcoeff(prod(j=0,k-1,(x-prime(n+j))),k-1)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • Python
    from sympy import prime
    def a(x): return sum([prime(x + n) for n in range(9)])
    print([a(i) for i in range(1, 50)]) # Indranil Ghosh, Mar 18 2017

Formula

a(n) = A127335(n)+A000040(n+8). - R. J. Mathar, Apr 24 2023

Extensions

Edited by Klaus Brockhaus, Jan 13 2007

A127338 Numbers that are the sum of 11 consecutive primes.

Original entry on oeis.org

160, 195, 233, 271, 311, 353, 399, 443, 491, 539, 583, 631, 677, 725, 779, 833, 883, 931, 979, 1025, 1081, 1139, 1197, 1253, 1313, 1367, 1423, 1483, 1543, 1607, 1673, 1727, 1787, 1843, 1901, 1951, 2011, 2077, 2141, 2203, 2263, 2323, 2383, 2443, 2507
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

a(n) = absolute value of coefficient of x^10 of the polynomial Product_{j=0..10} (x - prime(n+j)) of degree 11; the roots of this polynomial are prime(n), ..., prime(n+10).

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..10] ]: n in [1..70] ]; // Vincenzo Librandi, Apr 03 2011
  • Mathematica
    f[n_] := Sum[Prime[n + i], {i, 0, 10}]; Array[f, 45]
    Plus @@@ Partition[ Prime@ Range@ 55, 11, 1] (* Robert G. Wilson v, Jan 13 2011 *)
  • PARI
    {m=45;k=11;for(n=1,m,print1(a=sum(j=0,k-1,prime(n+j)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • PARI
    {m=45;k=11;for(n=1,m,print1(abs(polcoeff(prod(j=0,k-1,(x-prime(n+j))),k-1)),","))} \\ Klaus Brockhaus, Jan 13 2007
    

Extensions

Edited by Klaus Brockhaus, Jan 13 2007

A127334 Numbers that are the sum of 7 consecutive primes.

Original entry on oeis.org

58, 75, 95, 119, 143, 169, 197, 223, 251, 281, 311, 341, 371, 401, 431, 463, 493, 523, 559, 593, 625, 659, 689, 719, 757, 791, 827, 863, 905, 947, 991, 1027, 1063, 1099, 1139, 1171, 1211, 1247, 1281, 1313, 1351, 1395, 1441, 1479, 1519, 1561, 1603, 1643
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

a(n) = absolute value of coefficient of x^6 of the polynomial Product_{j=0..6} (x - prime(n+j)) of degree 7; the roots of this polynomial are prime(n), ..., prime(n+6).

Crossrefs

Programs

  • GAP
    P:=Filtered([1..1000],IsPrime);; List([0..50],n->Sum([1+n..7+n],i->P[i])); # Muniru A Asiru, Apr 16 2018
  • Magma
    [&+[ NthPrime(n+k): k in [0..6] ]: n in [1..70] ]; // Vincenzo Librandi, Apr 03 2011
    
  • Maple
    seq(add(ithprime(i),i=n..6+n),n=1..50); # Muniru A Asiru, Apr 16 2018
  • Mathematica
    a = {}; Do[AppendTo[a, Sum[Prime[x + n], {n, 0, 6}]], {x, 1, 50}]; a
    Total/@Partition[Prime[Range[60]],7,1] (* Harvey P. Dale, May 14 2023 *)
  • PARI
    {m=48;k=7;for(n=0,m-1,print1(a=sum(j=1,k,prime(n+j)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • PARI
    {m=48;k=7;for(n=1,m,print1(abs(polcoeff(prod(j=0,k-1,(x-prime(n+j))),k-1)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • Python
    from sympy import prime
    def a(x): return sum(prime(x + n) for n in range(7))
    print([a(i) for i in range(1, 50)]) # Indranil Ghosh, Mar 18 2017
    
  • Sage
    BB = primes_first_n(62)
    L = []
    for i in range(55):
        L.append(sum(BB[i+j] for j in range(7)))
    L
    # Zerinvary Lajos, May 14 2007
    

Extensions

Edited by Klaus Brockhaus, Jan 13 2007

A054268 Sum of composite numbers between prime p and nextprime(p) is a repdigit.

Original entry on oeis.org

3, 5, 109, 111111109, 259259257
Offset: 1

Views

Author

Patrick De Geest, Apr 15 2000

Keywords

Comments

No additional terms below 472882027.
No additional terms below 10^58. - Chai Wah Wu, Jun 01 2024

Examples

			a(5) is ok since between 259259257 and nextprime 259259261 we get the sum 259259258 + 259259259 + 259259260 which yield repdigit 777777777.
		

Crossrefs

Programs

  • Mathematica
    repQ[n_]:=Count[DigitCount[n],0]==9; Select[Prime[Range[2,14500000]], repQ[Total[Range[#+1,NextPrime[#]-1]]]&] (* Harvey P. Dale, Jan 29 2011 *)
  • Python
    from sympy import prime
    A054268 = [prime(n) for n in range(2,10**5) if len(set(str(int((prime(n+1)-prime(n)-1)*(prime(n+1)+prime(n))/2)))) == 1]
    # Chai Wah Wu, Aug 12 2014
    
  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    from sympy.abc import x,y
    from sympy.solvers.diophantine.diophantine import diop_quadratic
    def A054268_gen(): # generator of terms
        for l in count(1):
            c = []
            for m in range(1,10):
                k = m*(10**l-1)//9<<1
                for a, b in diop_quadratic((x-y-1)*(x+y)-k):
                    if isprime(b) and a == nextprime(b):
                        c.append(b)
            yield from sorted(c)
    A054268_list = list(islice(A054268_gen(),5)) # Chai Wah Wu, Jun 01 2024

Formula

Numbers A000040(n) for n > 1 such that A001043(n)*(A001223(n)-1)/2 is in A010785. - Chai Wah Wu, Aug 12 2014

Extensions

Offset changed by Andrew Howroyd, Aug 14 2024

A071216 a(n) is the largest prime factor of prime(n) + prime(n+1).

Original entry on oeis.org

5, 2, 3, 3, 3, 5, 3, 7, 13, 5, 17, 13, 7, 5, 5, 7, 5, 2, 23, 3, 19, 3, 43, 31, 11, 17, 7, 3, 37, 5, 43, 67, 23, 3, 5, 11, 5, 11, 17, 11, 5, 31, 3, 13, 11, 41, 31, 5, 19, 11, 59, 5, 41, 127, 13, 19, 5, 137, 31, 47, 3, 5, 103, 13, 7, 3, 167, 19, 29, 13, 89, 11, 37, 47, 127, 193, 131, 19
Offset: 1

Views

Author

Labos Elemer, May 17 2002

Keywords

Crossrefs

Programs

  • Mathematica
    pf[x_] := Part[Reverse[Flatten[FactorInteger[x]]],2]; Table[pf[Prime[w+1]+Prime[w]], {w,1,128}]
  • PARI
    a(n) = vecmax(factor(prime(n)+prime(n+1))[,1]); \\ Michel Marcus, Aug 29 2019

Formula

a(n) = A006530(A001043(n)).

A096379 a(n) = prime(n) + prime(n+1) - prime(n+2).

Original entry on oeis.org

0, 1, 1, 5, 7, 11, 13, 13, 21, 23, 27, 35, 37, 37, 41, 51, 53, 57, 65, 65, 69, 73, 75, 85, 95, 97, 101, 103, 95, 109, 121, 129, 127, 137, 143, 145, 153, 157, 161, 171, 169, 179, 187, 191, 185, 187, 207, 221, 223, 223, 231, 229, 235, 245, 251, 261, 263, 267, 275, 271
Offset: 1

Views

Author

Cino Hilliard, Aug 04 2004

Keywords

Comments

Sequence is non-monotonic: see, e.g., a(29), a(33), and a(41). - Zak Seidov, Jan 21 2013
Ishikawa proved that a(n) > 0 for n > 1. - Jonathan Sondow, Feb 13 2014

Examples

			a(1) = prime(1) + prime(2) - prime(3) = 2 + 3 - 5 = 0.
a(25) = prime(25) + prime(26) - prime(27) = 97 + 101 - 103 = 95.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n)+NthPrime(n+1)-NthPrime(n+2):n in [1..60]]; //  Marius A. Burtea, Aug 17 2019
  • Maple
    A096379 := proc(n)
        ithprime(n+1)+ithprime(n)-ithprime(n+2) ;
    end proc:
    seq(A096379(n),n=1..80) ; # R. J. Mathar, Sep 10 2016
  • Mathematica
    #[[1]] + #[[2]] - #[[3]] & /@ Partition[Prime[Range[62]], 3, 1] (* Zak Seidov, Apr 09 2013 *)
    ListConvolve[{-1,1,1},Prime[Range[100]]] (* Zak Seidov, Dec 03 2014 *)
  • PARI
    g(n)=for(x=1,n,print1(prime(x)+prime(x+1)-prime(x+2)","))
    
  • PARI
    first(n)=my(v=vector(n),p=2,q=3,k); forprime(r=5,, if(k++>n, break); v[k]=p+q-r; p=q; q=r); v \\ Charles R Greathouse IV, Oct 03 2017
    

Formula

a(n) = A001043(n) - A000040(n+2). - A.H.M. Smeets, Aug 17 2019
a(n) = A000040(n) - A001223(n+1). - Jon Maiga, Aug 17 2019

Extensions

Edited by Zak Seidov, Aug 27 2012
Definition reworded by N. J. A. Sloane, Aug 27 2012
Previous Showing 31-40 of 174 results. Next