The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A332265 a(n) is the number of prime numbers created when concatenating all the arrangements of the decimal integers from 0 to 3*n+4. 0
20, 3202, 2056675, 3500185228 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Only 4 and every third integer after 4 can create primes when concatenating the integer arrangements of 0,...,3*n+4 as the other integer values will create numbers with digit sums divisible by 3, and hence are divisible by 3. The digit 0 is allowed to be the first digit in the number but is then ignored when determining if the remaining digits form a prime.
LINKS
EXAMPLE
a(0) = 20 as there are twenty primes created when concatenating the integer arrangements of 0,1,2,3,4. They are 1423, 2143, 2341, 4231, 10243, 12043, 20143, 20341, 20431, 23041, 24103, 30241, 32401, 40123, 40213, 40231, 41023, 41203, 42013, 43201.
a(1) = 3202. The smallest prime created using integers 0..7 is 1234657 while the largest is 76540231.
a(2) = 2056675. The smallest prime created using integers 0..10 is 10123457689 while the largest is 987654310021.
MATHEMATICA
Table[Count[FromDigits /@ Flatten /@ IntegerDigits /@ Permutations[Range[0, 3 n + 4]], _?PrimeQ], {n, 0, 2}] (* Robert Price, Sep 16 2020 *)
(* OR, if the above runs low on memory to store all the Permutations at once... *)
Table[p0 = Range[0, 3n+4]; p = NextPermutation[p0]; c = 0;
While[p != p0,
If[PrimeQ[FromDigits[Flatten[IntegerDigits /@ p]]], c++];
p = NextPermutation[p]]; c, {n, 0, 2}] (* Robert Price, Sep 16 2020 *)
CROSSREFS
Sequence in context: A145405 A028458 A225989 * A177323 A184891 A279297
KEYWORD
nonn,base,more
AUTHOR
Scott R. Shannon, May 04 2020
EXTENSIONS
a(3) from Giovanni Resta, May 04 2020
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 May 13 13:31 EDT 2024. Contains 372519 sequences. (Running on oeis4.)