

A287224


Take all the digits of a(n) and a(n+1) then reorder them in a single integer: this will never produce a prime, no matter the rearrangement.


1



1, 2, 4, 5, 6, 3, 9, 12, 15, 8, 7, 11, 10, 14, 13, 17, 16, 20, 19, 23, 22, 24, 18, 21, 27, 30, 33, 36, 39, 42, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41, 43, 44, 45, 46, 47, 49, 48, 50, 52, 53, 54, 51, 55, 56, 58, 59, 60, 57, 63, 66, 62, 61, 64, 65, 67, 68, 70, 71, 73, 74, 76, 77, 79, 80, 82, 83, 84, 69, 72, 75, 78
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

The sequence is always extended with the smallest integer not yet present that doesn't lead to a contradiction.
The sequence is infinite and might be a permutation of the integers > 0.


LINKS

JeanMarc Falcoz, Table of n, a(n) for n = 1..1301


EXAMPLE

The first two terms are 1 and 2 because neither 12 or 21 are primes; the next term cannot be 3 as 23 is prime; 4 is ok because neither 24 nor 42 are primes; the next term cannot be 3 as 43 is prime; etc.


MATHEMATICA

a = {{1}}; Do[k = 1; While[Nand[! MemberQ[a, #], NoneTrue[Map[FromDigits, Permutations[a[[n  1]]~Join~#]], PrimeQ]] &@ Set[d, IntegerDigits@ k], k++]; AppendTo[a, d], {n, 2, 83}]; FromDigits /@ a (* Michael De Vlieger, May 22 2017 *)


CROSSREFS

Sequence in context: A181524 A240568 A309681 * A077867 A123124 A166236
Adjacent sequences: A287221 A287222 A287223 * A287225 A287226 A287227


KEYWORD

nonn,base


AUTHOR

Eric Angelini and JeanMarc Falcoz, May 22 2017


STATUS

approved



