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.

A375548 a(n) is the least prime number of the form n mod (10^k) for some k > 0, or 0 if no such prime number exists.

This page as a plain text file.
%I A375548 #5 Sep 20 2024 05:48:12
%S A375548 0,0,2,3,0,5,0,7,0,0,0,11,2,3,0,5,0,7,0,19,0,0,2,3,0,5,0,7,0,29,0,31,
%T A375548 2,3,0,5,0,7,0,0,0,41,2,3,0,5,0,7,0,0,0,0,2,3,0,5,0,7,0,59,0,61,2,3,0,
%U A375548 5,0,7,0,0,0,71,2,3,0,5,0,7,0,79,0
%N A375548 a(n) is the least prime number of the form n mod (10^k) for some k > 0, or 0 if no such prime number exists.
%p A375548 mycat := (n, k) -> parse(cat(convert(n, string), convert(k, string))):
%p A375548 b10digs := n -> max(1, 1 + ilog10(n)): b10cat := (a, b) -> b + a * b10digs(b):
%p A375548 b10parts := p -> local j; [seq(irem(p, 10^(j+1)), j = 0..b10digs(p)-1)]:
%p A375548 b10primes := p -> local j; select(isprime, b10parts(p)):
%p A375548 b10maxprime := proc(n) max(b10primes(n)); ifelse(% = -infinity, 0, %) end: # A331097
%p A375548 b10minprime := proc(n) min(b10primes(n)); ifelse(% =  infinity, 0, %) end:
%p A375548 seq(b10minprime(n), n = 0..80);
%Y A375548 Cf. A331097 (largest prime suffix).
%K A375548 nonn,base
%O A375548 0,3
%A A375548 _Peter Luschny_, Sep 20 2024