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.

A182126 a(n) = prime(n)*prime(n+1) mod prime(n+2).

Original entry on oeis.org

1, 1, 2, 12, 7, 12, 1, 2, 16, 11, 40, 12, 24, 7, 13, 16, 48, 40, 12, 48, 40, 60, 15, 48, 12, 24, 12, 24, 125, 72, 60, 16, 120, 24, 48, 72, 40, 60, 72, 16, 120, 24, 24, 12, 168, 65, 64, 12, 24, 60, 16, 120, 96, 72, 72, 16, 48, 40, 12, 120, 29, 72, 12, 24, 252
Offset: 1

Views

Author

Alex Ratushnyak, Apr 13 2012

Keywords

Comments

Conjecture: for x>10^9, the most frequent value in a(n), n=0...x, has form 120*k.
Let b = prime(n+2) - prime(n) and c = prime(n+2) - prime(n+1). Conjecture: for n > 61, a(n) = b*c. This holds up to n = 9 * 10^16. - Charles R Greathouse IV, May 11 2012
With b and c as above, a(n) = b*c if and only if b*c < prime(n+2). Cramér's conjecture implies this is true for all sufficiently large n. - Robert Israel, Jun 19 2017

Examples

			(2*3) mod 5 = 1, (3*5) mod 7 = 1, (5*7) mod 11 = 2, (7*11) mod 13 = 12.
		

Crossrefs

Programs

  • Haskell
    a182126 n = a182126_list !! (n-1)
    a182126_list = zipWith3 (\p p' p'' -> mod (p * p') p'')
                      a000040_list (tail a000040_list) (drop 2 a000040_list)
    -- Reinhard Zumkeller, Apr 23 2012
    
  • Magma
    [NthPrime(n)*NthPrime(n+1) mod NthPrime(n+2): n in [1..70]]; // Vincenzo Librandi, Jun 20 2017
  • Maple
    P:= [seq(ithprime(i),i=1..102)]:
    seq(P[i]*P[i+1] mod P[i+2], i=1..100); # Robert Israel, Jun 19 2017
  • Mathematica
    Mod[#[[1]]#[[2]],#[[3]]]&/@Partition[Prime[Range[70]],3,1] (* Harvey P. Dale, Sep 30 2015 *)
  • PARI
    p=2;q=3;forprime(r=5,1e3,print1(p*q%r", ");p=q;q=r) \\ Charles R Greathouse IV, May 11 2012