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

A027833 Distances between successive 2's in sequence A001223 of differences between consecutive primes.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 3, 6, 2, 5, 2, 6, 2, 2, 4, 3, 5, 3, 4, 5, 12, 2, 6, 9, 6, 5, 4, 3, 4, 20, 2, 2, 4, 4, 19, 2, 3, 2, 4, 8, 11, 5, 3, 3, 3, 10, 5, 4, 2, 17, 3, 6, 3, 3, 9, 9, 2, 6, 2, 6, 5, 6, 2, 3, 2, 3, 9, 4, 7, 3, 7, 20, 4, 7, 6, 5, 3, 7, 3, 20, 2, 14, 4, 10, 2, 3, 6, 4, 2, 2, 7, 2, 6, 3
Offset: 1

Views

Author

Jean-Marc MALASOMA (Malasoma(AT)entpe.fr)

Keywords

Comments

a(n) = number of primes p such that A014574(n) < p < A014574(n+1). - Thomas Ordowski, Jul 20 2012
Conjecture: a(n) < log(A014574(n))^2. - Thomas Ordowski, Jul 21 2012
Conjecture: All positive integers are represented in this sequence. This is verified up to 184, by searching up to prime indexes of ~128000000. The rate of filling-in the smallest remaining gap among the integers, and the growth in the maximum value found, both slow down considerably relative to a fixed quantity of twin prime incidences examined in each pass. The maximum value found was 237. - Richard R. Forberg, Jul 28 2016
All positive integers below 312 are in this sequence. - Charles R Greathouse IV, Aug 01 2016
From Gus Wiseman, Jun 11 2024: (Start)
Also the length of the n-th maximal antirun of prime numbers > 3, where an antirun is an interval of positions at which consecutive terms differ by more than 2. These begin:
5
7 11
13 17
19 23 29
31 37 41
43 47 53 59
61 67 71
73 79 83 89 97 101
(End)

Crossrefs

First differences of A029707 and A155752 = A029707 - 1. M. F. Hasler, Jul 24 2012
Positions of first appearances are A373401, sorted A373402.
Functional neighbors: A001359, A006512, A251092 or A175632, A373127 (firsts A373128, sorted A373200), A373403, A373405, A373409.
A000040 lists the primes, differences A001223.
A002808 lists the composite numbers, differences A073783.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.

Programs

  • Maple
    A027833 := proc(n)
        local plow,phigh ;
        phigh := A001359(n+1) ;
        plow := A001359(n) ;
        numtheory[pi](phigh)-numtheory[pi](plow) ;
    end proc:
    seq(A027833(n),n=1..100) ; # R. J. Mathar, Jan 20 2025
  • Mathematica
    Differences[Flatten[Position[Differences[Prime[Range[500]]],2]]] (* Harvey P. Dale, Nov 17 2018 *)
    Length/@Split[Select[Range[4,10000],PrimeQ[#]&],#1+2!=#2&]//Most (* Gus Wiseman, Jun 11 2024 *)
  • PARI
    n=1; p=5; forprime(q=7,1e3, if(q-p==2, print1(n", "); n=1, n++); p=q) \\ Charles R Greathouse IV, Aug 01 2016
  • Sage
    def A027833(n) :
       a = [ ]
       st = 2
       for i in (3..n) :
          if (nth_prime(i+1)-nth_prime(i) == 2) :
             a.append(i-st)
             st = i
       return(a)
    A027833(496) # Jani Melik, May 15 2014
    

A373401 Least k such that the k-th maximal antirun of prime numbers > 3 has length n. Position of first appearance of n in A027833. The sequence ends if no such antirun exists.

Original entry on oeis.org

1, 2, 4, 6, 10, 8, 69, 40, 24, 46, 41, 21, 140, 82, 131, 210, 50, 199, 35, 30, 248, 192, 277, 185, 458, 1053, 251, 325, 271, 645, 748, 815, 811, 1629, 987, 826, 1967, 423, 1456, 2946, 1109, 406, 1870, 1590, 3681, 2920, 3564, 6423, 1426, 5953, 8345, 12687, 6846
Offset: 1

Views

Author

Gus Wiseman, Jun 09 2024

Keywords

Comments

The sorted version is A373402.
For this sequence, we define an antirun to be an interval of positions at which consecutive primes differ by at least 3.

Examples

			The maximal antiruns of prime numbers > 3 begin:
    5
    7  11
   13  17
   19  23  29
   31  37  41
   43  47  53  59
   61  67  71
   73  79  83  89  97 101
  103 107
  109 113 127 131 137
  139 149
  151 157 163 167 173 179
The a(n)-th rows are:
     5
     7   11
    19   23   29
    43   47   53   59
   109  113  127  131  137
    73   79   83   89   97  101
  2269 2273 2281 2287 2293 2297 2309
  1093 1097 1103 1109 1117 1123 1129 1151
   463  467  479  487  491  499  503  509  521
For example, (19, 23, 29) is the first maximal antirun of length 3, so a(3) = 4.
		

Crossrefs

For composite instead of prime we have A073051.
For runs instead of antiruns we have the triple (4,2,1), firsts of A251092.
For squarefree instead of prime we have A373128, firsts of A373127.
The sorted version is A373402.
A000040 lists the primes, differences A001223.
A002808 lists the composite numbers, differences A073783.
A046933 counts composite numbers between primes.

Programs

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

A373404 Sum of the n-th maximal antirun of composite numbers differing by more than one.

Original entry on oeis.org

18, 9, 36, 15, 54, 21, 46, 25, 26, 27, 90, 33, 34, 35, 74, 39, 126, 45, 94, 49, 50, 51, 106, 55, 56, 57, 180, 63, 64, 65, 134, 69, 216, 75, 76, 77, 158, 81, 166, 85, 86, 87, 178, 91, 92, 93, 94, 95, 194, 99, 306, 105, 324, 111, 226, 115, 116, 117, 118, 119
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The length of this antirun is given by A373403.
An antirun of a sequence (in this case A002808) is an interval of positions at which consecutive terms differ by more than one.

Examples

			Row sums of:
   4   6   8
   9
  10  12  14
  15
  16  18  20
  21
  22  24
  25
  26
  27
  28  30  32
  33
  34
  35
  36  38
  39
  40  42  44
		

Crossrefs

Partial sums are a subset of A053767 (partial sums of composite numbers).
Functional neighbors: A005381, A054265, A068780, A373403, A373405, A373411, A373412.
A000040 lists the primes, differences A001223.
A002808 lists the composite numbers, differences A073783.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.

Programs

  • Mathematica
    Total/@Split[Select[Range[100],CompositeQ],#1+1!=#2&]//Most

A373406 Sum of the n-th maximal run of odd primes differing by two.

Original entry on oeis.org

15, 24, 36, 23, 60, 37, 84, 47, 53, 120, 67, 144, 79, 83, 89, 97, 204, 216, 113, 127, 131, 276, 300, 157, 163, 167, 173, 360, 384, 396, 211, 223, 456, 233, 480, 251, 257, 263, 540, 277, 564, 293, 307, 624, 317, 331, 337, 696, 353, 359, 367, 373, 379, 383
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The length of this run is given by A251092.
For this sequence we define a run to be an interval of positions at which consecutive terms differ by two. Normally, a run has consecutive terms differing by one, but odd prime numbers already differ by at least two.
Contains A054735 (sums of twin prime pairs) without its first two terms and A007510 (non-twin primes) as subsequences. - R. J. Mathar, Jun 07 2024

Examples

			Row-sums of:
   3   5   7
  11  13
  17  19
  23
  29  31
  37
  41  43
  47
  53
  59  61
  67
  71  73
  79
  83
  89
  97
		

Crossrefs

The partial sums are a subset of A071148 (partial sums of odd primes).
Functional neighbors: A025584, A054265, A067774, A251092 (or A175632), A373405, A373413, A373414.
A000040 lists the primes, differences A001223.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.

Programs

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

A373412 Sum of the n-th maximal antirun of nonsquarefree numbers differing by more than one.

Original entry on oeis.org

12, 99, 52, 180, 93, 49, 335, 279, 156, 629, 99, 540, 237, 245, 125, 521, 567, 450, 963, 340, 347, 728, 1386, 1080, 1637, 243, 244, 1511, 1610, 555, 852, 1171, 2142, 960, 985, 1689, 343, 1042, 351, 1068, 724, 732, 1116, 1905, 1980, 2898, 424, 2161, 3150, 2339
Offset: 1

Views

Author

Gus Wiseman, Jun 06 2024

Keywords

Comments

The length of this antirun is given by A373409.
An antirun of a sequence (in this case A013929) is an interval of positions at which consecutive terms differ by more than one.

Examples

			Row-sums of:
   4   8
   9  12  16  18  20  24
  25  27
  28  32  36  40  44
  45  48
  49
  50  52  54  56  60  63
  64  68  72  75
  76  80
  81  84  88  90  92  96  98
  99
		

Crossrefs

The partial sums are a subset of A329472.
Functional neighbors: A068781, A373404, A373405, A373409, A373410, A373411, A373414.
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, first differences A078147.

Programs

  • Mathematica
    Total/@Split[Select[Range[100],!SquareFreeQ[#]&],#1+1!=#2&]//Most

A373411 Sum of the n-th maximal antirun of squarefree numbers differing by more than one.

Original entry on oeis.org

1, 2, 8, 6, 17, 24, 14, 72, 22, 78, 30, 64, 34, 72, 38, 80, 42, 89, 263, 58, 120, 127, 66, 136, 70, 144, 151, 78, 161, 168, 86, 360, 94, 293, 102, 208, 106, 216, 110, 224, 114, 233, 241, 379, 130, 264, 271, 138, 280, 142, 288, 600, 312, 158, 648, 166, 510, 351
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The length of this antirun is given by A373127.
An antirun of a sequence (in this case A005117) is an interval of positions at which consecutive terms differ by more than one.

Examples

			Row-sums of:
   1
   2
   3  5
   6
   7 10
  11 13
  14
  15 17 19 21
  22
  23 26 29
  30
  31 33
  34
  35 37
  38
  39 41
  42
  43 46
  47 51 53 55 57
		

Crossrefs

The partial sums are a subset of A173143.
Functional neighbors: A007674, A373127 (firsts A373128, sorted firsts A373200), A373404, A373405, A373408, A373412, A373413.
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, first differences A078147.

Programs

  • Mathematica
    Total/@Split[Select[Range[100],SquareFreeQ],#1+1!=#2&]//Most

A373820 Run-lengths (differing by 0) of antirun-lengths (differing by > 2) of odd primes.

Original entry on oeis.org

2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Jun 22 2024

Keywords

Comments

Run-lengths of the version of A027833 with 1 prepended.

Examples

			The antiruns 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  83  89  97 101
 103 107
 109 113 127 131 137
 139 149
 151 157 163 167 173 179
 181 191
 193 197
 199 211 223 227
 229 233 239
 241 251 257 263 269
 271 277 281
with lengths:
1, 1, 2, 2, 3, 3, 4, 3, 6, 2, 5, 2, 6, 2, 2, ...
with runs:
  1  1
  2  2
  3  3
  4
  3
  6
  2
  5
  2
  6
  2  2
  4
  3
  5
  3
  4
with lengths a(n).
		

Crossrefs

Run-lengths of A027833 (if we prepend 1), partial sums A029707.
For runs we have A373819, run-lengths of A251092.
Positions of first appearances are A373827, sorted A373826.
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],#2-#1>2&]//Most]//Most

A373822 Sum of the n-th maximal run of first differences of odd primes.

Original entry on oeis.org

4, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 12, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 12, 4, 12, 2, 10, 2, 4, 2, 24, 4, 2, 4, 6, 2, 10, 18, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 12, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4, 2, 4
Offset: 1

Views

Author

Gus Wiseman, Jun 22 2024

Keywords

Comments

Run-sums of A001223. For run-lengths instead of run-sums we have A333254.

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 sums a(n).
		

Crossrefs

Run-sums of A001223.
For run-lengths we have A333254, run-lengths of run-lengths A373821.
Dividing by two gives A373823.
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]]]

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]}]

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
Showing 1-10 of 14 results. Next