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.

A091088 a(n) is the minimum odd number that must be appended to n to form a prime.

This page as a plain text file.
%I A091088 #22 Jun 08 2025 16:15:42
%S A091088 3,1,3,1,1,3,1,1,3,7,1,3,7,1,9,1,3,3,1,1,11,1,3,3,1,1,3,1,1,3,7,1,17,
%T A091088 1,7,3,7,3,3,7,1,9,1,1,3,7,1,9,7,1,3,13,1,23,1,7,3,1,7,3,1,3,11,1,1,3,
%U A091088 1,3,3,1,1,9,7,3,3,1,1,3,7,7,9,1,1,9,19,3,3,7,1,23,7,1,9,7,1,3,7,1,3,1,9,3
%N A091088 a(n) is the minimum odd number that must be appended to n to form a prime.
%C A091088 This is really a duplicate of A068695. See that entry for existence proof. - _N. J. A. Sloane_, Nov 07 2020
%C A091088 Note that of course a(n) is not allowed to begin with 0.
%C A091088 Many numbers become prime by appending a one-digit odd number. Some numbers (such as 20, 32, 51, etc.) require a 2 digit odd number (A032352 has these). In the first 100,000 values of n there are only 22 that require a 3 digit odd number (A091089). There probably are some values that require odd numbers of 4 or more digits, but these are likely to be very large.
%H A091088 Iain Fox, <a href="/A091088/b091088.txt">Table of n, a(n) for n = 0..10000</a>
%H A091088 <a href="/index/Pri#piden">Index entries for primes involving decimal expansion of n</a>
%e A091088 a(0)=3 because 3 is the minimum odd number which when appended to 0 forms a prime (03 = 3 = prime).
%e A091088 a(20)=11 because 11 is the minimum odd number which when appended to 20 forms a prime (201, 203, 205, 207, 209 are all nonprime, 2011 is prime).
%t A091088 Table[Block[{k = 1}, While[! PrimeQ@ FromDigits[IntegerDigits[n] ~Join~ IntegerDigits[k]], k += 2]; k], {n, 0, 101}] (* _Michael De Vlieger_, Nov 24 2017 *)
%o A091088 (PARI) a(n) = forstep(x=1, +oo, 2, if(isprime(eval(concat(Str(n), x))), return(x))) \\ _Iain Fox_, Nov 23 2017
%Y A091088 Essentially the same as A068695, which is the main entry for this sequence.
%Y A091088 Cf. A032352 (a(n) requires at least a 2 digit odd number), A091089 (a(n) requires at least a 3 digit odd number).
%K A091088 base,easy,nonn,less
%O A091088 0,1
%A A091088 _Chuck Seggelin_, Dec 18 2003