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.

A337834 If k is the n-th number ending in 1,3,7, or 9, a(n) is the least prime > k ending in k.

This page as a plain text file.
%I A337834 #14 Apr 19 2023 21:52:13
%S A337834 11,13,17,19,211,113,317,419,421,223,127,229,131,233,137,139,241,443,
%T A337834 347,149,151,353,157,359,461,163,167,269,271,173,277,179,181,283,487,
%U A337834 389,191,193,197,199,5101,1103,5107,1109,2111,2113,1117,3119,3121,1123,4127,1129,2131,4133,2137,4139,2141
%N A337834 If k is the n-th number ending in 1,3,7, or 9, a(n) is the least prime > k ending in k.
%C A337834 a(n) exists by Dirichlet's theorem on primes in arithmetic progressions.
%H A337834 Robert Israel, <a href="/A337834/b337834.txt">Table of n, a(n) for n = 1..10000</a>
%H A337834 <a href="/index/Pri#piden">Index entries for primes involving decimal expansion of n</a>
%e A337834 For n=3 the third number ending in 1,3,7 or 9 is 7 and the least prime > 7 ending in 7 is a(3)=17.
%e A337834 For n=12 the 12th number ending in 1,3,7 or 9 is 29 and the least prime > 29 ending in 29 is a(12)=229.
%p A337834 f:= proc(n) local d, x;
%p A337834   d:= ilog10(n)+1;
%p A337834   for x from n + 10^d by 10^d do
%p A337834     if isprime(x) then return x fi
%p A337834   od
%p A337834 end proc:
%p A337834 map(f, [seq(seq(10*i+j, j=[1,3,7,9]),i=0..99)];
%Y A337834 Cf. A085821, A338715.
%K A337834 nonn,base
%O A337834 1,1
%A A337834 _Robert Israel_, Sep 24 2020