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

A298073 The first of three consecutive integers the sum of which is equal to the sum of three consecutive prime numbers.

Original entry on oeis.org

4, 52, 156, 172, 210, 256, 262, 372, 510, 536, 562, 592, 606, 652, 732, 946, 976, 998, 1072, 1102, 1122, 1186, 1222, 1238, 1366, 1460, 1500, 1510, 1540, 1746, 1752, 1762, 1772, 1898, 1906, 1916, 2070, 2180, 2286, 2400, 2408, 2416, 2448, 2676, 2902, 2962
Offset: 1

Views

Author

Colin Barker, Jan 11 2018

Keywords

Comments

Also: Number m such that 3 * m + 6 is the sum of three consecutive primes. - David A. Corneth, Jan 12 2018

Examples

			52 is in the sequence because 52 + 53 + 54 = 159 = 47 + 53 + 59.
		

Crossrefs

Cf. A054643.
Cf. A075540: the second of the three consecutive integers.

Programs

  • Mathematica
    Block[{nn = 430, s}, s = Total /@ Partition[Prime@ Range[nn], 3, 1]; Select[Partition[Range[Prime@ nn], 3, 1], MemberQ[s, Total@ #] &]][[All, 1]] (* Michael De Vlieger, Jan 11 2018 *)
    (#-3)/3&/@Select[Total/@Partition[Prime[Range[500]],3,1],Mod[#,3]==0&] (* Harvey P. Dale, Sep 13 2018 *)
  • PARI
    L=List(); forprime(p=2, 4000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if((t-3)%3==0, listput(L, (t-3)/3))); Vec(L)

Extensions

New name by David A. Corneth, Jan 12 2018

A181424 Primes p such that p and the two previous primes are in arithmetic progression.

Original entry on oeis.org

7, 59, 163, 179, 223, 263, 269, 379, 569, 599, 613, 659, 739, 953, 983, 1109, 1129, 1193, 1229, 1373, 1523, 1753, 1759, 1913, 2293, 2423, 2683, 2909, 2969, 3313, 3319, 3643, 3739, 4019, 4421, 4463, 4603, 4663, 4703, 4999, 5113, 5119, 5309, 5393, 5399
Offset: 1

Views

Author

Carmine Suriano, Oct 18 2010

Keywords

Comments

Call d(i)=p(i+2)-p(i+1) and dd(i)=d(i+1)-d(i) then dd(i)=0.
All related first differences are multiples of 6 except the first one, which is 2.

Examples

			a(7)=269 since d(269,263)=6 and d(263,257)=6 and their difference is 0.
		

Crossrefs

Programs

  • Haskell
    a181424 = a000040 . (+ 2) . a064113  -- Reinhard Zumkeller, Jan 20 2012
  • Mathematica
    Select[Partition[Prime[Range[750]],3,1],Length[Union[Differences[#]]]==1&][[;;,3]] (* Harvey P. Dale, Oct 09 2023 *)

Formula

a(n) = A000040(A064113(n) + 2). - Reinhard Zumkeller, Jan 20 2012

A298222 The first of three consecutive squares the sum of which is equal to the sum of three consecutive primes.

Original entry on oeis.org

1444, 5776, 6400, 9604, 10816, 13924, 14400, 14884, 22500, 28900, 36100, 61504, 62500, 67600, 88804, 115600, 136900, 166464, 211600, 232324, 291600, 315844, 425104, 454276, 577600, 602176, 715716, 817216, 937024, 1016064, 1020100, 1290496, 1397124, 1507984
Offset: 1

Views

Author

Colin Barker, Jan 15 2018

Keywords

Examples

			1444 is in the sequence because 1444+1521+1600 (consecutive squares) = 4565 = 1511+1523+1531 (consecutive primes).
		

Crossrefs

Programs

  • PARI
    L=List(); forprime(p=2, 400000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(12*t-24, &sq) && (sq-6)%6==0, u=(sq-6)\6; listput(L, u^2))); Vec(L)

A298223 The first of three consecutive primes the sum of which is equal to the sum of three consecutive squares.

Original entry on oeis.org

1511, 5923, 6553, 9791, 11003, 14153, 14633, 15121, 22787, 29231, 36473, 61991, 62987, 68111, 89393, 116273, 137633, 167267, 212501, 233279, 292673, 316957, 426401, 455603, 579113, 603719, 717397, 819017, 938953, 1018057, 1022113, 1292737, 1399477, 1510427
Offset: 1

Views

Author

Colin Barker, Jan 15 2018

Keywords

Examples

			1511 is in the sequence because 1511+1523+1531 (consecutive primes) = 4565 = 1444+1521+1600 (consecutive squares).
		

Crossrefs

Programs

  • PARI
    L=List(); forprime(p=2, 400000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(12*t-24, &sq) && (sq-6)%6==0, u=(sq-6)\6; listput(L, p))); Vec(L)

A298250 The first of three consecutive pentagonal numbers the sum of which is equal to the sum of three consecutive primes.

Original entry on oeis.org

176, 35497, 45850, 68587, 87725, 229126, 488776, 705551, 827702, 1085876, 1127100, 1255380, 1732900, 1914785, 1972840, 2453122, 2737126, 2749297, 2818776, 3245026, 4598126, 5116190, 5522882, 6180335, 6658120, 6939126, 6958497, 7088327, 7114437, 7140595
Offset: 1

Views

Author

Colin Barker, Jan 15 2018

Keywords

Examples

			176 is in the sequence because 176+210+247 (consecutive pentagonal numbers) = 633 = 199+211+223 (consecutive primes).
		

Crossrefs

Programs

  • Maple
    N:= 10^8: # to get all terms where the sums <= N
    Res:= NULL:
    mmax:= floor((sqrt(8*N-23)-5)/6):
    M:= [seq(seq(4*i+j,j=2..3),i=0..mmax/4)]:
    M3:= map(m -> 9/2*m^2+15/2*m+6, M):
    for i from 1 to nops(M) do
    m:= M3[i];
      r:= ceil((m-8)/3);
      p1:= prevprime(r+1);
      p2:= nextprime(p1);
      p3:= nextprime(p2);
      while p1+p2+p3 > m do
        p3:= p2; p2:= p1; p1:= prevprime(p1);
      od:
      if p1+p2+p3 = m then
        Res:= Res, M[i]*(3*M[i]-1)/2;
      fi
    od:
    Res; # Robert Israel, Jan 16 2018
  • Mathematica
    Module[{prs3=Total/@Partition[Prime[Range[10^6]],3,1]},Select[ Partition[ PolygonalNumber[ 5,Range[ 5000]],3,1],MemberQ[ prs3,Total[#]]&]][[All,1]] (* Harvey P. Dale, Dec 25 2022 *)
  • PARI
    L=List(); forprime(p=2, 8000000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(72*t-207, &sq) && (sq-15)%18==0, u=(sq-15)\18; listput(L, (3*u^2-u)/2))); Vec(L)

A298251 The first of three consecutive primes the sum of which is equal to the sum of three consecutive pentagonal numbers.

Original entry on oeis.org

199, 35951, 46351, 69221, 88427, 230291, 490481, 707573, 829883, 1088419, 1129693, 1258109, 1736101, 1918157, 1976243, 2456939, 2741159, 2753351, 2822881, 3249419, 4603351, 5121713, 5528623, 6186407, 6664429, 6945559, 6964949, 7094839, 7120963, 7147121
Offset: 1

Views

Author

Colin Barker, Jan 15 2018

Keywords

Examples

			199 is in the sequence because 199+211+223 (consecutive primes) = 633 = 176+210+247 (consecutive pentagonal numbers).
		

Crossrefs

Programs

  • Maple
    N:= 10^8: # to get all terms where the sums <= N
    Res:= NULL:
    mmax:= floor((sqrt(8*N-23)-5)/6):
    M3:= map(t->9/2*t^2+15/2*t+6, [seq(seq(4*i+j,j=2..3),i=0..mmax/4)]):
    for m in M3 do
      r:= ceil((m-8)/3);
      p1:= prevprime(r+1);
      p2:= nextprime(p1);
      p3:= nextprime(p2);
      while p1+p2+p3 > m do
        p3:= p2; p2:= p1; p1:= prevprime(p1);
      od:
      if p1+p2+p3 = m then
        Res:= Res, p1
      fi
    od:
    Res; # Robert Israel, Jan 16 2018
  • Mathematica
    Module[{nn=50000,pn},pn=Total/@Partition[PolygonalNumber[5,Range[ Ceiling[ (1+Sqrt[1+24 Prime[nn]])/6]]],3,1];Select[Partition[ Prime[ Range[ nn]],3,1],MemberQ[pn,Total[#]]&]][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 12 2020 *)
  • PARI
    L=List(); forprime(p=2, 8000000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(72*t-207, &sq) && (sq-15)%18==0, u=(sq-15)\18; listput(L, p))); Vec(L)

A298272 The first of three consecutive hexagonal numbers the sum of which is equal to the sum of three consecutive primes.

Original entry on oeis.org

6, 6216, 7626, 9180, 16836, 19900, 22366, 29646, 76636, 89676, 93096, 114960, 116886, 118828, 322806, 365940, 397386, 422740, 437580, 471906, 499500, 574056, 595686, 626640, 690900, 743590, 984906, 1041846, 1148370, 1209790, 1260078, 1357128, 1450956
Offset: 1

Views

Author

Colin Barker, Jan 16 2018

Keywords

Examples

			6 is in the sequence because 6+15+28 (consecutive hexagonal numbers) = 49 = 13+17+19 (consecutive primes).
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(1)..a(100)
    count:= 0:
    mmax:= floor((sqrt(24*N-87)-9)/12):
    for i from 1 while count < N do
      mi:= 2*i;
      m:= 6*mi^2+9*mi+7;
      r:= ceil((m-8)/3);
      p1:= prevprime(r+1);
      p2:= nextprime(p1);
      p3:= nextprime(p2);
      while p1+p2+p3 > m do
        p3:= p2; p2:= p1; p1:= prevprime(p1);
      od:
      if p1+p2+p3 = m then
        count:= count+1;
        A[count]:= mi*(2*mi-1);
      fi
    od:
    seq(A[i], i=1..count); # Robert Israel, Jan 16 2018
  • PARI
    L=List(); forprime(p=2, 2000000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(24*t-87, &sq) && (sq-9)%12==0, u=(sq-9)\12; listput(L, u*(2*u-1)))); Vec(L)

A298273 The first of three consecutive primes the sum of which is equal to the sum of three consecutive hexagonal numbers.

Original entry on oeis.org

13, 6427, 7873, 9439, 17203, 20287, 22783, 30133, 77417, 90523, 93949, 115903, 117841, 119797, 324403, 367649, 399163, 424573, 439441, 473839, 501493, 576193, 597859, 628861, 693223, 746023, 987697, 1044733, 1151399, 1212889, 1263247, 1360417, 1454351
Offset: 1

Views

Author

Colin Barker, Jan 16 2018

Keywords

Examples

			13 is in the sequence because 13+17+19 (consecutive primes) = 49 = 6+15+28 (consecutive hexagonal numbers).
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(1)..a(100)
    count:= 0:
    mmax:= floor((sqrt(24*N-87)-9)/12):
    for i from 1 while count < N do
      mi:= 2*i;
      m:= 6*mi^2+9*mi+7;
      r:= ceil((m-8)/3);
      p1:= prevprime(r+1);
      p2:= nextprime(p1);
      p3:= nextprime(p2);
      while p1+p2+p3 > m do
        p3:= p2; p2:= p1; p1:= prevprime(p1);
      od:
      if p1+p2+p3 = m then
        count:= count+1;
      A[count]:= p1;
      fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Jan 16 2018
  • PARI
    L=List(); forprime(p=2, 2000000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(24*t-87, &sq) && (sq-9)%12==0, u=(sq-9)\12; listput(L, p))); Vec(L)

A054892 Smallest prime a(n) such that the sum of n consecutive primes starting with a(n) is divisible by n.

Original entry on oeis.org

2, 3, 3, 5, 71, 5, 7, 17, 239, 13, 29, 5, 43, 23, 5, 5, 7, 7, 79, 17, 47, 11, 2, 73, 97, 53, 271, 13, 263, 23, 41, 61, 97, 101, 181, 41, 47, 13, 233, 13, 53, 13, 359, 151, 71, 61, 239, 73, 443, 859, 29, 131, 2, 61, 313, 101, 19, 151, 521, 3, 571, 31, 7, 79, 109, 97, 53
Offset: 1

Views

Author

Labos Elemer, May 23 2000

Keywords

Comments

See A132809 for another version.
In some cases (n=1,2,25,..), like a(25)=97, the sum of 25 consecutive primes starts with the 25th prime and is divided by 25: Sum=97+...+227=3925=25*157

Examples

			a(8) = 17 since the sum of the 8 consecutive primes starting with 17 is 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 = 240, which is divisible by 8.  No prime less than 17 has this property: for example, 7 + 11 + ... + 31 = 150 which is not divisible by 8.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, t}, While[t = Table[Prime[i], {i, k, k + n - 1}]; Mod[Plus @@ t, n] > 0, k++ ]; t]; First /@ Table[f[n], {n, 67}] (* Ray Chandler, Oct 09 2006 *)
    Module[{prs=Prime[Range[250]]},Table[SelectFirst[Partition[prs,n,1],Mod[Total[#],n]==0&],{n,70}]][[;;,1]] (* Harvey P. Dale, Jul 11 2023 *)

Formula

a(n) = min{q_1 | Sum_{i=1..n} q_i = n*X}, q_i is a prime (rarely only a(n) = prime(n)).

A298301 The first of three consecutive heptagonal numbers the sum of which is equal to the sum of three consecutive primes.

Original entry on oeis.org

7, 874, 7209, 15484, 16687, 23863, 68641, 98704, 122877, 239785, 373842, 455182, 498852, 523723, 601966, 652036, 769230, 777573, 1003939, 1019844, 1121245, 1189215, 1203049, 1420159, 1484946, 1594804, 1606807, 1687977, 1804975, 2292973, 2533612, 3012363
Offset: 1

Views

Author

Colin Barker, Jan 16 2018

Keywords

Examples

			7 is in the sequence because 7+18+34 (consecutive hexagonal numbers) = 59 = 17+19+23 (consecutive primes).
		

Crossrefs

Programs

  • PARI
    L=List(); forprime(p=2, 2000000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(120*t-519, &sq) && (sq-21)%30==0, u=(sq-21)\30; listput(L, (5*u^2-3*u)/2))); Vec(L)
Showing 1-10 of 18 results. Next