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.

A192326 Remainders of primes divided by odd numbers.

Original entry on oeis.org

0, 0, 0, 0, 2, 2, 4, 4, 6, 10, 10, 14, 16, 16, 18, 22, 26, 26, 30, 32, 32, 36, 38, 42, 48, 50, 50, 52, 52, 54, 5, 5, 7, 5, 11, 9, 11, 13, 13, 15, 17, 15, 21, 19, 19, 17, 25, 33, 33, 31, 31, 33, 31, 37, 39, 41, 43, 41, 43, 43, 41, 47, 57, 57, 55, 55, 65, 67, 73, 71, 71, 73, 77, 79, 81, 81, 83
Offset: 1

Views

Author

Pasi Airikka, Jun 28 2011

Keywords

Examples

			a(1) = prime(1) mod odd(1) = 2 mod 1 = 0; a(5) = prime(5) mod odd(5) = 11 mod 9 = 2.
		

Crossrefs

Cf. A131733.

Programs

  • MATLAB
    % n = number of computed terms of sequence
    for i=1:n,
        a(n) = mod(prime(i),odd(i)) ;
    end
    
  • Maple
    A192326 := proc(n) modp(ithprime(n),2*n-1) ; end proc:
    seq(A192326(n),n=1..80) ; # R. J. Mathar, Jul 13 2011
  • PARI
    a(n)=prime(n)%(2*n-1) \\ Charles R Greathouse IV, Jun 29 2011

Formula

a(n) = prime(n) mod (2n-1).