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

A079889 Primes indexed by A078515; i.e., primes which start record runs of consecutive primes with distinct first differences.

Original entry on oeis.org

2, 17, 83, 113, 491, 1367, 1801, 5869, 15919, 34883, 70639, 70657, 214867, 2515871, 3952733, 13010143, 30220163, 60155567, 69931991, 203674907, 1092101119, 1363592621, 1363592677, 2124140323, 23024158649, 30282104173, 196948778371
Offset: 1

Views

Author

N. J. A. Sloane, Jan 07 2003

Keywords

Examples

			2, 17 and 83 are in the sequence because the 3 consecutive primes 2,3,5 have distinct first differences 1,2, the 4 consecutive primes 17,19,23,29 have distinct differences 2,4,6, and the 5 consecutive primes 83,89,97,101,103 have distinct differences 6,8,4,2.
		

Crossrefs

Cf. A078515, A078516. Same as A079007 with duplicates removed.

Formula

a(n) = A078515(n)-th prime.

Extensions

More terms from Don Reble, Jan 15 2003
a(25)-a(27) from Donovan Johnson, Oct 23 2012

A079007 a(n) = smallest prime p_k such that the n successive differences between the primes p_k through p_(k+n) are all distinct.

Original entry on oeis.org

2, 2, 2, 17, 83, 113, 491, 1367, 1801, 5869, 15919, 34883, 70639, 70657, 214867, 214867, 2515871, 3952733, 13010143, 30220163, 60155567, 69931991, 203674907, 1092101119, 1363592621, 1363592677, 2124140323, 23024158649, 30282104173, 30282104173, 196948778371
Offset: 0

Views

Author

Labos Elemer, Jan 03 2002

Keywords

Examples

			a(0) = 2; a(1) = 2 from {2,3} with a single difference 1; a(2) = 2 from {2,3,5}, with two distinct differences 1, 2.
a(5) = p_30 = 113 because 113 is followed by 127, 131, 137, 139, 149, with 5 different differences: 14, 4, 6, 2, 10; and no smaller prime has this property.
		

Crossrefs

Cf. A001223, A068843, A053597, A078515. Different from A079889.

Programs

  • Mathematica
    f[k_, n_] := Block[{p = Table[ Prime[i], {i, k, k + n - 1}]}, Length[ Union[Drop[p, 1] - Drop[p, -1]]]]; k = 1; Do[ While[ f[k, n] != n - 1, k++ ]; Print[ Prime[k]], {n, 1, 22}]

Extensions

Edited by Robert G. Wilson v and N. J. A. Sloane, Jan 05 2002
More terms from Don Reble, Jan 15 2003
a(27)-a(30) from Donovan Johnson, Oct 23 2012

A053597 Let prime(i) = i-th prime (A000040), let d(i) = prime(i+1)-prime(i) (A001223); a(n) = number of distinct numbers among d(n), d(n+1), d(n+2), ... before first duplicate is encountered.

Original entry on oeis.org

2, 1, 2, 2, 2, 2, 3, 3, 2, 3, 3, 2, 3, 2, 1, 2, 3, 3, 3, 3, 2, 3, 4, 3, 2, 2, 2, 3, 2, 5, 4, 3, 2, 3, 2, 1, 2, 2, 1, 3, 2, 3, 2, 3, 2, 1, 3, 2, 3, 4, 3, 3, 2, 1, 1, 2, 3, 5, 4, 4, 4, 3, 2, 5, 5, 5, 4, 5, 4, 3, 2, 2, 1, 2, 3, 3, 2, 4, 3, 2, 2, 4, 3, 2, 3, 4, 3, 2, 4, 3, 3, 2, 2, 6, 5, 4, 5, 4, 3, 2, 2, 1, 2, 3, 2
Offset: 1

Views

Author

N. J. A. Sloane, Jan 07 2003

Keywords

Examples

			The d sequence starting at prime(7) = 17 is d(7) = 2, d(8) = 4, d(9) = 6, d(10) = 2, with three numbers before the first duplication, so a(7) = 3.
		

Crossrefs

A078515 gives RECORDS transform of this sequence. See also A079007.

Programs

  • Maple
    P:= [seq(ithprime(i),i=1..1000)]:
    G:= P[2..-1]-P[1..-2]:
    R:= Vector(990):
    for i from 1 to 990 do
      for k from 1 while nops(convert(G[i..i+k-1],set))=k do od:
      R[i]:= k-1;
    od:
    convert(R,list);
  • Mathematica
    f[n_] := Block[{k = 1}, While[p = Table[ Prime[i], {i, n, n + k}]; Length[ Union[ Drop[p, 1] - Drop[p, -1]]] == k, k++ ]; k - 1]; Table[ f[n], {n, 1, 105}]

Extensions

More terms from Robert G. Wilson v, Jan 07 2002
Showing 1-3 of 3 results.