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

A062634 Numbers k such that every divisor of k contains the digit 1.

Original entry on oeis.org

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

Views

Author

Erich Friedman, Jul 04 2001

Keywords

Comments

First composite term is 121. All powers of 11 are in the sequence. - Alonso del Arte, Sep 29 2013

Examples

			143 has divisors 1, 11, 13 and 143, all of which contain the digit 1.
		

Crossrefs

Cf. A027750, subsequence of A011531; A206159 and A208270 are subsequences.
Cf. A001020 (powers of 11).

Programs

  • Haskell
    a062634 n = a062634_list !! (n-1)
    a062634_list = filter
       (and . map ((elem '1') . show) . a027750_row) a011531_list
    -- Reinhard Zumkeller, Feb 05 2012
    
  • Maple
    q:= n-> andmap(x-> 1 in convert(x, base, 10), numtheory[divisors](n)):
    select(q, [$1..1000])[];  # Alois P. Heinz, May 09 2022
  • Mathematica
    fQ[n_, dgt_] := Union[ MemberQ[#, dgt] & /@ IntegerDigits@ Rest@ Divisors@ n][[1]]; Select[ Range[2, 525], fQ[#, 1] &] (* Robert G. Wilson v, Jun 11 2014 *)
  • PARI
    isok(m) = fordiv(m, d, if (! #select(x->(x==1), digits(d)), return(0))); return(1); \\ Michel Marcus, May 09 2022

Extensions

Offset corrected by Reinhard Zumkeller, Feb 05 2012

A257667 Primes containing a digit 5.

Original entry on oeis.org

5, 53, 59, 151, 157, 251, 257, 353, 359, 457, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 653, 659, 751, 757, 853, 857, 859, 953, 1051, 1151, 1153, 1259, 1451, 1453, 1459, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579
Offset: 1

Views

Author

Vincenzo Librandi, May 03 2015

Keywords

Comments

Subsequence of primes of A011535. - Michel Marcus, May 03 2015
Primes in A062671. - Bruno Berselli, May 03 2015

Crossrefs

Cf. prime numbers containing the string k: A208270 (k=1), A208272 (k=2), A212525 (k=3), this sequence (k=5), A257668 (k=7), A166571 (k=10), A166572 (k=11), A243529 (k=12), A166573 (k=13), A243530 (k=14), A243531 (k=15), A243532 (k=16), A166579 (k=17), A243527 (k=111), A166580 (k=222), A166581 (k=333), A166582 (k=444).
Cf. A011535, A062671, A243531 (subsequence).

Programs

  • Magma
    [p: p in PrimesUpTo(1600) | 5 in Intseq(p)];
    
  • Mathematica
    Select[Prime[Range[250]], ! StringFreeQ[ToString[#], "5"] &]
  • PARI
    forprime(p=1, 1600, if(vecsearch(vecsort(digits(p)), 5), print1(p, ", "))) \\ Derek Orr, May 05 2015; corrected by Michel Marcus, Oct 30 2023
  • Sage
    [p for p in primes(1600) if 5 in p.digits(base=10)] # Bruno Berselli, May 03 2015
    

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Nov 01 2022

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

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

A284290 Primes containing a digit 4.

Original entry on oeis.org

41, 43, 47, 149, 241, 347, 349, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 541, 547, 641, 643, 647, 743, 941, 947, 1049, 1249, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489
Offset: 1

Views

Author

Jaroslav Krizek, Mar 24 2017

Keywords

Comments

Subsequence of A011534 and A062669.

Crossrefs

Cf. Primes containing a digit k for k = 0 - 9: A056709 (k = 0), A208270 (k = 1), A208272 (k = 2), A212525 (k = 3), A284290 (k = 4), A257667 (k = 5), A284291 (k = 6), A257668 (k = 7), A284292 (k = 8), A106093 (k = 9).

Programs

  • Magma
    [p: p in PrimesUpTo(10000) | 4 in Intseq(p)]
  • Mathematica
    Select[Range[1500], PrimeQ[#] && MemberQ[IntegerDigits[#], 4] &] (* Amiram Eldar, Nov 09 2019 *)

A284291 Primes containing a digit 6.

Original entry on oeis.org

61, 67, 163, 167, 263, 269, 367, 461, 463, 467, 563, 569, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 761, 769, 863, 967, 1061, 1063, 1069, 1163, 1361, 1367, 1567, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663
Offset: 1

Views

Author

Jaroslav Krizek, Mar 24 2017

Keywords

Comments

Subsequence of A011536 and A062673.

Crossrefs

Primes containing a digit k for k = 0 - 9: A056709 (k = 0), A208270 (k = 1), A208272 (k = 2), A212525 (k = 3), A284290 (k = 4), A257667 (k = 5), A284291 (k = 6), A257668 (k = 7), A284292 (k = 8), A106093 (k = 9).

Programs

  • Magma
    [p: p in PrimesUpTo(10000) | 6 in Intseq(p)];
  • Mathematica
    Select[Range[2000], PrimeQ[#] && MemberQ[IntegerDigits[#], 6] &] (* Amiram Eldar, Nov 09 2019 *)

A284292 Primes containing a digit 8.

Original entry on oeis.org

83, 89, 181, 281, 283, 383, 389, 487, 587, 683, 787, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 983, 1087, 1181, 1187, 1283, 1289, 1381, 1481, 1483, 1487, 1489, 1583, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867
Offset: 1

Views

Author

Jaroslav Krizek, Mar 25 2017

Keywords

Comments

Subsequence of A011538 and A062677.
Differs from A062677 which contains also the composites 6889 = 83^2, 7387 = 83*89, 23489=83*283, 25187=89*283, 31789 = 83*383 etc. - R. J. Mathar, Mar 27 2017

Crossrefs

Cf. Primes containing a digit k for k = 0 - 9: A056709 (k = 0), A208270 (k = 1), A208272 (k = 2), A212525 (k = 3), A284290 (k = 4), A257667 (k = 5), A284291 (k = 6), A257668 (k = 7), this sequence (k = 8), A106093 (k = 9).

Programs

  • Magma
    [p: p in PrimesUpTo(10000) | 8 in Intseq(p)];
    
  • Maple
    isA284292 := proc(n)
        if isprime(n) then
            convert(convert(n,base,10),set) ;
            if 8 in % then
                true;
            else
                false;
            end if;
        else
            false;
        end if;
    end proc:
    for n from 1 to 2000 do
        if isA284292(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Mar 27 2017
  • Mathematica
    Select[Prime@ Range@ 500, MemberQ[ IntegerDigits@ #, 8] &] (* Giovanni Resta, Mar 25 2017 *)
  • Python
    from sympy import primerange
    print([n for n in primerange(2, 2000) if '8' in str(n)]) # Indranil Ghosh, Mar 25 2017

A208271 Nonprime numbers containing a digit 1.

Original entry on oeis.org

1, 10, 12, 14, 15, 16, 18, 21, 51, 81, 91, 100, 102, 104, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 128, 129, 130, 132, 133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 146, 147, 148, 150, 152, 153
Offset: 1

Views

Author

Jaroslav Krizek, Mar 04 2012

Keywords

Comments

Subsequence of A011531. Complement of A208270 with respect to A011531.

Crossrefs

Cf. A208270 (primes containing a digit 1), A011531 (numbers containing a digit 1).

Programs

  • Mathematica
    Select[Range[200], ! PrimeQ[#] && MemberQ[IntegerDigits[#], 1] &] (* T. D. Noe, Mar 06 2012 *)

A225417 Composite numbers which contain their sum of aliquot parts as a substring.

Original entry on oeis.org

6, 28, 121, 437, 496, 611, 1331, 1397, 8128, 10201, 14641, 27019, 40301, 40991, 41347, 41917, 45743, 47873, 49901, 51101, 67997, 76459, 97637, 99101, 99553, 99779, 120353, 133307, 133961, 134179, 153091, 161051, 165101, 165743, 166171, 182525, 186503
Offset: 1

Views

Author

Antonio Roldán, May 07 2013

Keywords

Comments

A(n) is odd deficient or perfect (A000396).
If definition had not excluded prime numbers, then terms of A208270 would have been included. - Michel Marcus, Dec 18 2013

Examples

			1031311 is in the sequence because 1031311=10211*101, Sum of aliquot parts: 1+101+10211=10313, substring of 1031311.
		

Programs

  • PARI
    indigit(a,b)={ u=Vec(Str(a));v=Vec(Str(b));indi=0;la=#u;lb=#v;i=1;while(i<=la-lb+1&&indi==0,d=0;for(x=1,lb,if(v[x]==u[i+x-1],d+=1));indi=(d==lb) ;i+=1);return(indi)}
    {for(i=1,10^7,k=sigma(i,1)-i;if(indigit(i,k)&&isprime(i)==0,print(i)))}

A325934 Primes consisting of a single 1 and at least one copy of some other digit.

Original entry on oeis.org

13, 17, 19, 31, 41, 61, 71, 199, 313, 331, 661, 881, 919, 991, 1777, 1999, 2221, 3313, 3331, 4441, 6661, 7177, 7717, 9199, 31333, 33331, 71777, 99991, 199999, 313333, 331333, 333331, 991999, 999199, 3331333, 3333133, 3333313, 3333331, 9999991, 19999999
Offset: 1

Views

Author

Harvey P. Dale, Sep 09 2019

Keywords

Comments

The second Mathematica program below is more complicated than the first but is more efficient. It takes advantage of the observation that any number with a single digit one and one or more copies of another digit from among 2, 4, 5, 6, or 8 can only be prime if the one is the last (least significant) digit. Thus, there is no need to generate or test any permutations of such a number. This means that the program generates and tests only 37.5% as many candidate numbers as the first Mathematica program below. On my laptop computer, in 2019, the first Mathematica program took about 8.2 seconds to compute all terms containing up to 200 digits, whereas the second Mathematica program only took about 6.4 seconds to do the same. - Harvey P. Dale, Sep 20 2019
A further improvement could be made by not testing any permutations of one together with 2, 5, 8, 11, etc. copies of seven, since any such number will have a digital sum of a multiple of three and thus cannot be prime. - Harvey P. Dale, Sep 23 2019

Crossrefs

Subsequence of A208270. Subsequence of A235154.

Programs

  • Mathematica
    Select[Flatten[Table[FromDigits/@Permutations[PadRight[{1},n,k]],{n,10},{k,Range[2,9]}]],PrimeQ]//Union
    Module[{nn=10,c1,c2},c1=Select[Table[FromDigits[PadLeft[{1},n,k]],{k,{2,4,5,6,8}},{n,2,nn}]//Flatten,PrimeQ];c2=Select[FromDigits/@ Flatten[ Permutations/@Flatten[Table[PadLeft[{1},n,k],{k,{3,7,9}},{n,2,nn}],1],1],PrimeQ];Sort[Flatten[Join[{c1,c2}]]]] (* Harvey P. Dale, Sep 20 2019 *)
  • PARI
    lista(nn) = {forprime(p=1, nn, my(d = digits(p)); if ((#Set(d) == 2) && (#select(x->(x==1), d) == 1), print1(p, ", ")););} \\ Michel Marcus, Sep 11 2019
Showing 1-10 of 10 results.