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

A073069 Indices of primes with non-distinct digits.

Original entry on oeis.org

5, 26, 30, 32, 36, 42, 43, 46, 47, 48, 49, 50, 51, 59, 64, 65, 67, 68, 71, 74, 76, 84, 86, 87, 95, 102, 106, 109, 121, 123, 129, 130, 134, 137, 138, 139, 141, 151, 152, 153, 154, 156, 157, 158, 165, 167, 168, 169, 170, 171, 172, 173, 174, 177, 178, 182, 185, 186
Offset: 1

Views

Author

Zak Seidov Aug 24 2002

Keywords

Crossrefs

Indices of primes in A073064. Cf. A030291.

Programs

  • Mathematica
    ta=IntegerDigits[Prime[Range[1000]]]; ta2=Table[Length[ta[[i]]]>Length[Union[ta[[i]]]], {i, 1000}]; Flatten[Position[ta2, True]]
  • Python
    from sympy import prime, primerange
    def ok(p): s = str(p); return len(set(s)) < len(s)
    def aupto(limit):
      alst = []
      for pi, p in enumerate(primerange(1, prime(limit)+1), start = 1):
        if ok(p): alst.append(pi)
      return alst
    print(aupto(186)) # Michael S. Branicky, May 26 2021

A155075 Primes with one digit used exactly twice, all others digits distinct.

Original entry on oeis.org

11, 101, 113, 131, 151, 181, 191, 199, 211, 223, 227, 229, 233, 277, 311, 313, 331, 337, 353, 373, 383, 433, 443, 449, 499, 557, 577, 599, 661, 677, 727, 733, 757, 773, 787, 797, 811, 877, 881, 883, 887, 911, 919, 929, 977, 991, 997, 1009, 1013, 1019, 1021
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 19 2009

Keywords

Comments

The sequence is finite. The last 10 terms are 98876342501, 98876405231, 98876421053, 98876502143, 98876504123, 98876520143, 98876524013, 98876524301, 98876530421, 98876532401. - Zak Seidov, Dec 18 2014
Number of n-digits terms starting with n=1: {0, 1, 46, 508, 4117, 31395, 187533, 854665, 2989094, 7172381, 6481542}. - Zak Seidov, Jun 04 2015

Crossrefs

Programs

  • Maple
    G:= proc(d) # to produce all d-digit terms
      local L, C, Cc, P, i, x, res;
      res:= NULL;
      L:= [false, true, false, true, false, false, false, true, false, true];
      for C in  combinat:-choose([$0..9], d-1) do
        for i from 1 to d-1 do
          Cc:= [op(C), C[i]];
          if convert(Cc, `+`) mod 3 = 0 then next fi;
          for P in combinat:-permute(Cc) do
            if P[-1] = 0 or not L[P[1]+1] then next fi;
            x:= add(P[i]*10^(i-1), i=1..nops(P));
            if isprime(x) then res:= res, x fi;
          od
        od
      od;
      sort([res]);
    end proc:
    seq(op(G(d)), d=1..5); # Robert Israel, Jun 04 2015
  • Mathematica
    fQ[n_]:=Length[IntegerDigits[n]]-Length[Union[IntegerDigits[n]]]==1;Select[Prime@Range[21713],fQ[#]&] (* Ivan N. Ianakiev, Sep 25 2015 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, my(d = digits(p)); if (#vecsort(d,,8) == #d-1, print1(p, ", ")););} \\ Michel Marcus, Dec 18 2014

Extensions

Definition clarified by R. J. Mathar, May 05 2010
Showing 1-2 of 2 results.