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

A103174 Numbers k with increasing digits such that the digits of k appear among the digits of the k-th prime number.

Original entry on oeis.org

7, 5789, 234567, 345679
Offset: 1

Views

Author

Labos Elemer, Feb 28 2005

Keywords

Comments

We assume digits of k are in increasing order. No terms < 10^7.
Sequence is complete. - Giovanni Resta, Apr 29 2017

Examples

			n: {7, 5789, 234567, 345679}
prime(n): {17, 57089, 3264857, 4956733}
		

Crossrefs

Programs

  • Mathematica
    Select[Rest@ Union[FromDigits /@ Subsets@ Range@ 9], SubsetQ @@ IntegerDigits@ {Prime@#, #} &] (* Giovanni Resta, Apr 29 2017 *)

Extensions

Definition edited by Giovanni Resta, May 01 2017

A113898 Numbers k such that the value pi(k), the number of primes <= k, can be obtained deleting some of the repeating adjacent digits of k.

Original entry on oeis.org

1196, 11373, 22517, 33597, 44639, 55646, 60062, 61159, 62256, 63346, 63347, 64448, 64544, 64555, 64577, 64588, 64599, 64611, 64655, 64668, 64700, 64711, 64722, 64774, 64884, 64992, 65545, 65770, 65880, 65881, 65990, 66644, 67746, 68841
Offset: 1

Views

Author

Giovanni Resta, Jan 29 2006

Keywords

Comments

Largest value below 10^7 is given by pi(110486) = 10486.

Examples

			pi(64668) = 6468, pi(99551) = 9551.
		

Crossrefs

Programs

  • Mathematica
    lst = {}; p=0; While[p < 10^7, n=PrimePi[ ++p]; {sp, sn}=Split/@IntegerDigits@{p, n}; If[First/@sp==First/@sn && And@@GreaterEqual@@@Transpose[Length/@#&/@{sp, sn}], AppendTo[lst, p]]]; lst

A356980 Numbers k such that prime(k) can be written using only the digits of k (but they may used multiple times).

Original entry on oeis.org

137, 187, 321, 917, 1098, 1346, 1347, 1349, 1362, 1367, 1384, 1395, 1528, 1583, 1850, 1859, 1876, 1973, 2415, 2490, 2517, 2631, 2632, 2970, 3417, 3529, 3573, 3575, 3590, 3598, 3751, 3785, 3860, 4301, 4537, 4591, 4639, 4927, 4980, 4983, 5231, 5319, 5342, 5790, 6106, 6107
Offset: 1

Views

Author

Tanya Khovanova, Sep 09 2022

Keywords

Comments

The digits of k can be reused. In other words, the distinct digits of prime(k) form a subset of the set of the distinct digits of k.
This sequence is infinite as every pandigital number is in this sequence, see A171102.

Examples

			The 137th prime number is 773, which can be written with the digits of 137. Thus 137 is in this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10000], SubsetQ[Sort[IntegerDigits[#]], Sort[IntegerDigits[Prime[#]]]] &]
  • Python
    from sympy import nextprime
    from itertools import count, islice
    def agen(): # generator of terms
        pk = 2
        for k in count(1):
            if set(str(pk)) <= set(str(k)): yield k
            pk = nextprime(pk)
    print(list(islice(agen(), 46))) # Michael S. Branicky, Sep 09 2022
Showing 1-3 of 3 results.