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

A373825 Position of first appearance of n in the run-lengths (differing by 0) of the run-lengths (differing by 2) of the odd primes.

Original entry on oeis.org

1, 2, 13, 11, 105, 57, 33, 69, 59, 29, 227, 129, 211, 341, 75, 321, 51, 45, 407, 313, 459, 301, 767, 1829, 413, 537, 447, 1113, 1301, 1411, 1405, 2865, 1709, 1429, 3471, 709, 2543, 5231, 1923, 679, 3301, 2791, 6555, 5181, 6345, 11475, 2491, 10633
Offset: 1

Views

Author

Gus Wiseman, Jun 21 2024

Keywords

Comments

Positions of first appearances in A373819.

Examples

			The runs of odd primes differing by 2 begin:
   3   5   7
  11  13
  17  19
  23
  29  31
  37
  41  43
  47
  53
  59  61
  67
  71  73
  79
with lengths:
3, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, ...
which have runs beginning:
  3
  2 2
  1
  2
  1
  2
  1 1
  2
  1
  2
  1 1 1 1
  2 2
  1 1 1
with lengths:
1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 4, 2, 3, 2, 4, 3, ...
with positions of first appearances a(n).
		

Crossrefs

Firsts of A373819 (run-lengths of A251092).
For antiruns we have A373827 (sorted A373826), firsts of A373820, run-lengths of A027833 (partial sums A029707, firsts A373401, sorted A373402).
The sorted version is A373824.
A000040 lists the primes.
A001223 gives differences of consecutive primes (firsts A073051), run-lengths A333254 (firsts A335406), run-lengths of run-lengths A373821.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.
For composite runs: A005381, A054265, A068780, A176246, A373403, A373404.

Programs

  • Mathematica
    t=Length/@Split[Length/@Split[Select[Range[3,10000], PrimeQ],#1+2==#2&]//Most]//Most;
    spna[y_]:=Max@@Select[Range[Length[y]],SubsetQ[t,Range[#1]]&];
    Table[Position[t,k][[1,1]],{k,spna[t]}]

A049579 Numbers k such that prime(k)+2 divides (prime(k)-1)!.

Original entry on oeis.org

4, 6, 8, 9, 11, 12, 14, 15, 16, 18, 19, 21, 22, 23, 24, 25, 27, 29, 30, 31, 32, 34, 36, 37, 38, 39, 40, 42, 44, 46, 47, 48, 50, 51, 53, 54, 55, 56, 58, 59, 61, 62, 63, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that prime(k+1) - prime(k) does not divide prime(k+1) + prime(k). These are the numbers k for which prime(k+1) - prime(k) > 2. - Thomas Ordowski, Mar 31 2022
If we prepend 1, the first differences are A251092 (see also A175632). The complement is A029707. - Gus Wiseman, Dec 03 2024

Examples

			prime(4) = 7, 6!+1 = 721 gives residue 1 when divided by prime(4)+2 = 9.
		

Crossrefs

The first differences are A251092 except first term, run-lengths A373819.
The complement is A029707.
Runs of terms differing by one have lengths A027833, min A107770, max A155752.
A000040 lists the primes, differences A001223 (run-lengths A333254, A373821).
A038664 finds the first prime gap of difference 2n.
A046933 counts composite numbers between primes.
A071148 gives partial sums of odd primes.

Programs

  • Mathematica
    pnmQ[n_]:=Module[{p=Prime[n]},Mod[(p-1)!+1,p+2]==1]; Select[Range[ 100],pnmQ] (* Harvey P. Dale, Jun 24 2017 *)
  • PARI
    isok(n) = (((prime(n)-1)! + 1) % (prime(n)+2)) == 1; \\ Michel Marcus, Dec 31 2013

Extensions

Definition edited by Thomas Ordowski, Mar 31 2022

A125576 Primes p=prime(i) of level (1,15), i.e., such that A118534(i)=prime(i-15).

Original entry on oeis.org

264426203, 295902073, 361949821, 704544167, 1075639757, 1259347393, 1290546427, 1301756207, 1335396547, 1370742383, 1460811643, 1497078991, 1514647247, 1643839649, 1783137281, 2142070103, 2424093281, 2471124197, 2494743721, 2577014057, 2706824389, 2951139253
Offset: 1

Views

Author

Rémi Eismann and Fabien Sibenaler, Jan 27 2007

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,15): If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			prime(16042282) - prime(16042281) = 295902247 - 295902073 = 295902073 - 295901899 = prime(16042281) - prime(16042281-15) and prime(16042281) has level 1 in A117563, so prime(16042281)=295902073 has level (1,15).
		

Crossrefs

Cf. A117078, A117563, A006562 (primes of level (1,1)), A117876, A118464, A118467, A119402, A119403, A119404.

Programs

  • PARI
    lista(nn) = my(c=16, v=primes(16)); forprime(p=59, nn, if(2*v[c]-p==v[c=c%16+1], print1(precprime(p-1), ", ")); v[c]=p); \\ Jinyuan Wang, Jun 18 2021

Extensions

Definition and comment reworded following suggestions from the authors. - M. F. Hasler, Nov 30 2009
Terms a(5) and beyond from b-file by Andrew Howroyd, Feb 05 2018

A126554 Arithmetic mean of two consecutive balanced primes (of order one).

Original entry on oeis.org

29, 105, 165, 192, 234, 260, 318, 468, 578, 600, 630, 693, 840, 962, 1040, 1113, 1155, 1205, 1295, 1439, 1629, 1750, 1830, 2097, 2352, 2547, 2790, 2933, 3135, 3310, 3475, 3685, 3873, 4211, 4433, 4527, 4627, 4674, 4842, 5050, 5110, 5208, 5345, 5390, 5478
Offset: 1

Views

Author

Artur Jasinski, Dec 27 2006

Keywords

Comments

Might be called interprimes of order two, since the arithmetic means of two consecutive odd primes (A024675) sometimes are called interprimes.
Balanced primes of order two (A082077) and doubly balanced primes (A051795) have different definitions.
For primes in this sequence (prime interprimes of order two) see A126555.

Crossrefs

Programs

  • GAP
    P:=Filtered([1..6000],IsPrime);;P1:=List(Filtered(List([0..Length(P)-3],k->List([1..3],j->P[j+k])),i->Sum(i)/3=i[2]),m->m[2]);;
    a:=List([1..Length(P1)-1],n->(P1[n+1]+P1[n])/2); # Muniru A Asiru, Mar 31 2018
  • Mathematica
    b = {}; a = {}; Do[If[PrimeQ[((Prime[n + 2] + Prime[n + 1])/2 + (Prime[n + 1] + Prime[n])/2)/2], AppendTo[a, ((Prime[n + 2] + Prime[n + 1])/2 + (Prime[n + 1] + Prime[n])/2)/2]], {n, 1, 1000}]; Do[AppendTo[b, (a[[k + 1]] + a[[k]])/2], {k, 1, Length[a] - 1}]; b
  • PARI
    {m=6000;a=0;p=2;q=3;r=5;while(r<=m,if((p+r)/2==q,if(a>0,print1((a+q)/2,","));a=q);p=q;q=r;r=nextprime(r+1))} \\ Klaus Brockhaus, Jan 05 2007
    

Formula

a(n) = (A006562(n+1)+A006562(n))/2.

Extensions

Edited by Klaus Brockhaus, Jan 05 2007

A373819 Run-lengths (differing by 0) of the run-lengths (differing by 2) of the odd primes.

Original entry on oeis.org

1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 4, 2, 3, 2, 4, 3, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 3, 1, 10, 2, 4, 1, 7, 1, 4, 1, 3, 1, 2, 1, 1, 1, 2, 1, 18, 3, 2, 1, 2, 1, 17, 2, 1, 2, 2, 1, 6, 1, 9, 1, 3, 1, 1, 1, 1, 1, 1, 1, 8, 1, 3, 1, 2, 2, 15, 1, 1, 1, 4, 1, 1, 1, 1, 1, 7, 1
Offset: 1

Views

Author

Gus Wiseman, Jun 20 2024

Keywords

Comments

Run-lengths of A251092.

Examples

			The odd primes begin:
3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, ...
with runs:
   3   5   7
  11  13
  17  19
  23
  29  31
  37
  41  43
  47
  53
  59  61
  67
  71  73
with lengths:
3, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, ...
which have runs beginning:
  3
  2 2
  1
  2
  1
  2
  1 1
  2
  1
  2
  1 1 1 1
  2 2
  1 1 1
with lengths a(n).
		

Crossrefs

Run-lengths of A251092.
For antiruns we have A373820, run-lengths of A027833 (if we prepend 1).
Positions of first appearances are A373825, sorted A373824.
A000040 lists the primes.
A001223 gives differences of consecutive primes, run-lengths A333254, run-lengths of run-lengths A373821.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.
For composite runs: A005381, A054265, A068780, A373403, A373404.

Programs

  • Mathematica
    Length/@Split[Length/@Split[Select[Range[3,1000], PrimeQ],#1+2==#2&]//Most]//Most

A053070 Primes p such that p-6, p and p+6 are consecutive primes.

Original entry on oeis.org

53, 157, 173, 257, 263, 373, 563, 593, 607, 653, 733, 947, 977, 1103, 1123, 1187, 1223, 1367, 1747, 1753, 1907, 2287, 2417, 2677, 2903, 2963, 3307, 3313, 3637, 3733, 4013, 4457, 4597, 4657, 4993, 5107, 5113, 5303, 5387, 5393, 5563, 5807, 6073, 6263
Offset: 1

Views

Author

Harvey P. Dale, Feb 25 2000

Keywords

Comments

Balanced primes separated from the next lower and next higher prime neighbors by 6.
Subset of A006489. - R. J. Mathar, Apr 11 2008
Subset of A006562. - Zak Seidov, Feb 14 2013
a(n) == {3,7} mod 10. - Zak Seidov, Feb 14 2013
Minimal difference is 6: a(5) - a(4) = 263 - 257, a(20) - a(19) = 1753 - 1747, ... . - Zak Seidov, Feb 14 2013

Examples

			157 is separated from both the next lower prime, 151 and the next higher prime, 163, by 6.
		

Crossrefs

Cf. A047948, A006489, A006562. - Zak Seidov, Feb 14 2013

Programs

  • Maple
    for i from 1 by 1 to 800 do if ithprime(i+1) = ithprime(i) + 6 and ithprime(i+2) = ithprime(i) + 12 then print(ithprime(i+1)); fi; od; # Zerinvary Lajos, Apr 27 2007
  • Mathematica
    lst={};Do[p=Prime[n];If[p-Prime[n-1]==Prime[n+1]-p==6,AppendTo[lst,p]],{n,2,7!}];lst (* Vladimir Joseph Stephan Orlovsky, May 20 2010 *)
    Transpose[Select[Partition[Prime[Range[1000]],3,1],Differences[#]=={6,6}&]][[2]] (* Harvey P. Dale, Oct 11 2012 *)

Formula

a(n) = A047948(n) + 6. - R. J. Mathar, Apr 11 2008

Extensions

Edited by N. J. A. Sloane at the suggestion of Zak Seidov, Apr 09 2008

A053710 Prime-balanced factorials: factorials k! that are the mean of their 2 closest neighboring primes.

Original entry on oeis.org

6, 120, 3628800, 51090942171709440000
Offset: 1

Views

Author

Labos Elemer, Feb 10 2000

Keywords

Comments

Values of k are in A053709.
The next two terms are 171! and 190!. - Jud McCranie, Jul 04 2000

Examples

			For k = 21, k! = 51090942171709440000, d = 31, and the closest primes to 21! are q = 21! - 31 = 51090942171709439969, p = 21! + 31 = 51090942171709440031.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[25]!,NextPrime[#]-#==#-NextPrime[#,-1]&] (* Harvey P. Dale, May 08 2025 *)

Formula

k! = (p+q)/2; p = k! + d, q = k! - d, where p and q are the closest primes to k!.
a(n) = A053709(n)!.

Extensions

a(3) corrected by Sean A. Irvine, Jan 14 2022

A125623 Primes p=prime(i) of level (1,16), i.e., such that A118534(i)=prime(i-16).

Original entry on oeis.org

356604959, 613768081, 709208323, 950803363, 979872743, 1174872271, 1186433617, 1625945609, 1796767963, 1840621901, 2348698453, 2547482281, 3385901059, 3446679371, 3512406283, 3735873397, 4080198391, 4106437259, 4319987921, 4695419887, 5285414713, 5288810297
Offset: 1

Views

Author

Rémi Eismann and Fabien Sibenaler, Jan 27 2007

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,16): If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			prime(48470200) - prime(48470199) = 950803519 - 950803363 = 950803363 - 950803207 = prime(48470199) - prime(48470199-16) and prime(48470199) has level 1 in A117563, so prime(48470199) = 950803363 has level (1,16).
		

Crossrefs

Cf. A117078, A117563, A006562 (primes of level (1,1)), A117876, A118464, A118467, A119402, A119403, A119404.

Programs

  • PARI
    lista(nn) = my(v=primes(17)); forprime(p=61, nn, if(2*v[17]-p==v[1], print1(v[17], ", ")); v=concat(v[2..17], p)); \\ Jinyuan Wang, Jun 18 2021

Extensions

Definition and comment reworded following suggestions from the authors. - M. F. Hasler, Nov 30 2009

A126238 Primes of the form p = prime(k) = (prime(k+3)+prime(k-1))/2.

Original entry on oeis.org

1009, 2789, 4001, 4931, 5431, 5501, 5519, 5839, 6029, 6521, 7103, 7817, 8081, 8147, 8353, 10091, 17011, 18251, 18301, 19751, 21139, 22769, 25013, 25339, 25931, 26681, 27271, 27397, 27791, 28429, 28619, 33149, 33739, 35491, 35521, 36451, 36779
Offset: 1

Views

Author

Artur Jasinski, Dec 21 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Prime@Select[Range[2, 4000], 2Prime[ # ] == Prime[ # - 1] + Prime[ # + 3] &] (* Ray Chandler, Dec 27 2006 *)
    Transpose[Select[Partition[Prime[Range[4000]],5,1],2#[[2]]==#[[5]]+#[[1]]&]][[2]] (* Harvey P. Dale, Jan 23 2013 *)

Extensions

Edited and extended by Ray Chandler, Dec 27 2006

A126556 Arithmetic mean of two consecutive prime interprimes of second order: interprimes of third order.

Original entry on oeis.org

734, 2825, 5957, 10305, 13932, 15830, 18825, 25084, 30205, 32121, 34901, 40640, 47984, 70842, 102897, 120165, 125973, 130250, 138924, 145480, 148894, 154236, 161676, 167730, 174737, 180632, 183077, 191253, 210375, 224327, 232817, 246285
Offset: 1

Views

Author

Artur Jasinski, Dec 27 2006

Keywords

Comments

For primes in this sequence (prime interprimes of third order) see A126557.

Crossrefs

Cf. A006562 (balanced primes), A024675 (interprimes), A126554 (interprimes of second order), A126555 (prime interprimes of second order).

Programs

  • PARI
    {m=250000;a=0;g=0;p=2;q=3;r=5;while(r<=m,if((p+r)/2==q,if(a>0,b=(a+q)/2;if(isprime(b),if(g>0,print1(h=(g+b)/2,","));g=b));a=q);p=q;q=r;r=nextprime(r+1))} \\ Klaus Brockhaus, Jan 11 2007

Formula

a(n) = (A126555(n)+A126555(n+1))/2.

Extensions

Edited by Klaus Brockhaus, Jan 11 2007
Previous Showing 51-60 of 150 results. Next