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.

A208270 Primes containing a digit 1.

Original entry on oeis.org

11, 13, 17, 19, 31, 41, 61, 71, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 241, 251, 271, 281, 311, 313, 317, 331, 401, 419, 421, 431, 461, 491, 521, 541, 571, 601, 613, 617, 619, 631, 641, 661
Offset: 1

Views

Author

Jaroslav Krizek, Mar 04 2012

Keywords

Comments

Subsequence of A011531, A062634, A092911 and A092912.
Supersequence of A106101, A045707 and A030430.
Complement of A208271 with respect to A011531.

Crossrefs

Cf. A208271 (nonprimes containing a digit 1), A011531 (numbers containing a digit 1).
Complement of A038603 in A000040. - M. F. Hasler, Mar 05 2012

Programs

  • Magma
    [p: p in PrimesUpTo(400) | 1 in Intseq(p)]; // Vincenzo Librandi, Apr 29 2019
  • Mathematica
    Select[Prime[Range[124]], MemberQ[IntegerDigits[#], 1] &](* Jayanta Basu, Apr 01 2013 *)
    Select[Prime[Range[200]],DigitCount[#,10,1]>0&] (* Harvey P. Dale, Dec 15 2020 *)
  • PARI
    forprime(p=2,1e3,s=vecsort(eval(Vec(Str(p))),,8);if(s[1]==1||(s[1]==0&&s[2]==1),print1(p", "))) \\ Charles R Greathouse IV, Mar 04 2012
    
  • PARI
    is_A208270(n)=isprime(n)&setsearch(Set(Vec(Str(n))),1) \\ M. F. Hasler, Mar 05 2012
    

Formula

a(n) ~ n log n since the sequence contains almost all primes. - Charles R Greathouse IV, Mar 04 2012

A239058 Numbers whose divisors all appear as a substring in their decimal expansion.

Original entry on oeis.org

1, 11, 13, 17, 19, 31, 41, 61, 71, 101, 103, 107, 109, 113, 125, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 241, 251, 271, 281, 311, 313, 317, 331, 401, 419, 421, 431, 461, 491, 521, 541, 571, 601, 613, 617, 619, 631, 641, 661, 691, 701, 719, 751, 761, 811, 821, 881, 911, 919, 941, 971
Offset: 1

Views

Author

M. F. Hasler, Mar 09 2014

Keywords

Comments

A subsequence of A092911 (all divisors can be formed using the digits of the number) which is a subsequence of A011531 (numbers having the digit 1).
Are 1 and 125 the only nonprime terms in this sequence?
No: 17692313, 4482669527413081, 21465097175420089, and 567533481816008761 are members. - Charles R Greathouse IV, Mar 09 2014
See A239060 for the nonprime terms of this sequence, which include in particular the squares of terms of A115738 (unless such a square would not have a digit 1).

Examples

			All primes having the digit 1 (A208270) are in this sequence, because {1, p} are the only divisors of a prime p.
The divisors of 125 are {1, 5, 25, 125}; it can be seen that all of them occur as a substring in 125, therefore 125 is in this sequence.
		

Crossrefs

Programs

  • PARI
    is(n,d=vecextract(divisors(n),"^-1"))={ setminus(select(x->x<10,d),Set(digits(n)))&&return;!for(L=2,#Str(d[#d]),setminus(select(x->x
    <10^L&&x>=10^(L-1),d),Set(concat(vector(L,o,digits(n\10^(L-o),10^L)))))&&return)}
    
  • PARI
    overlap(long,short)=my(D=10^#digits(short)); while(long>=short, if(long%D==short,return(1));long\=10); 0
    is(n)=my(d=divisors(n)); forstep(i=#d-1,1,-1, if(!overlap(n,d[i]), return(0))); 1 \\ Charles R Greathouse IV, Mar 09 2014

A092912 Numbers k all of whose divisors contain only digits that occur at least once in k.

Original entry on oeis.org

1, 11, 13, 17, 19, 31, 41, 61, 71, 101, 103, 107, 109, 113, 121, 125, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 173, 179, 181, 187, 191, 193, 197, 199, 211, 241, 251, 271, 281, 311, 313, 317, 331, 341, 401, 419, 421, 431, 451, 461, 491, 521, 541, 571
Offset: 1

Views

Author

Amarnath Murthy, Mar 14 2004

Keywords

Comments

All primes containing the digit 1 are terms.

Examples

			131 is a term. 143 is also a term with divisors 1,11,13,143.
		

Crossrefs

Programs

  • Maple
    isA092912 := proc(n) local digs, divs, d,i,j ; digs := convert(n,base,10) ; divs := numtheory[divisors](n) ; for i from 1 to nops(divs) do d := convert(op(i,divs),base,10) ; for j in d do if not j in digs then RETURN(false) ; fi ; od ; od ; RETURN(true) ; end: for n from 1 to 700 do if isA092912(n) then printf("%d, ",n) ; fi ; od ; # R. J. Mathar, Jul 26 2007
  • Mathematica
    Do[a = IntegerDigits[n]; b = Union @@ IntegerDigits[Divisors[n]]; If[Intersection[a, b] == b, Print[n]], {n, 1, 200}] (* Ryan Propper, Jul 19 2005 *)
  • PARI
    is_A092912(n)=!setminus(Set(concat(apply(digits,divisors(n)))),Set(digits(n))) \\ M. F. Hasler, Mar 09 2014

Extensions

Corrected and extended by Ryan Propper, Jul 19 2005
More terms from R. J. Mathar, Jul 26 2007

A239060 Nonprime numbers whose divisors all appear as a substring in the number's decimal expansion.

Original entry on oeis.org

1, 125, 17692313
Offset: 1

Views

Author

M. F. Hasler, Mar 09 2014

Keywords

Comments

This is the subsequence of A239058 without the primes having a digit 1, A208270. It is thus a subsequence of A092911 (all divisors can be formed using the digits of the number) which is a subsequence of A011531 (numbers having the digit 1).
The term a(3)=17692313=A239058(870356), as well as the numbers 4482669527413081, 21465097175420089, and 567533481816008761 which are also members, were found by Charles R Greathouse IV, Mar 09 2014
The square of any term of A115738 is a member of this sequence. The above larger examples are of that form.
a(4) > 10^12. - Giovanni Resta, Sep 08 2018

Examples

			The divisors of 17692313 are {1, 23, 769231, 17692313}; it can be seen that all of them occur as a substring in 17692313, therefore 17692313 is in this sequence.
		

Crossrefs

Programs

  • PARI
    is(n)=!isprime(n)&&is_A239058(n)
    
  • PARI
    overlap(long,short)=my(D=10^#digits(short)); while(long>=short, if(long%D==short,return(1));long\=10); 0
    is(n)=my(d=divisors(n)); #d!=2 && !forstep(i=#d-1,1,-1, if(!overlap(n,d[i]), return(0))) \\ Charles R Greathouse IV, Mar 09 2014
Showing 1-4 of 4 results.