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 41-50 of 51 results. Next

A373817 Positions of terms > 1 in the run-lengths of the first differences of the odd primes.

Original entry on oeis.org

2, 14, 34, 36, 42, 49, 66, 94, 98, 100, 107, 117, 147, 150, 169, 171, 177, 181, 199, 219, 250, 268, 315, 333, 361, 392, 398, 435, 477, 488, 520, 565, 570, 585, 592, 595, 628, 642, 660, 666, 688, 715, 744, 765, 772, 778, 829, 842, 897, 906, 931, 932, 961, 1025
Offset: 1

Views

Author

Gus Wiseman, Jun 23 2024

Keywords

Comments

Positions of terms > 1 in A333254. In other words, the a(n)-th run of differences of odd primes has length > 1.

Examples

			Primes 54 to 57 are {251, 257, 263, 269}, with differences (6,6,6). This is the 49th run, and the first of length > 2.
		

Crossrefs

Positions of adjacent equal prime gaps are A064113.
Positions of adjacent unequal prime gaps are A333214.
Positions of terms > 1 in A333254, run-lengths A373821, firsts A335406.
A000040 lists the primes, differences A001223.
A027833 gives antirun lengths of odd primes, run-lengths A373820.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.

Programs

  • Mathematica
    Join@@Position[Length /@ Split[Differences[Select[Range[1000],PrimeQ]]] // Most,x_Integer?(#>1&)]

A373823 Half the sum of the n-th maximal run of first differences of odd primes.

Original entry on oeis.org

2, 2, 1, 2, 1, 2, 3, 1, 3, 2, 1, 2, 6, 1, 3, 2, 1, 3, 2, 3, 4, 2, 1, 2, 1, 2, 7, 2, 3, 1, 5, 1, 6, 2, 6, 1, 5, 1, 2, 1, 12, 2, 1, 2, 3, 1, 5, 9, 1, 3, 2, 1, 5, 7, 2, 1, 2, 7, 3, 5, 1, 2, 3, 4, 6, 2, 3, 4, 2, 4, 5, 1, 5, 1, 3, 2, 3, 4, 2, 1, 2, 6, 4, 2, 4, 2, 3
Offset: 1

Views

Author

Gus Wiseman, Jun 22 2024

Keywords

Comments

Halved run-sums of A001223.

Examples

			The odd primes are:
3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, ...
with first differences:
2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, ...
with runs:
(2,2), (4), (2), (4), (2), (4), (6), (2), (6), (4), (2), (4), (6,6), ...
with halved sums a(n).
		

Crossrefs

Halved run-sums of A001223.
For run-lengths we have A333254, run-lengths of run-lengths A373821.
Multiplying by two gives A373822.
A000040 lists the primes.
A027833 gives antirun lengths of odd primes (partial sums A029707).
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.
A373820 gives run-lengths of antirun-lengths of odd primes.

Programs

  • Mathematica
    Total/@Split[Differences[Select[Range[3,1000],PrimeQ]]]/2

A356221 Position of second appearance of 2n in the sequence of prime gaps A001223; if 2n does not appear at least twice, a(n) = -1.

Original entry on oeis.org

3, 6, 11, 72, 42, 47, 62, 295, 180, 259, 297, 327, 446, 462, 650, 1315, 1059, 1532, 4052, 2344, 3732, 3861, 8805, 7234, 4754, 2810, 4231, 14124, 5949, 9834, 17200, 10229, 19724, 25248, 15927, 30765, 42673, 28593, 24554, 50523, 44227, 44390, 29040, 89715, 47350
Offset: 1

Views

Author

Gus Wiseman, Aug 02 2022

Keywords

Comments

Prime gaps (A001223) are the differences between consecutive prime numbers. They begin: 1, 2, 2, 4, 2, 4, 2, 4, 6, ...

Crossrefs

The position of the first (instead of second) appearance of 2n is A038664.
Column k = 2 of A356222.
The position of the n-th appearance of 2n is A356223.
A001223 lists the prime gaps, reduced A028334.
A073491 lists numbers with gapless prime indices.
A274121 counts appearances of the n-th prime gap in those prior.
A356226 gives the lengths of maximal gapless intervals of prime indices.

Programs

  • Mathematica
    nn=1000;
    gaps=Differences[Array[Prime,nn]];
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    Table[Position[gaps,2*n][[2,1]],{n,mnrm[Select[Range[nn],Length[Position[gaps,2*#]]>=2&]]}]

A356222 Array read by antidiagonals upwards where A(n,k) is the position of the k-th appearance of 2n in the sequence of prime gaps A001223. If A001223 does not contain 2n at least k times, set A(n,k) = -1.

Original entry on oeis.org

2, 4, 3, 9, 6, 5, 24, 11, 8, 7, 34, 72, 15, 12, 10, 46, 42, 77, 16, 14, 13, 30, 47, 53, 79, 18, 19, 17, 282, 62, 91, 61, 87, 21, 22, 20, 99, 295, 66, 97, 68, 92, 23, 25, 26, 154, 180, 319, 137, 114, 80, 94, 32, 27, 28, 189, 259, 205, 331, 146, 121, 82, 124, 36, 29, 33
Offset: 1

Views

Author

Gus Wiseman, Aug 04 2022

Keywords

Comments

Prime gaps (A001223) are the differences between consecutive prime numbers. They begin: 1, 2, 2, 4, 2, 4, 2, 4, 6, ...
This is a permutation of the positive integers > 1.

Examples

			Array begins:
        k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8 k=9
  n=1:   2   3   5   7  10  13  17  20  26
  n=2:   4   6   8  12  14  19  22  25  27
  n=3:   9  11  15  16  18  21  23  32  36
  n=4:  24  72  77  79  87  92  94 124 126
  n=5:  34  42  53  61  68  80  82 101 106
  n=6:  46  47  91  97 114 121 139 168 197
  n=7:  30  62  66 137 146 150 162 223 250
  n=8: 282 295 319 331 335 378 409 445 476
  n=9:  99 180 205 221 274 293 326 368 416
For example, the positions in A001223 of appearances of 2*3 begin: 9, 11, 15, 16, 18, 21, 23, ..., which is row n = 3 (A320701).
		

Crossrefs

The row containing n is A028334(n).
Row n = 1 is A029707.
Row n = 2 is A029709.
Column k = 1 is A038664.
The column containing n is A274121(n).
Column k = 2 is A356221.
The diagonal A(n,n) is A356223.
A001223 lists the prime gaps.
A073491 lists numbers with gapless prime indices.
A356224 counts even divisors with gapless prime indices, complement A356225.

Programs

  • Mathematica
    gapa=Differences[Array[Prime,10000]];
    Table[Position[gapa,2*(k-n+1)][[n,1]],{k,6},{n,k}]

A378620 Lesser prime index of twin primes with nonsquarefree mean.

Original entry on oeis.org

2, 5, 7, 17, 20, 28, 35, 41, 43, 45, 49, 52, 57, 64, 69, 81, 83, 98, 109, 120, 140, 144, 152, 171, 173, 176, 178, 182, 190, 206, 215, 225, 230, 236, 253, 256, 262, 277, 286, 294, 296, 302, 307, 315, 318, 323, 336, 346, 373, 377, 390, 395, 405, 428, 430, 444
Offset: 1

Views

Author

Gus Wiseman, Dec 10 2024

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
This is a subset of A029707 (twin prime indices). The other twin primes are A068361, so A029707 is the disjoint union of A068361 and A378620.

Crossrefs

The lesser of twin primes is A001359, index A029707 (complement A049579).
The greater of twin primes is A006512, index A107770 (complement appears to be A168543).
A subset of A029707 (twin prime lesser indices).
Prime indices of the primes listed by A061368.
Indices of twin primes with squarefree mean are A068361.
A000040 lists the primes, differences A001223, (run-lengths A333254, A373821).
A005117 lists the squarefree numbers, differences A076259.
A006562 finds balanced primes.
A013929 lists the nonsquarefree numbers, differences A078147.
A014574 is the intersection of A006093 and A008864.
A038664 finds the first position of a prime gap of 2n.
A046933 counts composite numbers between primes.
A120327 gives the least nonsquarefree number >= n.

Programs

  • Mathematica
    Select[Range[100],Prime[#]+2==Prime[#+1]&&!SquareFreeQ[Prime[#]+1]&]
    PrimePi/@Select[Partition[Prime[Range[500]],2,1],#[[2]]-#[[1]]==2&&!SquareFreeQ[Mean[#]]&][[;;,1]] (* Harvey P. Dale, Jul 13 2025 *)

Formula

prime(a(n)) = A061368(n).

A284157 Least index k such that (Sum_{i=1..k} prime(i)) mod prime(k) = n.

Original entry on oeis.org

1, 8, 2, 4, 8094, 11, 5, 7, 9, 43, 16, 30, 12, 10, 134, 621, 2902940711, 32, 86124, 3097, 715, 83, 142034741, 14
Offset: 0

Views

Author

Paolo P. Lava, Mar 21 2017

Keywords

Comments

a(24) > 10^12. - Giovanni Resta, Mar 23 2017

Examples

			a(13) = 10 because the sum of the first 10 primes is 2 + 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 = 129 and 129 mod 29 = 13.
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local a,k,n; for n from 1 to q do a:=0; for k from 1 to q do a:=a+ithprime(k);
    if a mod ithprime(k)=n then print(k); break; fi; od; od; end: P(10^9);
  • Mathematica
    a[n_] := Block[{s = 2, p = 2, i = 1}, While[Mod[s, p] != n, i++; p = NextPrime@ p; s += p]; i]; a /@ Range[0, 15] (* Giovanni Resta, Mar 22 2017 *)

Extensions

a(0), a(16), a(18), a(22) from Giovanni Resta, Mar 22 2017

A066493 a(n) = least k such that f(k) = n, where f is the prime gaps function given by f(m) = prime(m+1)-prime(m) and prime(m) denotes the m-th prime, if k exists; 0 otherwise.

Original entry on oeis.org

1, 2, 0, 4, 0, 9, 0, 24, 0, 34, 0, 46, 0, 30, 0, 282, 0, 99, 0, 154, 0, 189, 0, 263, 0, 367, 0, 429, 0, 590, 0, 738, 0, 217, 0, 1183, 0, 3302, 0, 2191, 0, 1879, 0, 1831, 0, 7970, 0, 3077, 0, 3427
Offset: 1

Views

Author

Joseph L. Pe, Jan 03 2002

Keywords

Comments

Obviously, a(n) = 0 for every odd n except 1. From the list, it appears that a(n) is nonzero for every even n; is this true in general? That is, for each even n, are there primes which differ by n?

Examples

			a(6) = 9 since k = 9 is the smallest k making prime(k+1)-prime(k) = 6.
a(3) = 0 since no two consecutive primes differ by 3.
		

Crossrefs

Cf. A001223 (prime gaps), A038664.

Programs

  • Mathematica
    f[n_] := Prime[n + 1] - Prime[n]; g[n_] := Min[Select[Range[1, 10^4], f[ # ] == n &]]; Table[g[i], {i, 1, 50}]

Formula

a(2*n) = A038664(n). - Michel Marcus, Apr 29 2023

A088988 Least prime that begins a run of exactly 2n-1 primes between two consecutive prime-indexed primes.

Original entry on oeis.org

7, 19, 89, 463, 809, 1223, 619, 15727, 3767, 6907, 9109, 14197, 22109, 27103, 41057, 55009, 10937, 99559, 357829, 216649, 177797, 172213, 1040813, 327779, 375043, 219937, 423019, 1049177, 536281, 523571, 402769, 1155431, 2192123, 1792103
Offset: 1

Views

Author

Cino Hilliard, Oct 31 2003

Keywords

Examples

			5 and 11 are the 3rd and 5th primes; 7 begins a run of 1 primes.
17 and 31 are the 7rd and 11th primes; 19 begins a run of 3 primes.
		

Programs

  • PARI
    pipprimes(n,m) = { for(x=1,n, c=0; p1 = prime(prime(x)); p2 = prime(prime(x+1)); forprime(y=p1+2,p2-2,c++); if(c==m, forprime(y=p1+2, p2-2, print1(y","); ); ) ) }

Formula

a(n) = prime(1 + A000230(n)) = prime(1 + prime(A038664(n))).

Extensions

Extended and edited by T. D. Noe, Apr 14 2009

A181558 Index of first occurrence of 2n in A031883, or 0 if 2n never occurs in A031883 = first differences of lucky numbers A000959.

Original entry on oeis.org

1, 2, 6, 20, 31, 14, 126, 85, 36, 145, 140, 122, 376, 231, 162, 483, 692, 600, 993, 1188, 1106, 2440, 1080, 2814, 2586, 450, 2696, 3473, 4254, 4857, 5918, 2364, 4760, 4818, 21192, 13116, 19284, 14855, 12158, 31032, 18174, 15068, 35700, 56846, 27367, 33716, 13736, 16746, 103292, 8541
Offset: 1

Views

Author

M. F. Hasler, Oct 31 2010

Keywords

Examples

			a(1)=1 is the least index i such that A000959(i)+2*1 = A000959(i+1), since A000959(1) = 1 and A000959(2) = 3.
a(2)=2 is the least index i such that A000959(i)+2*2 = A000959(i+1), since A000959(2) = 3 and A000959(3) = 7.
a(3)=6 is the least index i such that A000959(i)+2*3 = A000959(i+1); indeed A000959(7) - A000959(6) = 21 - 15 is the earliest gap of 6 in A000959.
		

Crossrefs

Cf. A038664 (analog for primes).

Programs

  • PARI
    a(n) = for( i=1,1e9, A031883[i]==2*n & return(i)) /* will issue an error if 2n is not found in A031883 */

Formula

a(n) = min { k | A031883(k)=2n } = min { k | A000959(k+1)=A000959(k)+2n }.

Extensions

a(20)-a(50) from Nathaniel Johnston, Nov 15 2010

A219611 a(n) is the smallest omega(A061214(k)) sampled over all indices k of prime gaps prime(k+1) - prime(k) = 2n, where omega = A001221.

Original entry on oeis.org

1, 3, 5, 9, 11, 14, 14, 21
Offset: 1

Views

Author

Naohiro Nomoto, Apr 12 2013

Keywords

Comments

The example demonstrates that the minimum order of the set of primes represented by all composites in the prime gap 2*n is not necessarily obtained by using the smallest prime(k) (that would be A038664).

Examples

			For n=8: p_283-p_282 = p_296-p_295 = 2*8=16; omega(A061214(282)) > omega(A061214(295)); omega(A061214(295)) = 21; so a(8) = 21.
		

Crossrefs

Cf. A052297.
Previous Showing 41-50 of 51 results. Next