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.

A038603 Primes not containing the digit '1'.

Original entry on oeis.org

2, 3, 5, 7, 23, 29, 37, 43, 47, 53, 59, 67, 73, 79, 83, 89, 97, 223, 227, 229, 233, 239, 257, 263, 269, 277, 283, 293, 307, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 409, 433, 439, 443, 449, 457, 463, 467, 479, 487, 499, 503, 509, 523, 547, 557
Offset: 1

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jul 15 1998

Keywords

Comments

Subsequence of A132080. - Reinhard Zumkeller, Aug 09 2007
Maynard proves that this sequence is infinite and in particular contains the expected number of elements up to x, on the order of x^(log 9/log 10)/log x. - Charles R Greathouse IV, Apr 08 2016

Crossrefs

Intersection of A000040 (primes) and A052383 (numbers with no digit 1).
Primes having no digit d = 0..9 are A038618, this sequence, A038604, A038611, A038612, A038613, A038614, A038615, A038616, and A038617, respectively.
Primes with other restrictions on digits: A106116, A156756.

Programs

  • Magma
    [ p: p in PrimesUpTo(600) | not 1 in Intseq(p) ];  // Bruno Berselli, Aug 08 2011
    
  • Mathematica
    Select[Prime[Range[70]], DigitCount[#, 10, 1] == 0 &] (* Vincenzo Librandi, Aug 09 2011 *)
  • PARI
    is(n)=if(isprime(n),n=vecsort(eval(Vec(Str(n))),,8);n[1]>1||(!n[1]&&n[2]>1)) \\ Charles R Greathouse IV, Aug 09 2011
    
  • PARI
    is(n)=!vecsearch(vecsort(digits(n)),1) && isprime(n) \\ Charles R Greathouse IV, Oct 03 2012
    
  • PARI
    next_A038603(n)=until((n=nextprime(n+1))==n=next_A052383(n-1),);n \\ Compute least a(k) > n. See A052383. - M. F. Hasler, Jan 14 2020
    
  • Python
    from sympy import nextprime
    i=p=1
    while i<=500:
        p = nextprime(p)
        if '1' not in str(p):
            print(str(i)+" "+str(p))
            i+=1
    # Indranil Ghosh, Feb 07 2017, edited by M. F. Hasler, Jan 15 2020
    # See the OEIS Wiki page for more efficient programs. - M. F. Hasler, Jan 14 2020

Formula

a(n) ≍ n^(log 10/log 9) log n. - Charles R Greathouse IV, Aug 03 2023

A316227 Composite numbers k for which no nontrivial divisor shares any digits with k.

Original entry on oeis.org

4, 6, 8, 9, 10, 14, 16, 18, 21, 27, 34, 38, 46, 49, 54, 56, 57, 58, 68, 69, 76, 78, 81, 86, 87, 106, 111, 116, 118, 129, 134, 146, 158, 161, 166, 177, 188, 201, 219, 247, 249, 259, 267, 289, 323, 329, 334, 356, 358, 388, 413, 446, 454, 458, 466, 477, 478, 489
Offset: 1

Views

Author

Jason Zimba, Jun 27 2018

Keywords

Comments

A nontrivial divisor of k means a divisor greater than 1 and less than k.

Examples

			The nontrivial divisors of 54 are 2, 3, 6, 9, 18, and 27, none of which have a digit 5 or 4.
The nontrivial divisors of 248629501 are 337 and 737773.
The nontrivial divisors of 321810649 are 557 and 577757.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local S;
      if isprime(n) then return false fi;
      S:= convert(convert(n,base,10),set);
      andmap(d -> convert(convert(d,base,10),set) intersect S = {}, numtheory:-divisors(n) minus {1,n})
    end proc:
    select(filter, [$4..1000]); # Robert Israel, Jul 22 2018
  • Mathematica
    MaxCheck = 1000; (* modify as desired *)
    ResultList = {};
    Do[
      If[
       Not[PrimeQ[k]] &&
        Intersection[
          Flatten[
           Map[
            IntegerDigits,
            Complement[Divisors[k], {1, k}]
            ]
           ],
          IntegerDigits[k]
          ] == {},
       ResultList = Append[ResultList, k]
       ],
      {k, 2, MaxCheck}];
    ResultList
    (* or *) Select[Range@500, CompositeQ@# && Intersection[ IntegerDigits@#, Flatten@ IntegerDigits@ Most@ Rest@ Divisors@ #] == {} &] (* Giovanni Resta, Jun 27 2018 *)
  • PARI
    isok(n) = {my(d=divisors(n), dd = Set(digits(n))); for (k=2, #d-1, if (#setintersect(Set(digits(d[k])), dd), return (0));); return (1);}
    lista(nn) = {forcomposite(n=1, nn, if (isok(n), print1(n, ", ")););} \\ Michel Marcus, Jul 03 2018
Showing 1-2 of 2 results.