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.

A261468 a(n) = prime(n+2) mod prime(n).

Original entry on oeis.org

1, 1, 1, 6, 6, 6, 6, 10, 8, 8, 10, 6, 6, 10, 12, 8, 8, 10, 6, 8, 10, 10, 14, 12, 6, 6, 6, 6, 18, 18, 10, 8, 12, 12, 8, 12, 10, 10, 12, 8, 12, 12, 6, 6, 14, 24, 16, 6, 6, 10, 8, 12, 16, 12, 12, 8, 8, 10, 6, 12, 24, 18, 6, 6, 18, 20, 16, 12, 6, 10, 14, 14, 12
Offset: 1

Views

Author

Altug Alkan, Aug 20 2015

Keywords

Examples

			a(3) = 11 mod 5 = 1.
		

Crossrefs

Cf. A031131.

Programs

  • Magma
    [NthPrime(n+2) mod NthPrime(n): n in [1..80]]; // Vincenzo Librandi, Aug 20 2015
  • Mathematica
    a[n_]:=PowerMod[Prime[n + 2], 1, Prime[n]]; Table[a[n], {n, 80}] (* Vincenzo Librandi, Aug 20 2015 *)
    Mod[#[[3]],#[[1]]]&/@Partition[Prime[Range[80]],3,1] (* Harvey P. Dale, Mar 14 2020 *)
  • PARI
    first(m)=vector(m,i,prime(i+2)% prime(i)); \\ Anders Hellström, Aug 20 2015
    

Formula

a(n) = A031131(n) = A075527(n) for n>3. - Alois P. Heinz, Aug 20 2015