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
    

A373821 Run-lengths of run-lengths of first differences of odd primes.

Original entry on oeis.org

1, 11, 1, 19, 1, 1, 1, 5, 1, 6, 1, 16, 1, 27, 1, 3, 1, 1, 1, 6, 1, 9, 1, 29, 1, 2, 1, 18, 1, 1, 1, 5, 1, 3, 1, 17, 1, 19, 1, 30, 1, 17, 1, 46, 1, 17, 1, 27, 1, 30, 1, 5, 1, 36, 1, 41, 1, 10, 1, 31, 1, 44, 1, 4, 1, 14, 1, 6, 1, 2, 1, 32, 1, 13, 1, 17, 1, 5
Offset: 1

Views

Author

Gus Wiseman, Jun 22 2024

Keywords

Comments

Run-lengths of A333254.
The first term other than 1 at an odd positions is at a(101) = 2.
Also run-lengths (differing by 0) of run-lengths (differing by 0) of run-lengths (differing by 1) of composite numbers.

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 run-lengths:
2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, ...
with run-lengths a(n).
		

Crossrefs

Run-lengths of run-lengths of A046933(n) = A001223(n) - 1.
Run-lengths of A333254.
A000040 lists the primes.
A001223 gives differences of consecutive primes.
A027833 gives antirun lengths of odd primes (partial sums A029707).
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.
A373820 gives run-lengths of antirun-lengths of odd primes.
For prime runs: A001359, A006512, A025584, A067774, A373406.
For composite runs: A005381, A008864, A054265, A176246, A251092, A373403.

Programs

  • Mathematica
    Length/@Split[Length /@ Split[Differences[Select[Range[3,1000],PrimeQ]]]//Most]//Most

A373405 Sum of the n-th maximal antirun of odd primes differing by more than two.

Original entry on oeis.org

3, 5, 18, 30, 71, 109, 202, 199, 522, 210, 617, 288, 990, 372, 390, 860, 701, 1281, 829, 1194, 1645, 4578, 852, 2682, 4419, 3300, 2927, 2438, 1891, 2602, 14660, 1632, 1650, 3378, 3480, 18141, 2052, 3121, 2112, 4310, 8922, 13131, 6253, 3851, 3889, 3929, 13788
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The length of this run is given by A027833 (except initial term).
An antirun of a sequence (in this case A000040\{2}) is an interval of positions at which consecutive terms differ by more than one.

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 101
		

Crossrefs

The partial sums are a subset of A071148 (partial sums of odd primes).
Functional neighbors: A001359, A006512, A027833 (partial sums A029707), A373404, A373406, A373411, A373412.
A000040 lists the primes, differences A001223.
A002808 lists the composite numbers, differences A073783.

Programs

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

A373413 Sum of the n-th maximal run of squarefree numbers.

Original entry on oeis.org

6, 18, 21, 42, 17, 19, 66, 26, 90, 102, 114, 126, 93, 51, 53, 55, 174, 123, 198, 210, 147, 234, 165, 258, 89, 91, 282, 97, 306, 318, 330, 342, 237, 245, 127, 390, 267, 414, 426, 291, 149, 151, 309, 474, 161, 163, 498, 170, 347, 534, 546, 558, 381, 582, 197
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The length of this run is given by A120992.
A run of a sequence (in this case A005117) is an interval of positions at which consecutive terms differ by 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  58  59
		

Crossrefs

The partial sums are a subset of A173143.
Functional neighbors: A054265, A072284, A120992, A373406, A373411, A373414, A373415.
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]}]

A373414 Sum of the n-th maximal run of nonsquarefree numbers differing by one.

Original entry on oeis.org

4, 17, 12, 16, 18, 20, 49, 55, 32, 36, 40, 89, 147, 52, 54, 56, 60, 127, 68, 72, 151, 161, 84, 88, 90, 92, 96, 297, 104, 108, 112, 233, 241, 375, 128, 132, 271, 140, 144, 295, 150, 305, 156, 160, 162, 164, 337, 343, 351, 180, 184, 377, 192, 196, 198, 200, 204
Offset: 1

Views

Author

Gus Wiseman, Jun 06 2024

Keywords

Comments

The length of this run is given by A053797.
A run of a sequence (in this case A013929) is an interval of positions at which consecutive terms differ by one.

Examples

			Row-sums of:
   4
   8   9
  12
  16
  18
  20
  24  25
  27  28
  32
  36
  40
  44  45
  48  49  50
		

Crossrefs

The partial sums are a subset of A329472.
Functional neighbors: A053797, A053806, A054265, A373406, 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

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

A373824 Sorted positions of first appearances 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, 11, 13, 29, 33, 45, 51, 57, 59, 69, 75, 105, 129, 211, 227, 301, 313, 321, 341, 407, 413, 447, 459, 537, 679, 709, 767, 1113, 1301, 1405, 1411, 1429, 1439, 1709, 1829, 1923, 2491, 2543, 2791, 2865, 3301, 3471, 3641, 4199, 4611, 5181, 5231, 6345, 6555
Offset: 1

Views

Author

Gus Wiseman, Jun 21 2024

Keywords

Comments

Sorted 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 sorted positions of first appearances a(n).
		

Crossrefs

Sorted firsts of A373819 (run-lengths of A251092).
The unsorted version is A373825.
For antiruns we have A373826, unsorted A373827.
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.
A373820 gives run-lengths of antirun-lengths, run-lengths of A027833.
For composite runs: A005381, A054265, A068780, A373403, A373404.

Programs

  • Mathematica
    t=Length/@Split[Length/@Split[Select[Range[3,10000],PrimeQ],#1+2==#2&]];
    Select[Range[Length[t]],FreeQ[Take[t,#-1],t[[#]]]&]
Showing 1-10 of 14 results. Next