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!)
A219248 Numbers such that the absolute difference of any two adjacent (decimal) digits is prime. 7

%I #16 Jan 02 2023 12:30:49

%S 0,1,2,3,4,5,6,7,8,9,13,14,16,18,20,24,25,27,29,30,31,35,36,38,41,42,

%T 46,47,49,50,52,53,57,58,61,63,64,68,69,70,72,74,75,79,81,83,85,86,92,

%U 94,96,97,130,131,135,136,138,141,142,146,147,149,161,163,164

%N Numbers such that the absolute difference of any two adjacent (decimal) digits is prime.

%C Numbers which may (and do) occur in A219250 and A219249 (union {0}).

%C This is to A219250 and A219249 what A182175 is to A182177 and A182178.

%H Harvey P. Dale, <a href="/A219248/b219248.txt">Table of n, a(n) for n = 1..1000</a>

%H E. Angelini, <a href="http://list.seqfan.eu/oldermail/seqfan/2013-April/011035.html">Any digit-pair in S sums to a prime</a>, SeqFan list, Apr 11 2013

%t Select[Range[0,200],And@@PrimeQ[Abs[Differences[IntegerDigits[#]]]]&] (* _Harvey P. Dale_, Jun 06 2014 *)

%o (PARI) is_A219248(n)={!for(i=2,#n=digits(n),isprime(abs(n[i-1]-n[i]))||return)}

%K nonn,base

%O 1,3

%A _M. F. Hasler_, Apr 12 2013

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 April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)