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.

A112394 Smallest prime obtained by appending 3's to k, where k runs through the numbers not divisible by 3, or -1 if no such prime exists.

This page as a plain text file.
%I A112394 #43 Jun 20 2024 02:42:25
%S A112394 13,23,43,53,73,83,103,113,1333333333333333,1433,163,173,193,20333,
%T A112394 223,233,2533333333,263,283,293,313,323333,3433,353,373,383
%N A112394 Smallest prime obtained by appending 3's to k, where k runs through the numbers not divisible by 3, or -1 if no such prime exists.
%C A112394 Next term is 40 followed by 483 3's, and is too large to display here (see the b-file).
%H A112394 Toshitaka Suzuki, <a href="/A112394/b112394.txt">Table of n, a(n) for n = 1..273</a> (terms 1..200 from Harvey P. Dale)
%e A112394 For k = 1, we get the prime 13.
%e A112394 For k = 13, we get the prime 1333333333333333 (the smaller numbers 133,1333,13333 etc. are not primes).
%e A112394 For k = 4070 and 9287, no such prime exists, so we get -1 for the value. Compare A372056. - _Toshitaka Suzuki_, Mar 30 2024
%t A112394 sp3[n_]:=Module[{idn=IntegerDigits[n],k=1},While[!PrimeQ[FromDigits[ Join[ idn, PadRight[ {},k,3]]]],k++];FromDigits[Join[idn,PadRight[{},k,3]]]]; sp3/@Drop[Range[40],{3,-1,3}] (* _Harvey P. Dale_, Jul 11 2017 *)
%Y A112394 See A372056 for another version.
%Y A112394 Cf. A001651, A030431, A112386.
%K A112394 nonn,base
%O A112394 1,1
%A A112394 _Parthasarathy Nambi_, Dec 05 2005
%E A112394 More terms from Lambert Herrgesell (zero815(AT)googlemail.com), Dec 09 2005
%E A112394 Edited by _N. J. A. Sloane_, Apr 24 2024. (Escape clause added to definition at the suggestion of _Toshitaka Suzuki_, Mar 30 2024. See also A372056.)