login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A326398 a(n) is the smallest k > 0 such that the concatenation prime(n)k is composite. 0
1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) can only be 1 or 2 for any n >= 1. It appears that there are many more primes for which k = 1 than those for which k = 2 (~ 91% of the first 10^7 primes have k = 1).
LINKS
FORMULA
a(n) = 2 if prime(n) is in A023237, else a(n) = 1. [corrected by Chai Wah Wu, Jul 06 2020]
EXAMPLE
a(1) = 1 because 21 is prime, a(2) = 2 because 31 is prime (as 3 is in A023237), and 32 is composite
MAPLE
P := proc (n)
if isprime(10*ithprime(n)+1) then return 2 else 1;
end if:
end proc;
P(50);
seq(P(k), k = 1 .. 50);
PROG
(PARI) a(n) = my(k=1, p=Str(prime(n))); while (isprime(eval(concat(p, Str(k)))), k++); k; \\ Michel Marcus, Jun 07 2020
CROSSREFS
Sequence in context: A319610 A288739 A111621 * A140195 A196564 A196563
KEYWORD
nonn,base
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)