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

A078866 The quadruples (d1,d2,d3,d4) with elements in {2,4,6} are listed in lexicographic order; for each quadruple, this sequence lists the smallest prime p >= 5 such that the differences between the 5 consecutive primes starting with p are (d1,d2,d3,d4), if such a prime exists.

Original entry on oeis.org

5, 17, 41, 29, 71, 149, 3299, 7, 13, 67, 1597, 19, 43, 12637, 1601, 23, 593, 31, 61, 3313, 157, 47, 601, 151, 251, 3301
Offset: 1

Views

Author

Labos Elemer, Dec 19 2002

Keywords

Comments

The 26 quadruples for which p exists are listed, in decimal form, in A078868.

Examples

			The term 12637 corresponds to the quadruple (4,6,6,6): 12637, 12641, 12647, 12653 and 12659 are consecutive primes.
		

Crossrefs

The quadruples are in A078868. The same primes, in increasing order, are in A078867. The sequences of primes corresponding to the 26 difference patterns are in A022006, A022007 and A078946-A078970. Cf. A001223.

Extensions

Edited by Dean Hickerson, Dec 20 2002

A078867 Sorted version of A078866.

Original entry on oeis.org

5, 7, 13, 17, 19, 23, 29, 31, 41, 43, 47, 61, 67, 71, 149, 151, 157, 251, 593, 601, 1597, 1601, 3299, 3301, 3313, 12637
Offset: 1

Views

Author

Labos Elemer, Dec 19 2002

Keywords

Comments

Each term is the smallest prime p >= 5 such that the differences between the 5 consecutive primes starting with p are (d1,d2,d3,d4), for some quadruple (d1,d2,d3,d4) with elements in {2,4,6}.

Examples

			The term 3299 corresponds to the quadruple (2,6,6,6): 3299, 3301, 3307, 3313, 3319 are consecutive primes.
		

Crossrefs

The quadruples are in A078868. The same primes, in lexicographic order of the quadruples, are in A078866. The sequences of primes corresponding to the 26 difference patterns are in A022006, A022007 and A078946-A078970. Cf. A001223.

Extensions

Edited by Dean Hickerson, Dec 20 2002

A078868 Decimal concatenations of the quadruples (d1,d2,d3,d4) with elements in {2,4,6} for which there exists a prime p >= 5 such that the differences between the 5 consecutive primes starting with p are (d1,d2,d3,d4).

Original entry on oeis.org

2424, 2462, 2466, 2642, 2646, 2664, 2666, 4242, 4246, 4264, 4624, 4626, 4662, 4666, 6246, 6264, 6266, 6424, 6426, 6462, 6466, 6626, 6642, 6646, 6662, 6664
Offset: 1

Views

Author

Labos Elemer, Dec 19 2002

Keywords

Examples

			4624 corresponds to the quadruple (4,6,2,4). It is in the sequence because the 5 consecutive primes 1597, 1601, 1607, 1609 and 1613 have differences (4,6,2,4).
		

Crossrefs

The least primes corresponding to the quadruples are in A078866. The same primes, in increasing order, are in A078867. The sequences of primes corresponding to the 26 difference patterns are in A022006 (for 2424), A022007 (for 4242) and A078946-A078970. The similarly defined quintuples are in A078870. Cf. A001223.

Programs

  • Mathematica
    With[{k = 4}, FromDigits /@ Select[Tuples[Range[2, 6, 2], k], Function[m, Count[Range[k, 10^k], n_ /; Times @@ Boole@ Map[PrimeQ, Prime@ n + Accumulate@ m] == 1] > 0]]] (* Michael De Vlieger, Mar 25 2017 *) (* or *)
    FromDigits /@ Union@ Select[ Partition[ Differences@ Prime@ Range[3, 2000], 4, 1], Max@ # <= 6 &] (* Giovanni Resta, Mar 25 2017 *)

Extensions

Edited by Dean Hickerson, Dec 20 2002

A078786 Period of cycle of the inventory sequence (as in A063850) starting with n.

Original entry on oeis.org

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

Views

Author

Joseph L. Pe, Jan 14 2003

Keywords

Comments

It can be proved that any inventory sequence ends in a cycle all of whose terms are <= 10^20. Conjecture: a(n) <= 4 for all n. It suffices to check this for all inventory sequences starting with n, where n <= 10^20.

Examples

			The inventory sequence starting with 1 is: 1, 11, 21, 1211, 3112, 132112, 311322, 232122, 421311, 14123113, 41141223, 24312213, 32142321, 23322114, 32232114, 23322114, .... which ends in the cycle 32232114, 23322114 of period 2. Hence a(1) = 2.
		

Crossrefs

Programs

  • Mathematica
    g[n_] := Module[{seen, r, d, l, i, t}, seen = {}; r = {}; d = IntegerDigits[n]; l = Length[d]; For[i = 1, i <= l, i++, t = d[[i]]; If[ ! MemberQ[seen, t], r = Join[r, IntegerDigits[Count[d, t]]]; r = Join[r, {t}]; seen = Append[seen, t]]]; FromDigits[r]];
    per[n_] := Module[{r, t, p1, p}, r = {}; t = g[n]; While[ ! MemberQ[r, t], r = Append[r, t]; t = g[t]]; r = Append[r, t]; p1 = Flatten[Position[r, t]]; p = p1[[2]] - p1[[1]]; p]; Table[per[i], {i, 1, 100}]
Showing 1-4 of 4 results.