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.

A032758 Undulating primes (digits alternate).

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, 18181, 32323, 35353, 72727, 74747, 78787, 94949, 95959, 1212121, 1616161, 323232323, 383838383
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

Sometimes called "smoothly undulating primes", to distinguish them from A059168.

References

  • C. A. Pickover, "Keys to Infinity", Wiley 1995, p. 159,160.
  • C. A. Pickover, "Wonders of Numbers", Oxford New York 2001, Chapter 52, pp. 123-124, 316-317.

Crossrefs

Programs

  • Mathematica
    a[n_] := DeleteDuplicates[Take[IntegerDigits[n],{1,-1,2}]]; b[n_] := DeleteDuplicates[Take[IntegerDigits[n],{2,-1,2}]]; t={}; Do[p=Prime[n]; If[p<10, AppendTo[t,p], If[Length[a[p]] == Length[b[p]] == 1 && a[p][[1]] != b[p][[1]], AppendTo[t,p]]], {n,3*10^7}]; t (* Jayanta Basu, May 04 2013 *)
  • Python
    from itertools import count, islice
    from sympy import isprime, primerange
    def agen(): # generator of terms
        yield from (p for p in primerange(2, 100) if p != 11)
        yield from (t for t in (int((A+B)*d2+A) for d2 in count(1) for A in "1379" for B in "0123456789" if A != B) if isprime(t))
    print(list(islice(agen(), 51))) # Michael S. Branicky, Jun 09 2022

Extensions

Sequence corrected by Juri-Stepan Gerasimov, Jan 28 2010
Offset corrected by Arkadiusz Wesolowski, Sep 13 2011