login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048398 Primes with consecutive digits that differ exactly by 1. 22
2, 3, 5, 7, 23, 43, 67, 89, 101, 787, 4567, 12101, 12323, 12343, 32321, 32323, 34543, 54323, 56543, 56767, 76543, 78787, 78989, 210101, 212123, 234323, 234343, 432121, 432323, 432343, 434323, 454543, 456767, 654323, 654343, 678767, 678989 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Or, primes in A033075. - Zak Seidov, Feb 01 2011

REFERENCES

J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 67, p. 23, Ellipses, Paris 2008.

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000 (terms n = 1..1500 from Zak Seidov)

MATHEMATICA

Select[Prime[Range[10000]], # < 10 || Union[Abs[Differences[IntegerDigits[#]]]] == {1} &]

PROG

(Haskell)

a048398 n = a048398_list !! (n-1)

a048398_list = filter ((== 1) . a010051') a033075_list

-- Reinhard Zumkeller, Feb 21 2012, Nov 04 2010

(Python 3.2 or higher)

from itertools import product, accumulate

from sympy import isprime

A048398_list = [2, 3, 5, 7]

for l in range(1, 17):

    for d in [1, 3, 7, 9]:

        dlist = [d]*l

        for elist in product([-1, 1], repeat=l):

            flist = [str(d+e) for d, e in zip(dlist, accumulate(elist)) if 0 <= d+e < 10]

            if len(flist) == l and flist[-1] != '0':

                n = 10*int(''.join(flist[::-1]))+d

                if isprime(n):

                    A048398_list.append(n)

A048398_list = sorted(A048398_list) # Chai Wah Wu, May 31 2017

CROSSREFS

Cf. A033075, A048399-A048405, A052016, A052017, A006055.

Cf. A010051; intersection of A033075 and A000040.

Sequence in context: A155873 A106711 A235110 * A059170 A068710 A120805

Adjacent sequences:  A048395 A048396 A048397 * A048399 A048400 A048401

KEYWORD

nonn,base

AUTHOR

Patrick De Geest, Apr 15 1999

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 August 25 16:17 EDT 2019. Contains 326324 sequences. (Running on oeis4.)