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!)
A089316 Prime worms [successive digit differences with absolute value of 2]. 2

%I #14 May 09 2021 03:31:45

%S 131,313,353,757,797,35353,35753,75797,79757,97579,3131353,3135313,

%T 3531313,7535797,313131353,313135313,313579753,353535313,357531313,

%U 357531353,357535753,357575753,357975353,753535357,757975357,975353579

%N Prime worms [successive digit differences with absolute value of 2].

%H Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_246.htm">Puzzle 246. The worm</a>, The Prime Puzzles and Problems Connection.

%F Select prime numbers having the same first and last digits; if the uniform absolute value of successive digit differences is 2, add to sequence.

%e a(4)=797; first and last digits are 7; abs(7-9)=2; abs(9-7)=2; the worm is 7.

%t pwQ[n_]:=Module[{idn=IntegerDigits[n]},First[idn]==Last[idn]&&Union[Abs[ Differences[idn]]]=={2}]; Select[Prime[Range[50000000]],pwQ] (* _Harvey P. Dale_, Mar 26 2013 *)

%Y Cf. A089291.

%Y This is a subset of A048399. Cf. A089291, A089315, A089317, A048398-A048405.

%K easy,nonn,base

%O 0,1

%A _Enoch Haga_, Dec 25 2003

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 10:11 EDT 2024. Contains 371935 sequences. (Running on oeis4.)