A219249 Lexicographically earliest sequence of positive integers such that the absolute difference of any two adjacent digits is prime.
1, 3, 5, 2, 4, 6, 8, 13, 14, 7, 9, 20, 24, 16, 18, 30, 25, 27, 29, 41, 31, 35, 36, 38, 50, 52, 42, 46, 47, 49, 61, 63, 53, 57, 58, 64, 68, 69, 70, 72, 74, 75, 79, 202, 92, 94, 96, 81, 83, 85, 86, 97, 203, 130, 205, 207, 241, 302, 413, 131, 303, 135, 242, 414, 136, 138, 141, 305, 246, 142, 416, 146, 147, 247, 249, 250
Offset: 1
Links
- E. Angelini, Any digit-pair in S sums to a prime, SeqFan list, Apr 11 2013
Programs
-
PARI
{A219249(n,a=[1],u=0)=while(#a
Comments