login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A219249 Lexicographically earliest sequence of positive integers such that the absolute difference of any two adjacent digits is prime. 5
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

See A219250 for the version allowing nonnegative integers, i.e., starting with a(1)=0.

See A219248 for the numbers which occur in this sequence, and A219251 for the complement.

LINKS

Table of n, a(n) for n=1..76.

E. Angelini, Any digit-pair in S sums to a prime, SeqFan list, Apr 11 2013

PROG

(PARI) {A219249(n, a=[1], u=0)=while(#a<n, u+=1<<a[#a]; for(t=a[1]+1, 9e9, bittest(u, t)&next; my(d=concat(a[#a]%10, digits(t))); for(i=2, #d, isprime(abs(d[i-1]-d[i]))||next(2)); a=concat(a, t); break)); a}

CROSSREFS

Cf. A182175, A182177, A182178.

Sequence in context: A131793 A065186 A210521 * A203553 A081964 A082817

Adjacent sequences:  A219246 A219247 A219248 * A219250 A219251 A219252

KEYWORD

nonn,base

AUTHOR

Eric Angelini and M. F. Hasler, Apr 11 2013

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 18:48 EDT 2020. Contains 334854 sequences. (Running on oeis4.)