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-4 of 4 results.

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

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

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

Original entry on oeis.org

131, 313, 353, 757, 797, 35353, 35753, 75797, 79757, 97579, 3131353, 3135313, 3531313, 7535797, 313131353, 313135313, 313579753, 353535313, 357531313, 357531353, 357535753, 357575753, 357975353, 753535357, 757975357, 975353579
Offset: 0

Views

Author

Enoch Haga, Dec 25 2003

Keywords

Examples

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

Crossrefs

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

Programs

  • Mathematica
    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 *)

Formula

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

A089360 Prime worms.

Original entry on oeis.org

101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, 12101, 14741, 18181, 32323, 34543, 35353, 35753, 72727, 74747, 75797, 78787, 79757, 94949, 95959, 97579, 1012321, 1212121, 1414741, 1474141, 1616161, 3131353
Offset: 1

Views

Author

Enoch Haga, Dec 27 2003

Keywords

Comments

While some palindromic primes are included, there are other criteria for addition to this sequence.

Examples

			a(15)=12101; first and last digits = 1; no identical adjacent digits; abs(1-2)=1;abs(2-1)=1; abs(1-0)=1; abs(0-1)=1; the worm is 1.
		

References

  • Carlos Rivera's primepuzzles.net, Puzzle 246

Crossrefs

Cf. A089291, A089315-89317, A048398-48405.

Formula

From sequence of primes beginning with 3-digits, select those with identical first and last digits; no adjacent digits identical; and absolute value of sequential differences of paired digits a constant.
Showing 1-4 of 4 results.