OFFSET
1,2
COMMENTS
EXAMPLE
41 appears after 7 because 7+4 is prime and 4+1 is prime, and no other number less than 41 (not already in the sequence) satisfies this property. Example: 11 does not directly follow 7 since 7+1 is not prime.
PROG
(PARI) A182177_vec={(n, a=[0], 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(d[i-1]+d[i])||next(2)); a=concat(a, t); break)); a} \\ M. F. Hasler, Apr 11 2013
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Jim Nastos and Eric Angelini, Apr 16 2012
STATUS
approved