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.

A117322 a(n) = prime(n) modulo semiprime(n).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 3, 31, 3, 6, 5, 8, 7, 10, 10, 12, 14, 15, 17, 18, 20, 23, 24, 21, 22, 23, 26, 36, 38, 43, 44, 43, 40, 42, 45, 48, 52, 57, 58, 62, 60, 63, 58, 69, 80, 82, 83, 78, 81, 82, 90, 91, 94, 92, 93, 94, 96, 96, 99, 106, 109, 110, 112, 125, 128, 134, 135
Offset: 1

Views

Author

Jonathan Vos Post, Mar 08 2006

Keywords

Examples

			a(1) = 2 mod 4 = 2.
a(2) = 3 mod 6 = 3.
a(3) = 5 mod 9 = 5.
a(4) = 7 mod 10 = 7.
a(5) = 11 mod 14 = 11.
		

Crossrefs

Programs

  • Mathematica
    SemiPrimePi[n_] := Sum[PrimePi[n/Prime@i] - i + 1, {i, PrimePi@Sqrt@n}]; SemiPrime[n_] := Block[{e = Floor[Log[2, n] + 1], a, b}, a = 2^e; Do[b = 2^p; While[SemiPrimePi[a] < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; Table[ Mod[Prime@n, SemiPrime@n], {n, 70}] (* Robert G. Wilson v, May 01 2006 *)
    Module[{nn=300,sprs},sprs=Select[Range[nn],PrimeOmega[#]==2&];Mod[ #[[1]],#[[2]]]&/@Thread[{Prime[Range[Length[sprs]]],sprs}]] (* Harvey P. Dale, Nov 21 2021 *)

Formula

a(n) = A000040(n) modulo A001358(n).