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 51-60 of 174 results. Next

A065867 Primes which are the sum of a prime number of consecutive primes.

Original entry on oeis.org

5, 23, 31, 41, 53, 59, 67, 71, 83, 97, 101, 109, 131, 139, 173, 181, 197, 199, 211, 223, 233, 251, 263, 269, 271, 281, 311, 331, 349, 353, 373, 401, 421, 431, 439, 443, 449, 457, 463, 487, 491, 499, 503, 523, 563, 587, 593, 607, 617, 631, 647, 659, 661, 677
Offset: 1

Views

Author

Henry Bottomley, Dec 07 2001

Keywords

Examples

			5 = 2 + 3.
23 = 5 + 7 + 11.
31 = 7 + 11 + 13.
41 = 11 + 13 + 17.
53 = 5 + 7 + 11 + 13 + 17.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[s=Prime[m];k=1;Do[p=Prime[n];s+=p;k++;If[PrimeQ[s]&&PrimeQ[k],If[s<=10837,AppendTo[lst,s]]],{n,m+1,5*5!}],{m,5*5!}];lst=Take[Union@lst,500] (* Vladimir Joseph Stephan Orlovsky, Sep 13 2009 *)
    Module[{nn=60,prs},prs=Prime[Range[nn]];Take[Select[Union[ Flatten[ Table[ Total/@ Partition[prs,n,1],{n,prs}]]],PrimeQ],nn]] (* Harvey P. Dale, Aug 12 2016 *)

A096278 Sums of successive sums of successive sums of successive primes.

Original entry on oeis.org

33, 50, 72, 96, 120, 144, 172, 206, 240, 274, 308, 336, 364, 402, 444, 480, 514, 548, 578, 610, 648, 692, 742, 786, 816, 840, 864, 900, 960, 1024, 1070, 1108, 1152, 1196, 1236, 1278, 1320, 1362, 1404, 1444, 1488, 1530, 1560, 1592, 1650, 1728, 1790, 1824
Offset: 1

Views

Author

Cino Hilliard, Jun 22 2004

Keywords

Comments

If we consider the m-fold iterated "take sums of successive terms" operation acting on the primes, then for all m >= 1, the first term is always odd (and the only odd term); it is prime for m=1, 2, 4, 8, 21, 24, 27, 31, 40, 98,..., but not for m=3 (the present sequence). [Edited by M. F. Hasler, Jun 02 2017]

Examples

			The first two terms of SS order 1 is 13 and 20. 13+20 = 33 the first term of the sequence.
		

Crossrefs

Programs

  • Maple
    Ss:= L -> L[1..-2]+L[2..-1]:
    (Ss@@3)([seq(ithprime(i),i=1..100)]); # Robert Israel, Dec 28 2022
  • Mathematica
    Nest[ListConvolve[{1,1},#]&,Prime[Range[100]],3] (* Paolo Xausa, Oct 31 2023 *)
  • PARI
    f(n) = return(prime(n)+prime(n+1))
    f1(n) = return(f(n)+f(n+1))
    f2(n) = return(f1(n)+f1(n+1))
    g(n) = for(x=1,n,print1(f2(x)","))
    
  • PARI
    A096278(n,m=3)=for(k=0,m,prime(n+k)*binomial(m,k)) \\ or, to get a list:
    A096278_vec(Nmax,m=3,v=primes(Nmax+m))=sum(k=0,m,binomial(m,k)*v[1+k,k-1-m]) \\ Alternatively, do m times v=v[^1]+v[^-1]. - M. F. Hasler, Jun 02 2017

Formula

Let f(n) = prime(n) + prime(n+1) f1(n) = f(n)+f(n+1) : SS of order 1 Then f2(n) = f1(n)+f1(n) : SS of order 2 is the general term of this sequence.
a(n) = A096277(n) + A096277(n+1). - M. F. Hasler, Jun 02 2017
a(n) = prime(n)+3*prime(n+1)+3*prime(n+2)+prime(n+3). - Robert Israel, Dec 28 2022

A098037 Number of prime divisors, counted with multiplicity, of the sum of two consecutive primes.

Original entry on oeis.org

1, 3, 3, 3, 4, 3, 4, 3, 3, 4, 3, 3, 4, 4, 4, 5, 5, 7, 3, 6, 4, 5, 3, 3, 4, 4, 4, 6, 3, 6, 3, 3, 4, 7, 5, 4, 7, 4, 4, 6, 6, 4, 8, 4, 5, 3, 3, 5, 5, 4, 4, 7, 4, 3, 5, 4, 6, 3, 4, 4, 8, 6, 3, 6, 5, 7, 3, 5, 5, 5, 4, 4, 4, 5, 3, 3, 3, 4, 6, 5, 6, 4, 8, 4, 5, 3, 3, 5, 5, 4, 3, 4, 3, 5, 3, 4, 3, 5, 5, 7, 6, 7, 3, 5, 4
Offset: 1

Views

Author

Cino Hilliard, Sep 10 2004

Keywords

Comments

Clearly sum of two consecutive primes prime(x) and prime(x+1) has more than 2 prime divisors for all x > 1.

Examples

			Prime(2) + prime(3) = 2*2*2, 3 factors, the second term in the sequence.
		

Crossrefs

Cf. A071215, A251600 (greedy inverse).

Programs

  • Maple
    A098037 := proc(n)
        ithprime(n)+ithprime(n+1) ;
        numtheory[bigomega](%) ;
    end proc:
    seq(A098037(n),n=1..40) ; # R. J. Mathar, Jan 20 2025
  • Mathematica
    PrimeOmega[Total[#]]&/@Partition[Prime[Range[110]],2,1] (* Harvey P. Dale, Jun 14 2011 *)
  • PARI
    b(n) = for(x=1,n,y1=(prime(x)+prime(x+1));print1(bigomega(y1)","))

Formula

a(n) = A001222(A001043(n)). - Michel Marcus, Feb 15 2014

Extensions

Definition corrected by Andrew S. Plewe, Apr 08 2007

A226524 Cubes which are the sum of two consecutive primes.

Original entry on oeis.org

8, 216, 21952, 74088, 373248, 4251528, 5268024, 10648000, 10941048, 12812904, 14886936, 16003008, 25934336, 40707584, 54872000, 59319000, 114791256, 132651000, 199176704, 209584584, 259694072, 269586136, 306182024, 345948408, 373248000, 543338496, 567663552
Offset: 1

Views

Author

K. D. Bajpai, Aug 31 2013

Keywords

Examples

			a(2) = 216: prime(28) + prime(29) = 107 + 109 = 216 = 6^3.
		

Crossrefs

Cubes in A001043.
Cf. A062703 (analog for squares), A061308 (lesser of the consecutive primes), A071220 (index of that prime), A074925 (a(n)^(1/3)).

Programs

  • Maple
    KD: = proc() local a,b,c;  a: = ithprime(n) + ithprime(n+1); b:= evalf(a^(1/3)); if b=floor(b) then RETURN(a):  fi; end: seq(KD(), n=1..1000000);
  • Mathematica
    Select[Total/@Partition[Prime[Range[155*10^5]],2,1],IntegerQ[Surd[#,3]]&] (* or *) stcpQ[n_]:=Module[{p1=NextPrime[Floor[n/2],-1],p2=NextPrime[Ceiling[n/2]]},n==p1+p2]; Select[Range[850]^3,stcpQ] (* The second program is much more efficient than the first. *) (* Harvey P. Dale, May 15 2022 *)
  • PARI
    n=0; forstep(j=2, 55778, 2, c=j^3; c2=c/2; if(precprime(c2)+nextprime(c2)==c, n++; write("b226524.txt", n " " c))) /* Donovan Johnson, Sep 02 2013 */
    
  • PARI
    A226524(n)=A074925(n)^3 \\ M. F. Hasler, Jan 03 2020
    
  • Python
    from itertools import count, islice
    from sympy import nextprime, prevprime
    def agen(): yield from (c for c in (k**3 for k in count(2, step=2)) if prevprime(c//2+1) + nextprime(c//2-1) == c)
    print(list(islice(agen(), 27))) # Michael S. Branicky, May 24 2022

Formula

a(n) = A074925(n)^3 = A000040(i) + A000040(i+1) with i = A071220(n) = A000720(A061308(n)). - M. F. Hasler, Jan 03 2020

Extensions

Edited by M. F. Hasler, Jan 03 2020

A298463 The first of two consecutive pentagonal numbers the sum of which is equal to the sum of two consecutive primes.

Original entry on oeis.org

70, 3577, 10795, 36895, 55777, 70525, 78547, 125137, 178365, 208507, 258130, 329707, 349692, 394497, 438751, 468442, 478555, 499105, 619852, 663005, 753667, 827702, 877455, 900550, 1025480, 1085876, 1169092, 1201090, 1211852, 1233520, 1339065, 1508512
Offset: 1

Views

Author

Colin Barker, Jan 19 2018

Keywords

Examples

			70 is in the sequence because 70+92 (consecutive pentagonal numbers) = 162 = 79+83 (consecutive primes).
		

Crossrefs

Programs

  • Mathematica
    Select[Partition[PolygonalNumber[5,Range[1500]],2,1],CompositeQ[Total[#]/2]&&Total[#] == NextPrime[ Total[#]/2]+NextPrime[Total[#]/2,-1]&][[;;,1]] (* Harvey P. Dale, Jan 20 2024 *)
  • PARI
    L=List(); forprime(p=2, 1600000, q=nextprime(p+1); t=p+q; if(issquare(12*t-8, &sq) && (sq-2)%6==0, u=(sq-2)\6; listput(L, (3*u^2-u)/2))); Vec(L)
    
  • Python
    from _future_ import division
    from sympy import prevprime, nextprime
    A298463_list, n, m = [], 1 ,6
    while len(A298463_list) < 10000:
        k = prevprime(m//2)
        if k + nextprime(k) == m:
            A298463_list.append(n*(3*n-1)//2)
        n += 1
        m += 6*n-1 # Chai Wah Wu, Jan 20 2018

A092163 a(n) = prime(2n) + prime(2n+1).

Original entry on oeis.org

8, 18, 30, 42, 60, 78, 90, 112, 128, 144, 162, 186, 204, 216, 240, 268, 288, 308, 330, 352, 372, 390, 410, 450, 462, 480, 508, 532, 548, 564, 600, 624, 648, 684, 702, 726, 752, 772, 798, 828, 852, 872, 892, 918, 930, 966, 990, 1012, 1044, 1088, 1120, 1140
Offset: 1

Views

Author

Jun Mizuki (suzuki32(AT)sanken.osaka-u.ac.jp), Mar 31 2004

Keywords

Examples

			a(1) = 8 because p(2)= 3 and p(3) = 5.
a(2) = 18 because p(4)= 7 and p(5) = 11.
a(3) = 30 because p(6)= 13 and p(7) = 17.
		

Crossrefs

Programs

Formula

a(n) = A001043(2*n). - R. J. Mathar, Apr 20 2009
a(n) = 2*A058296(n+1). - Hugo Pfoertner, Aug 11 2025

Extensions

More terms from Robert G. Wilson v, Apr 22 2004

A096279 Sums of successive sums of successive sums of successive sums of successive primes.

Original entry on oeis.org

83, 122, 168, 216, 264, 316, 378, 446, 514, 582, 644, 700, 766, 846, 924, 994, 1062, 1126, 1188, 1258, 1340, 1434, 1528, 1602, 1656, 1704, 1764, 1860, 1984, 2094, 2178, 2260, 2348, 2432, 2514, 2598, 2682, 2766, 2848, 2932, 3018, 3090, 3152, 3242, 3378
Offset: 1

Views

Author

Cino Hilliard, Jun 22 2004

Keywords

Comments

The first term is always odd and may be prime. The first terms of more and more successions produce A007443.

Examples

			2 3 5 7 11 successive primes
5 8 12 18 sums of successive primes
13 20 30 sums of successive sums of successive primes
33 50 sums of successive sums of successive sums of successive primes
83 sums of successive sums of successive sums of successive sums of successive primes
		

Crossrefs

Programs

  • Mathematica
    Nest[ListConvolve[{1,1},#]&,Prime[Range[100]],4] (* Paolo Xausa, Oct 31 2023 *)
  • PARI
    \\ Iterated successive sums of successive sums... of successive primes.
    \\ Input number of terms n and the order m. m=0 yields the primes.
    sucsums(n, m) = { my(a, b, i, j, k); a = primes(n+m); b = vector(#a); for(i=1, m, for(j=1, n+m-i, b[j] = a[j]+ a[j+1]; ); a=b; ); for(k=1, n, print1(a[k], ", "); ) }

A098764 a(n) = 3p - q where p and q are consecutive primes.

Original entry on oeis.org

3, 4, 8, 10, 20, 22, 32, 34, 40, 56, 56, 70, 80, 82, 88, 100, 116, 116, 130, 140, 140, 154, 160, 170, 190, 200, 202, 212, 214, 212, 250, 256, 272, 268, 296, 296, 308, 322, 328, 340, 356, 352, 380, 382, 392, 386, 410, 442, 452, 454, 460, 476, 472, 496, 508, 520
Offset: 1

Views

Author

Giovanni Teofilatto, Sep 30 2004

Keywords

Comments

Except for the initial term, a(n)=={2, 4} mod 6.
Not monotonic: a(29) = 214 > 212 = a(30), a(33) = 272 > 268 = a(34), etc. - Charles R Greathouse IV, Jun 03 2013

Crossrefs

Programs

  • Mathematica
    ListConvolve[{-1,3},Prime[Range[100]]] (* Paolo Xausa, Nov 02 2023 *)
  • PARI
    a(n) = 3*prime(n) - prime(n+1) \\ Michel Marcus, Jun 03 2013

Formula

a(n) = A001043(n) - 2*A001223(n).
a(n) = 3*A000040(n)-A000040(n+1) = A001748(n)-A000040(n+1) = A001747(n+1)-A001223(n). - R. J. Mathar, Apr 22 2010
a(n) ~ 2n log n. - Charles R Greathouse IV, Jun 03 2013
a(n) = A100021(n) + 3. - Hugo Pfoertner, Nov 02 2023
a(n) = A062234(n) + A000040(n). - Anthony S. Wright, Feb 19 2024

Extensions

Corrected (116 duplicated) by R. J. Mathar, Apr 22 2010

A102724 Sum of the first n pairs of consecutive primes (for example, a(3) = (2+3) + (3+5) + (5+7) = 25).

Original entry on oeis.org

5, 13, 25, 43, 67, 97, 133, 175, 227, 287, 355, 433, 517, 607, 707, 819, 939, 1067, 1205, 1349, 1501, 1663, 1835, 2021, 2219, 2423, 2633, 2849, 3071, 3311, 3569, 3837, 4113, 4401, 4701, 5009, 5329, 5659, 5999, 6351, 6711, 7083, 7467, 7857, 8253, 8663, 9097
Offset: 1

Views

Author

Giovanni Teofilatto, Feb 07 2005

Keywords

Comments

Partial sums of A001043.

Examples

			a(1) = 5 = (2+3).
a(2) = 13 = (2+3) + (3+5).
a(3) = 25 = (2+3) + (3+5) + (5+7).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Prime[i] + Prime[i + 1], {i, n}], {n, 47}] (* Ray Chandler, Feb 12 2005 *)
    Table[2Sum[Prime[i], {i, n}] - (2 + Prime[n]), {n, 2, 50}] (* Alonso del Arte, Apr 26 2016 *)
    Accumulate[Total/@Partition[Prime[Range[50]],2,1]] (* Harvey P. Dale, Apr 13 2019 *)

Formula

a(n) = 2*Sum_{i=1..n} prime(i) - (2 + prime(n)). - Alonso del Arte, Apr 21 2016
a(n) = 3*n*(n-1)+7 for n = 2, ..., 8; cf. A378569. - M. F. Hasler, Feb 04 2025

Extensions

Edited and extended by Ray Chandler, Feb 12 2005
Better definition from Alonso del Arte, Apr 26 2016

A105936 Numbers that are the product of exactly 3 primes and are of the form prime(n) + prime(n+1).

Original entry on oeis.org

8, 12, 18, 30, 42, 52, 68, 78, 138, 172, 186, 222, 258, 268, 410, 434, 508, 548, 618, 668, 762, 772, 786, 892, 906, 946, 978, 1002, 1030, 1132, 1334, 1374, 1446, 1542, 1606, 1758, 1866, 1878, 1948, 2006, 2022, 2252, 2334, 2414, 2452, 2468, 2486, 2572, 2588
Offset: 1

Views

Author

Giovanni Teofilatto, Apr 27 2005

Keywords

Comments

Minimal triprimes (A014612) of the form prime(n) + prime(n+1).
Intersection of A001043 and A014612:
a(1) = A001043(2) = A014612(1),
a(2) = A001043(2) = A014612(2). - Zak Seidov, Jan 31 2017

Examples

			a(2) = 12 because 12 = 5 + 7 = 3*2^2;
a(3) = 18 because 18 = 7 + 11 = 2*3^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[8,10000,2], 3 == PrimeOmega[#] && NextPrime[#/2] + NextPrime[#/2, -1] == # &] (* Zak Seidov, Jan 31 2017 *)
  • PARI
    list(lim)=my(v=List()); forprime(p=2,lim\2, forprime(q=2,min(p,lim\p\2), my(t=2*p*q); if(precprime(p*q)+nextprime(p*q)==t, listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Feb 01 2017

Formula

a(n) is equal to the product of 3 primes if the arithmetic mean of prime(n) and prime(n+1) is a semiprime.

Extensions

More terms from Reinhard Zumkeller, May 03 2005
Previous Showing 51-60 of 174 results. Next