cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 11 results. Next

A048398 Primes with consecutive digits that differ exactly by 1.

Original entry on oeis.org

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
Offset: 1

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

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.

Crossrefs

Cf. A010051; intersection of A033075 and A000040.

Programs

  • 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
  • Mathematica
    Select[Prime[Range[10000]], # < 10 || Union[Abs[Differences[IntegerDigits[#]]]] == {1} &]

A048399 Primes with consecutive digits that differ exactly by 2.

Original entry on oeis.org

2, 3, 5, 7, 13, 31, 53, 79, 97, 131, 313, 353, 757, 797, 31357, 35353, 35753, 35797, 75353, 75797, 79757, 97579, 131357, 135353, 135757, 353531, 531353, 535757, 575753, 579757, 757579, 797579, 975313, 975797, 979757, 1313579, 3131353
Offset: 1

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{2,3,5,7},Select[Prime[Range[230000]],Union[Abs[ Differences[ IntegerDigits[ #]]]]=={2}&]] (* Harvey P. Dale, Nov 03 2013 *)

A048400 Primes with consecutive digits that differ exactly by 3.

Original entry on oeis.org

2, 3, 5, 7, 41, 47, 14741, 14747, 74747, 1414741, 1474141, 7414741, 4141414747, 4147414147, 14141414141, 14141414741, 14141474741, 14141474747, 14147414741, 14147474141, 14147474147, 14741414747, 74141414147, 74141414741, 74147414741, 74741474741, 74747414141
Offset: 1

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Comments

All terms with more than a single digit must comprise only the digits 1, 4, and 7, because no number comprising the digits 2, 5, and 8 or the digits 3, 6, and 9 can be prime. - Harvey P. Dale, Mar 01 2023

Crossrefs

Programs

  • Mathematica
    Join[{2,3,5,7},Table[Select[FromDigits/@Tuples[{1,4,7},n],PrimeQ[#]&& Union[ Abs[ Differences[ IntegerDigits[ #]]]]=={3}&],{n,11}]//Flatten] (* Harvey P. Dale, Mar 01 2023 *)

Extensions

More terms from Naohiro Nomoto, Jul 28 2001
More terms from Sean A. Irvine, Jun 15 2021

A048401 Primes with consecutive digits that differ exactly by 4.

Original entry on oeis.org

2, 3, 5, 7, 37, 59, 73, 151, 373, 15959, 95959, 515951, 595159, 595951, 9515959, 51515159, 159595151, 159595951, 5151515951, 5159515159, 5159515951, 5951515151, 5951515951, 5959515151, 5959595951, 15151595951, 15951515159
Offset: 1

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Crossrefs

Programs

  • Mathematica
    pd[{a_,b_,c___}]:=Flatten[Table[Select[FromDigits/@Select[Tuples[ {a,b,c},n],Union[Abs[Differences[#]]]=={4}&],PrimeQ],{n,11}]]; Union[Join[{2,3,5,7},pd[{1,5,9}],pd[{3,7}]]] (* Harvey P. Dale, Aug 23 2011 *)

Extensions

More terms from Naohiro Nomoto, Jul 28 2001

A048402 Primes with consecutive digits that differ exactly by 5.

Original entry on oeis.org

2, 3, 5, 7, 61, 83, 383, 727, 72727, 94949, 1616161, 383838383, 727272727, 383838383838383, 38383838383838383, 72727272727272727, 94949494949494949, 383838383838383838383
Offset: 1

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{nn=50,w1,w2},w1=Flatten[Table[Select[FromDigits/@Table[ PadRight[ {},n,{a,a+5}],{n,2,nn}],PrimeQ],{a,4}]];w2=Flatten[Table[Select[ FromDigits/@ Table[PadRight[{},n,{a+5,a}],{n,2,nn}],PrimeQ],{a,4}]];Join[ {2,3,5,7},w1,w2]//Union] (* Harvey P. Dale, Jan 09 2021 *)

A048404 Primes with consecutive digits that differ exactly by 7.

Original entry on oeis.org

2, 3, 5, 7, 29, 181, 929, 18181, 929292929, 18181818181818181818181818181818181818181818181818181818181818181818181818181
Offset: 1

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Comments

The next term (a(11)) has 163 digits. - Harvey P. Dale, Mar 23 2023

Crossrefs

Programs

  • Mathematica
    Module[{s18,s81,s29,s92},s18=Select[Table[FromDigits[PadRight[{},n,{1,8}]],{n,1,181,2}],PrimeQ]; s81=Select[Table[FromDigits[PadRight[{},n,{8,1}]],{n,2,182,2}],PrimeQ];s29 = Select[ Table[FromDigits[PadRight[{},n,{2,9}]],{n,2,182,2}],PrimeQ]; s92 =Select[Table[ FromDigits[ PadRight[{},n,{9,2}]],{n,1,183,2}],PrimeQ]; Join[{2,3,5,7},s18,s81,s29,s92]//Sort] (* Harvey P. Dale, Mar 23 2023 *)

A048403 Primes with consecutive digits that differ exactly by 6.

Original entry on oeis.org

2, 3, 5, 7, 17, 71, 1717171717171717171717171717171, 1717171717171717171717171717171717171
Offset: 1

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Comments

From Andrew Howroyd, Aug 13 2024: (Start)
Terms with more than 1 digit have digits alternating between 1 and 7.
No more terms < 10^3000. (End)

Crossrefs

Programs

  • PARI
    upto(limit)={my(L=List([t|t<-[2,3,5],t<=limit]),m=1); while(mAndrew Howroyd, Aug 13 2024

Extensions

Offset changed by Andrew Howroyd, Aug 13 2024

A089291 Prime worms (as defined below).

Original entry on oeis.org

101, 787, 12101, 32323, 34543, 78787, 1012321, 1212121, 3212123, 3212323, 3454343, 7654567, 7656787, 7676567, 7678787, 7876567, 7898767, 101012321, 101210101, 101232121, 121232101, 123210121, 123232121, 321234343, 323232323
Offset: 1

Views

Author

Enoch Haga, Dec 23 2003

Keywords

Comments

By analogy, primes of this type are worms with a head and tail and body composed of the same digit which weaves in and out of the prime. In a(2)=12101 the worm is defined by the digit 1.

Examples

			a(2)=12101 because that number is prime with identical first and last digits. Then abs(1-2)=1; abs(2-1)=1; abs(1-0)=1; abs(0-1)=1; and sum of absolute values is 4, one less than the 5 digits in the prime.
		

References

  • The concept is due to Carlos Rivera in his Puzzle 246 (where he asks for the first pandigital prime worm and for the first pandigital titanic prime worm - solutions are at his site).

Crossrefs

This is a subset of A048398. Cf. A089315-A089317, A048398-A048405.

Formula

Primes whose first and last digits are identical and whose successive digit differences have a uniformly absolute value of 1. Thus the sum of absolute values is one less than the number of digits in the prime. No two adjacent digits are identical or differ by more than one.

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010

A089315 Prime worms [successive digit differences with absolute value of 3].

Original entry on oeis.org

14741, 74747, 1414741, 1474141, 14141414141, 14141414741, 14141474741, 14147414741, 14147474141, 74141414147, 1474741414141, 7474141474747, 7474741414747, 14141474141414141, 14147414747474741, 14147474147474741
Offset: 0

Views

Author

Enoch Haga, Dec 25 2003

Keywords

Comments

One of a family of prime worms differing according to the uniform absolute value of successive digit pairs. Sequence checked to 10^9.
This is a subset of A048400. Cf. A089291, A089316-A089317, A048398-A048405.

Examples

			a(1)=74747 because the number is prime, has identical first and last digits and abs(7-4)=3; abs(4-7)=3; abs(7-4)=3 and abs(4-7)=3. In this number, the worm is 7.
		

References

  • Carlos Rivera's primepuzzles.net, Puzzle 246.

Formula

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

Extensions

More terms from David Wasserman, Sep 09 2005

A089317 Prime worms [successive digit differences with absolute value of 4].

Original entry on oeis.org

151, 373, 95959, 9515959, 159595151, 159595951, 15151595951, 15951595151, 95951515159, 1515159515951, 1515959515951, 1515959595151, 1595159515151, 1595159595151, 9515151515159, 9515159515159, 9515159595959, 9595159515959
Offset: 0

Views

Author

Enoch Haga, Dec 25 2003

Keywords

Examples

			a(1)=373; first and last digits are 3; abs(3-7)=4; abs(7-3)=4; the worm is 3.
		

References

  • Carlos Rivera's primepuzzles.net, Puzzle 246

Crossrefs

This is a subsequence of A048401. Cf. A089291, A089315-A089316, A048398-A048405.

Formula

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

Extensions

More terms from David Wasserman, Sep 09 2005
Showing 1-10 of 11 results. Next