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

%I #57 Jul 06 2020 20:16:23

%S 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,

%T 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,

%U 1,2,1,1,2,1,1

%N a(n) is the smallest k > 0 such that the concatenation prime(n)k is composite.

%C 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).

%F a(n) = 2 if prime(n) is in A023237, else a(n) = 1. [corrected by _Chai Wah Wu_, Jul 06 2020]

%e a(1) = 1 because 21 is prime, a(2) = 2 because 31 is prime (as 3 is in A023237), and 32 is composite

%p P := proc (n)

%p if isprime(10*ithprime(n)+1) then return 2 else 1;

%p end if:

%p end proc;

%p P(50);

%p seq(P(k), k = 1 .. 50);

%o (PARI) a(n) = my(k=1, p=Str(prime(n))); while (isprime(eval(concat(p, Str(k)))), k++); k; \\ _Michel Marcus_, Jun 07 2020

%Y Cf. A000040, A023237.

%K nonn,base

%O 1,2

%A _David James Sycamore_, Jun 07 2020

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 24 19:52 EDT 2024. Contains 371963 sequences. (Running on oeis4.)