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.

Previous Showing 51-60 of 73 results. Next

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

A263314 Numbers m whose decimal representation includes at least one digit that divides every digit of m.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 26, 28, 30, 31, 33, 36, 39, 40, 41, 42, 44, 48, 50, 51, 55, 60, 61, 62, 63, 66, 70, 71, 77, 80, 81, 82, 84, 88, 90, 91, 93, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112
Offset: 1

Views

Author

Giovanni Teofilatto, Oct 14 2015

Keywords

Comments

Every number that has a digit '1' (cf. A011531) is in this sequence. Sequence A034838 (every digit divides n) is not a subsequence (e.g., 324 is not in the present sequence). - M. F. Hasler, Jan 10 2016

Programs

  • PARI
    is(n)={n && (n=select(t->t,Set(digits(n))))%n[1]==0} \\ The divisor is necessarily the smallest nonzero digit. A vector having no nonzero component is considered equal to 0. - M. F. Hasler, Jan 10 2016
  • Python
    A263314_list = []
    for i in range(10**4):
        s = str(i)
        for d in s:
            j = int(d)
            if j :
                for e in s:
                    if int(e) % j:
                        break
                else:
                    A263314_list.append(i)
                    break
    # Chai Wah Wu, Oct 21 2015
    

A317173 a(n) is the least k > 0 such that k * n contains a digit 1 in its decimal representation.

Original entry on oeis.org

1, 5, 4, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 5, 5, 5, 4, 4, 3, 4, 4, 4, 1, 4, 4, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Rémy Sigrist, Jul 23 2018

Keywords

Examples

			The multiples of 3 are: 3, 6, 9, 12, 15, etc.; 12 is the first one containing the digit 1, hence a(3) = 12/3 = 4.
		

Crossrefs

Programs

  • PARI
    a(n) = for (k=1, oo, if (setsearch(Set(digits(k*n)), 1), return (k)))

Formula

1 <= a(n) <= 5.
a(n) <= A190302(n).
a(n) = A317175(n, 1).
a(10 * n) = a(n).

A344636 Numbers k such that half the numbers from 0 to k inclusive contain the digit "1".

Original entry on oeis.org

1, 17, 23, 161, 269, 271, 1457, 3397, 3419, 3421, 13121, 44685, 118097, 674909, 674933, 1062881
Offset: 1

Views

Author

Glen Gilchrist, May 25 2021

Keywords

Comments

Andrew Hilton (see Ref) refers to these as "half-one" numbers.

Examples

			1 is a term since among the numbers 0,1 exactly half contain a digit "1".
17 is a term since among the numbers 0,1,2,...,17 exactly half contain a digit "1".
		

References

  • Andrew Hilton, 101 Puzzles to Solve on your Microcomputer, 1984, HARRAP, page 57.

Crossrefs

Programs

  • Mathematica
    Select[2Range@2000,Length@Select[Range[0,#-1],MemberQ[IntegerDigits@#,1]&]==#/2&]-1 (* Giorgos Kalogeropoulos, Jul 28 2021 *)

A043494 Numbers having two 1's in base 10.

Original entry on oeis.org

11, 101, 110, 112, 113, 114, 115, 116, 117, 118, 119, 121, 131, 141, 151, 161, 171, 181, 191, 211, 311, 411, 511, 611, 711, 811, 911, 1001, 1010, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1021, 1031, 1041, 1051, 1061, 1071
Offset: 1

Views

Author

Keywords

Crossrefs

Subsequence of A011531.

Programs

  • Mathematica
    Select[Range[1100],DigitCount[#,10,1]==2&] (* Harvey P. Dale, Nov 30 2013 *)

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

A261020 Numbers k such that the set of the decimal digits is a subgroup of the multiplicative group (Z/mZ)* where m is the sum of the decimal digits of k.

Original entry on oeis.org

11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 31, 41, 51, 61, 71, 81, 91, 111, 124, 139, 142, 193, 214, 241, 319, 391, 412, 421, 913, 931, 1111, 1115, 1133, 1151, 1155, 1177, 1199, 1248, 1284, 1313, 1331, 1379, 1397, 1428, 1482, 1511, 1515, 1551, 1717, 1739, 1771, 1793
Offset: 1

Views

Author

Michel Lagneau, Aug 07 2015

Keywords

Comments

(Z/mZ)* is the multiplicative group of units of Z/mZ.
Let d(1)d(2)...d(q) be the q decimal digits of a number k. The principle of the algorithm is to compute all the products d(i)*d(j) (mod m) for 1 <= i,j <= q, and also the multiplicative inverse of each element such that if x is in the group, then there exists x' in the group where x*x' = 1.
The sequence is infinite because the numbers 11, 111, 1111, ... are in the sequence and generate the trivial subgroup {1}.
Only zerofree elements of A009996 have to be checked. Terms that match the criterion and permutations of their digits form all terms of this sequence due to commutativity of multiplication. - David A. Corneth, Aug 08 2015
To reduce cases, only check terms from A009995 (containing a 1 but no 0) for values m from digsum(term) to 81. - David A. Corneth, Aug 13 2015
Each decimal digit must be relatively prime to the decimal digit sum. - Tom Edgar, Aug 17 2015

Examples

			139 is a term because 1+3+9 = 13 and the elements {1, 3, 9} form a subgroup of the multiplicative group (Z/13Z)* with 12 elements. Each element is invertible: 1*1 == 1 (mod 13), 3*9 == 1 (mod 13) and 9*3 == 1 (mod 13). The other numbers of the sequence having the same property with (Z/13Z)* are 139, 193, 319, 391, 913, and 931.
1248 is in the sequence because 1+2+4+8 = 15 and the elements {1, 2, 4, 8} form a subgroup of the multiplicative group (Z/15Z)* with 8 elements: {1,2,4,7,8,11,13,14}.
		

Crossrefs

Programs

  • Maple
    nn:=2000:
    for n from 1 to nn do:
    x:=convert(n,base,10):nn0:=length(n):
    lst1:={op(x),x[nn0]}:n0:=nops(lst1):
    s:=sum('x[i]', 'i'=1..nn0):lst:={}:
       if  lst1[1]=1 then
        for j from 1 to n0 do:
         for l from j to n0 do:
          p:=irem(lst1[j]*lst1[l],s):lst:=lst union {p}:
         od:
        od:
        if lst=lst1
         then
           n3:=nops(lst1):lst2:={}:
            for c from 1 to n3 do:
              for d from 1 to n3 do:
               if irem(lst1[c]*lst1[d], s)=1
                then
                lst2:=lst2 union {lst1[c]}:
                else
               fi:
              od:
             od:
               if lst2=lst
               then
               printf(`%d, `, n):
               else
               fi:
              fi:
             fi:
         od:
  • Sage
    def is_group(n):
        DD=n.digits()
        digsum=sum(DD)
        D=Set(DD)
        if not(1 in D) or 0 in D:
            return false
        for x in D:
            for y in D:
                if not(gcd(y,digsum)==1):
                    return false
                if not((x*inverse_mod(y,digsum))%digsum in D):
                    return false
        return true
    [n for n in [1..2000] if is_group(n)] # Tom Edgar, Aug 17 2015

A266586 The least nonnegative integer N such that n*N has the same digits as n and N together, not counting repetitions.

Original entry on oeis.org

1, 6163, 51, 416, 251, 21, 967, 86, 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1255, 1, 781, 973, 26, 265, 24, 81, 1139, 1135, 51, 1, 291, 186, 151, 41, 936, 3001, 886, 982, 416, 1, 341, 315, 1464, 181, 734, 371, 958, 1921, 251, 1, 2412, 635, 846, 221, 1801, 125, 948, 845, 21, 1, 251, 585, 2213, 281, 1076
Offset: 1

Views

Author

M. F. Hasler, Jan 01 2016

Keywords

Comments

See A266578 for the variant where repeated digits are counted.
a(n) = 1 for 100 <= n <= 199 (and whenever n has a digit 1, cf. A011531), but then the sequence continues nontrivially with a(200,...) = (1255, 1, 751, 621, 251, 99, 511, 97, 101, 101, ...).
Record values are a(2) = 6163, a(2953) = 6521, a(3597) = 7209, a(5904) = 8047, a(23222) = 7681, a(39808) = 8011, a(39993) = 8231, a(44444) = 10151, ...
For small k=1,...,6, the graphs over the range 1 .. 10^(k+1) are roughly ("self"-)similar, because of the ranges 10^k .. 2*10^k-1 and (m+1/10)*10^k .. (m+2/10)*10^k-1 (with m=2,...,9) etc., on which a(n) = 1, while generically a(n) has values ranging quite uniformly between 1 and 10^4. For larger k, the picture changes, since pandigital numbers (and therefore also numbers having a digit '1') have asymptotic density one.

Examples

			a(2) = 6163 since 2*6163 = 12326 has the same digits (1, 2, 3 and 6) as concat(2,6163) = 26163, and 6163 is the least N with this property.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k,Ln,Lk,Lnk;
      Ln:= convert(convert(n,base,10),set);
      if has(Ln,1) then return 1 fi;
      for k from 2 do
        Lk:= convert(convert(k,base,10),set);
        Lnk:= convert(convert(n*k,base,10),set);
        if Lnk = Ln union Lk then return k fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Jan 01 2016
  • PARI
    A266586(n,L=9e9,d=digits(n))=for(k=1,L,Set(digits(k*n))==Set(concat(digits(k),d))&&return(k))
    
  • Python
    from itertools import count
    def a(n):
        digs = set(str(n))
        return next(N for N in count(1) if digs | set(str(N)) == set(str(n*N)))
    print([a(n) for n in range(1, 67)]) # Michael S. Branicky, Nov 15 2022

Formula

a(n) = 1 whenever n has a digit '1', i.e., n in A011531.
a(n) <= A266578(n) unless A266578(n) = 0.

A300907 a(n) is the least positive integer not yet in the sequence in which the largest digit of a(n-2) appears among its digits; a(1)=1, a(2)=2.

Original entry on oeis.org

1, 2, 10, 12, 11, 20, 13, 21, 3, 22, 23, 24, 30, 4, 31, 14, 32, 34, 33, 40, 35, 41, 5, 42, 15, 43, 25, 44, 45, 46, 50, 6, 51, 16, 52, 26, 53, 36, 54, 56, 55, 60, 57, 61, 7, 62, 17, 63, 27, 64, 37, 65, 47, 66, 67, 68, 70, 8, 71, 18, 72, 28, 73, 38, 74, 48, 75, 58, 76, 78, 77, 80
Offset: 1

Views

Author

Enrique Navarrete, Mar 14 2018

Keywords

Comments

Starting from the term a(89)=89, every term must contain a 9.

Examples

			For n=5, a(n-2) = 10 which has largest digit 1.  The positive integers containing 1 are 1, 10, 11, 12, 13, ... (A011531).  Since 1 and 10 are already in the sequence, a(5) = 11. - _Michael B. Porter_, Mar 17 2018
		

Crossrefs

Cf. A286890.

Programs

  • Mathematica
    FromDigits /@ Nest[Function[a, Append[a, Block[{k = 3, d}, While[Nand[FreeQ[a, #], MemberQ[#, Max@ a[[-2]]]] &@ Set[d, IntegerDigits@ k], k++]; d]]], {{1}, {2}}, 70] (* Michael De Vlieger, Mar 16 2018 *)

A043496 Numbers having four 1's in base 10.

Original entry on oeis.org

1111, 10111, 11011, 11101, 11110, 11112, 11113, 11114, 11115, 11116, 11117, 11118, 11119, 11121, 11131, 11141, 11151, 11161, 11171, 11181, 11191, 11211, 11311, 11411, 11511, 11611, 11711, 11811, 11911, 12111, 13111
Offset: 1

Views

Author

Keywords

Crossrefs

Subsequence of A011531.

Programs

  • Mathematica
    Select[Range[1111,14000],DigitCount[#,10,1]==4&] (* Harvey P. Dale, Dec 25 2023 *)
Previous Showing 51-60 of 73 results. Next