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.

Showing 1-1 of 1 results.

A345403 Riesel problem in base 5: a(n) is the smallest k >= 0 such that (2*n)*5^k - 1 is prime, or -1 if no such k exists.

Original entry on oeis.org

4, 0, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 4, 1, 0, 0, 163, 1, 0, 1, 0, 0, 1, 0, 2, 5, 0, 2, 7, 0, 0, 5, 5, 0, 1, 0, 0, 1, 1, 0, 1, 0, 2058, 1, 0, 26, 5, 1, 0, 1, 0, 0, 3, 0, 0, 3, 0, 32, 17, 1, 2, 1, 3, 0, 3, 0, 8, 21, 0, 0, 1, 1, 4, 1, 0, 0, 1, 4, 0, 7, 1, 0, 1, 0
Offset: 1

Views

Author

Felix Fröhlich, Jun 18 2021

Keywords

Comments

a(346802/2) = a(173401) = -1 (see A273987).

Examples

			For n = 5: 10*5^k - 1 is composite for k = 0, 1, 2 and prime for k = 3. Since 3 is the smallest such k, a(5) = 3.
		

Crossrefs

Cf. A040081 (base 2), A343914 (base 3), A250205 (base 6).
Cf. A273987.

Programs

  • PARI
    a(n) = for(k=0, oo, if(ispseudoprime((2*n)*5^k-1), return(k)))
Showing 1-1 of 1 results.