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-44 of 44 results.

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

A162309 a(n) is the number of isolated primes up to the smaller component of the n-th twin prime pair.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 5, 6, 10, 10, 13, 13, 17, 17, 17, 19, 20, 23, 24, 26, 29, 39, 39, 43, 50, 54, 57, 59, 60, 62, 80, 80, 80, 82, 84, 101, 101, 102, 102, 104, 110, 119, 122, 123, 124, 125, 133, 136, 138, 138, 153, 154, 158, 159, 160, 167, 174, 174, 178, 178, 182, 185, 189, 189
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 01 2009

Keywords

Comments

Cardinality of the set of terms of A007510 which are smaller than A001359(n).

Examples

			a(1)=1 counts the isolated prime 2, which smaller than 3;
a(2)=1 counts the isolated prime 2, which is smaller than 5;
a(5)=2 counts the isolated primes 2 and 23, which are smaller than 29;
a(6)=3 counts 2, 23 and 37, which are smaller than 41.
		

Crossrefs

Programs

  • Maple
    read("transforms3") ; tp := BFILETOLIST("b001359.txt") ;
    A162309 := proc(n) global tp; a := 0 ; for j from 2 to op(n,tp)-1 do if isprime(j) then if ( j in tp ) or (j-2) in tp then ; else a :=a +1; fi; fi; od: a ; end:
    seq(A162309(n),n=1..130 ); # R. J. Mathar, Aug 29 2009
  • Mathematica
    A027833 =
    Differences[Flatten[Position[Differences[Prime[Range[500]]], 2]]];
    ReplacePart[Accumulate[Join[{2}, A027833 - 2]], 1 -> 1]
    (* Jean-François Alcover, Jan 23 2023, after Harvey P. Dale in A027833 *)

Formula

a(n+1) - a(n) = A027833(n) - 2, n > 1. [R. J. Mathar, Aug 29 2009]

Extensions

53 replaced with 54, 100 removed twice, etc., by R. J. Mathar, Aug 29 2009

A242459 Maximal differences of A029707.

Original entry on oeis.org

1, 2, 3, 4, 6, 12, 20, 24, 27, 29, 42, 54, 72, 75, 103, 128, 131, 151, 153, 162, 164, 181, 204, 208, 209, 211, 237, 265, 285, 286, 326, 335, 340, 356, 368, 392, 409, 432, 439, 441, 444, 446
Offset: 1

Views

Author

Jani Melik, May 15 2014

Keywords

Crossrefs

Programs

  • Mathematica
    nextLesserTwinPrime[p_Integer] := Block[{q = p + 2}, While[ NextPrime@ q - q > 2, q = NextPrime@ q]; q]; p = 2; q = 3; px = 1; qx = 2; mxd = 0; tpx = 0; lst = {}; While[p <
    5090000001, d = qx - px; If[ d > mxd, mxd = d; AppendTo[ lst, d]; Print@ d]; p = q; px = qx; q = nextLesserTwinPrime@ q; qx = PrimePi@ q; tpx++]; lst (* Robert G. Wilson v, May 21 2014 *)
  • Sage
    def A242459_list(n) :
       a = [ 1 ]
       st = 3
       for i in (4..n) :
          if (nth_prime(i+1)-nth_prime(i) == 2) :
             if i-st > a[len(a)-1] :
                a.append(i-st)
             st = i
       return(a)
    A242459_list(10^(5))

Formula

a(n) = primepi(next(A054691(n-1))) - primepi(A054691(n-1)) + 1 for n >= 2, where primepi = A000720 and next(k) is the least lesser of twin primes that is larger than k. - Amiram Eldar, May 19 2024

Extensions

a(20)-a(28) from Robert G. Wilson v, May 21 2014
a(29)-a(42) from Amiram Eldar, May 19 2024

A373828 Run-sums (differing by 0) of run-lengths (differing by 2) of odd primes.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 23 2024

Keywords

Comments

Run-sums of A251092.

Examples

			The odd primes are:
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}, ...
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, ...
with runs:
{3}, {2,2}, {1}, {2}, {1}, {2}, {1,1}, {2}, {1}, {2}, {1,1,1,1}, {2,2}, ...
with sums a(n).
		

Crossrefs

Run-sums of A251092.
The run-lengths (instead of run-sums) are A373819, firsts A373825, A373824.
A000040 lists the primes.
A001223 gives first differences of primes.
A027833 gives antirun-lengths of primes > 3 (prepended run-lengths A373820).
A046933 counts composite numbers between primes.
A071148 gives partial sums of odd primes.
A333254 gives run-lengths of first differences of primes.
A373821 gives run-lengths of run-lengths of first differences of odd primes.

Programs

  • Mathematica
    Total/@Split[Length /@ Split[Select[Range[3,10000],PrimeQ], #1+2==#2&]//Most]//Most
Previous Showing 41-44 of 44 results.