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.

A298866 Positions of primes p when all p and 4*p are arranged in increasing order.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 23, 24, 25, 27, 28, 30, 31, 32, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 47, 48, 49, 50, 52, 54, 55, 56, 58, 59, 60, 61, 62, 64, 65, 66, 67, 69, 70, 72, 73, 74, 76, 77, 78, 79, 80, 83, 84, 85, 86, 88
Offset: 1

Views

Author

Clark Kimberling, Apr 14 2018

Keywords

Examples

			The joint ranking begins with 2,3,5,7,8,11,12,13,17,19,20, as in A298865, so that ranks occupied by primes are 1,2,3,4,6,7,8,10,...
		

Crossrefs

Cf. A000040, A298866, A298867 (complement).

Programs

  • Mathematica
    z = 200; u = Prime[Range[z]]; w = Take[Union[u, 4 u], z]; (* A298865 *)
    p[n_] := If[MemberQ[u, w[[n]]], 0, 1];
    t = Table[p[n], {n, 1, z}];
    Flatten[Position[t, 0]]  (* A298866 *)
    Flatten[Position[t, 1]]  (* A298867 *)