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 61-70 of 73 results. Next

A118951 Numbers containing at least one composite digit.

Original entry on oeis.org

4, 6, 8, 9, 14, 16, 18, 19, 24, 26, 28, 29, 34, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 54, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 74, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 104, 106, 108, 109, 114
Offset: 1

Views

Author

Rick L. Shepherd, May 06 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[120],ContainsAny[IntegerDigits[#],{4,6,8,9}]&] (* Harvey P. Dale, Sep 06 2018 *)

A237713 Composite numbers n such that the distinct digits in n and the distinct digits in the proper divisors of n are the same.

Original entry on oeis.org

125, 1255, 2510, 11009, 11099, 11255, 11379, 12326, 12955, 14379, 14397, 15033, 15303, 16325, 17482, 21109, 25105, 31007, 31503, 33011, 35213, 37127, 37921, 41303, 44011, 49319, 51367, 53491, 63013, 69413, 70319, 71057, 72013, 72517, 74341, 77011, 81767
Offset: 1

Views

Author

Michel Lagneau, Feb 12 2014

Keywords

Comments

Since 1 is always a divisor of n, this is a subsequence of A011531. - Michel Marcus, Feb 12 2014

Examples

			125 is in the sequence because the proper divisors of 125 are {1, 5, 25} with the same digits as 125.
		

Crossrefs

See A282755 for a variant.

Programs

  • Mathematica
    Pn[n_]:=Sort[DeleteDuplicates[Flatten[IntegerDigits[Take[Divisors[n],DivisorSigma[0,n]-1]]]]];Fn[n_]:=Sort[DeleteDuplicates[IntegerDigits[n]]];lst={};Do[If[!PrimeQ[n]&&Pn[n]===Fn[n],AppendTo[lst,n]],{n,2,10^5}];lst
    Select[Range[10^5], ! PrimeQ@# && Union@ IntegerDigits@ # == Union @@ IntegerDigits /@ Most@ Divisors@ # &] (* Giovanni Resta, Feb 12 2014 *)
  • PARI
    isok(n) = { my(digs = []); fordiv(n, d, if (d != n, digs = concat(digs, digits(d)))); (n != 1) && !isprime(n) && vecsort(digs,,8) == vecsort(digits(n),,8);} \\ Michel Marcus, Feb 12 2014

A239134 Smallest k such that n^k contains k as a substring in its decimal representation.

Original entry on oeis.org

1, 6, 7, 6, 2, 6, 3, 4, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 4, 2, 3, 2, 4, 2, 4, 3, 7, 1, 2, 3, 3, 2, 2, 3, 5, 2, 6, 1, 8, 4, 4, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 4, 2, 4, 3, 6, 1, 3, 5, 6, 2, 4, 3, 2, 3, 3, 1, 3, 2, 6, 2, 3, 2, 6, 2, 4, 1, 2, 4, 4
Offset: 1

Views

Author

Derek Orr, Mar 10 2014

Keywords

Comments

It seems very likely a(n) < 10 for all n (even stronger, a(n) < 9 for all n).
It also seems very likely a(n) = {1,2,3} for sufficiently large n.
Counterexample: a(10^d - 2) = 6 for d >= 2. - Robert Israel, Sep 16 2024

Examples

			5^1 = 5 does not contain a 1 but 5^2 = 25 does contain a 2 so a(5) = 2.
7^1 = 7 does not contain a 1, 7^2 = 49 does not contain a 2, but 7^3 = 343 does contain a 3 so a(7) = 3.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      for k from 1 to 9 do
        if member(k,convert(n^k,base,10)) then return k fi
      od;
      FAIL
    end proc:
    map(f, [$1..100]); # Robert Israel, Sep 16 2024
  • Mathematica
    a[n_] := Block[{k=1}, While[{} == StringPosition[ ToString[n^k], ToString[k]], k++]; k]; Array[a, 84] (* Giovanni Resta, Mar 11 2014 *)
    sk[n_]:=Module[{k=1},While[SequenceCount[IntegerDigits[n^k],IntegerDigits[k]] == 0,k++];k]; Array[sk,90] (* Harvey P. Dale, May 12 2022 *)
  • Python
    def Sub(x):
      for n in range(10**3):
        if str(x**n).find(str(n)) > -1:
          return n
    x = 1
    while x < 10**3:
      print(Sub(x))
      x += 1

Formula

a(A011531(k))=1, any k.
a(10*n) = a(n) if a(n) < 10. - Robert Israel, Sep 16 2024

A302566 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, and a(n) cannot share digits with a(n-1); a(1) = 1, a(2) = 2.

Original entry on oeis.org

1, 2, 10, 22, 11, 20, 13, 24, 3, 4, 23, 14, 30, 41, 32, 40, 31, 42, 33, 44, 35, 46, 5, 6, 15, 26, 45, 16, 25, 36, 50, 61, 52, 60, 51, 62, 53, 64, 55, 63, 54, 66, 57, 68, 7, 8, 17, 28, 37, 18, 27, 38, 47, 58, 67, 48, 70, 81, 72, 80, 71, 82, 73, 84, 75, 83, 74, 85, 76, 88, 77, 86, 79, 108, 9, 78, 19, 87
Offset: 1

Views

Author

Enrique Navarrete, Apr 09 2018

Keywords

Comments

The only pairs of consecutive numbers are 1, 2; 3, 4; 5, 6; 7, 8.
The 2-digit numbers that are not in the sequence are 12, 21, 34, 43, 56, 65, 89, 98 (78 and 87 do appear at n = 76 and n = 78, respectively).
The last 2-digit number to appear is 91 at n = 113.
Starting from a(73) = 79, the first term of alternating terms must contain 9, and the second term must contain 8.
If the initial terms of this sequence are swapped (by defining a(1)=2 and a(2)=1) then the resulting sequence is identical to this for n>12. - R. J. Cano, Apr 13 2018

Examples

			a(4) = 22 since it contains the largest digit from a(2) = 2, and can't be 12 since the digit 1 appears in a(3) = 10.
		

Crossrefs

Programs

  • Mathematica
    Nest[Append[#, Block[{k = 2, d}, While[Nand[FreeQ[#[[All, 1]], k], MemberQ[Set[d, IntegerDigits[k]], Max[#[[-2, -1]] ] ], ! IntersectingQ[d, #[[-1, -1]]] ], k++]; {k, d}]] &, Transpose@ {#, IntegerDigits@ #} &@ Range[2], 73][[All, 1]] (* Michael De Vlieger, Apr 12 2018 *)
  • PARI
    \\ See Links section.

A317180 a(n) is the least positive multiple of n that contains at least one digit 1 in its decimal representation.

Original entry on oeis.org

1, 10, 12, 12, 10, 12, 14, 16, 18, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 100, 21, 110, 115, 120, 100, 104, 81, 112, 116, 120, 31, 128, 132, 102, 105, 108, 111, 114, 117, 120, 41, 126, 129, 132, 135, 138, 141, 144, 147, 100, 51, 104, 106, 108, 110, 112, 114
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.
		

Crossrefs

Programs

  • Mathematica
    on1[n_]:=Module[{k=1},While[DigitCount[k*n,10,1]<1,k++];k*n]; Array[on1,60] (* Harvey P. Dale, Apr 09 2022 *)
  • PARI
    a(n) = forstep (m=n, oo, n, if (setsearch(Set(digits(m)), 1), return (m)))

Formula

a(n) = n * A317173(n).
a(n) <= A187285(n).

Extensions

Definition clarified by Harvey P. Dale, Apr 09 2022

A343839 Semi-one numbers: Positive integers k such that exactly half of the integers 1..k have a 1 in their decimal expansion.

Original entry on oeis.org

2, 16, 24, 160, 270, 272, 1456, 3398, 3418, 3420, 3422, 13120, 44686, 118096, 674934, 1062880
Offset: 1

Views

Author

Adam Atkinson, May 01 2021

Keywords

Comments

There are only these 16 semi-one numbers. That there can only be finitely many is fairly easy to show: consider how many 100-billion-digit numbers have no 1s in them. Eventually the proportion of 1-less numbers drops below 50% and stays there. 5217031 numbers up to 9999999 have a 1 in them so proportion of 1-ful numbers can't drop below 50% for numbers with more digits. Hence the search program can stop at 10 million.

Examples

			16 is semi-1 because 1,10,11,12,13,14,15,16 have a 1 in them, there are 8 such numbers, and 8 is half of 16. 2 is semi-1 because 1 has a 1 in it and 2 does not.
		

Crossrefs

Programs

  • Mathematica
    s = {}; c = 0; Do[If[DigitCount[n, 10, 1] > 0, c++]; If[n == 2*c, AppendTo[s, n]], {n, 1, 1062880}]; s (* Amiram Eldar, May 01 2021 *)
    With[{nn=11*10^5},Select[Partition[Riffle[Range[nn],Accumulate[Table[If[DigitCount[n,10,1]>0,1,0],{n,nn}]]],2],#[[1]]==2#[[2]]&]][[;;,1]] (* Harvey P. Dale, Jun 23 2023 *)
  • PARI
    lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, #va, va[n] = va[n-1] + (#select(x->(x==1), digits(n)) > 0);); for (n=1, nn, if (va[n] == n/2 , print1(n, ", ")););} \\ Michel Marcus, May 02 2021
  • Perl
    for (1..10000000) {
            if (/1/) {
                    $s++;
                    }
            if ($_==2*$s) {
                    print $_."\n";
                    }
            }
    

A383749 Positive numbers k whose decimal expansion does not contain the decimal expansion of any proper divisor of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 23, 27, 29, 34, 37, 38, 43, 46, 47, 49, 53, 54, 56, 57, 58, 59, 67, 68, 69, 73, 74, 76, 78, 79, 83, 86, 87, 89, 94, 97, 98, 203, 207, 209, 223, 227, 229, 233, 239, 247, 249, 253, 257, 259, 263, 267, 269, 277, 283, 289, 293, 299, 307
Offset: 1

Views

Author

Rémy Sigrist, May 08 2025

Keywords

Comments

Also fixed points of A121042.
This sequence is infinite as it contains A173041.
a(n) > 5 contains no decimal digit 1 and does not end in 2 or 5. - Michael S. Branicky, May 11 2025

Examples

			The proper divisors of 54 are 1, 2, 3, 6, 9, 18 and 27; none of them appear in the decimal expansion of 54 so 54 belongs to this sequence.
		

Crossrefs

A038603 and A173041 are subsequences.

Programs

  • Mathematica
    A383749Q[k_] := SelectFirst[Divisors[k], StringContainsQ[IntegerString[k], IntegerString[#]] &] == k;
    Select[Range[500], A383749Q] (* Paolo Xausa, May 12 2025 *)
  • PARI
    is(n, base = 10) = {
        my (d = digits(n, base));
        for (i = 1, #d,
            if (d[i],
                for (j = i, #d,
                    if ((i!=1 || j!=#d) && n % fromdigits(d[i..j], base)==0,
                        return (0);););););
        return (1);}
    
  • Python
    from itertools import count, islice
    from sympy import divisors
    def A383749_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:not any(dA383749_list = list(islice(A383749_gen(),40)) # Chai Wah Wu, May 10 2025
    
  • Python
    def ok(n):
        s = str(n)
        subs = (s[i:j] for i in range(len(s)) for j in range(i+1, len(s)+1) if s[i]!='0')
        return n and not any(n%v == 0 for ss in subs if n > (v:=int(ss)) > 0)
    print([k for k in range(308) if ok(k)]) # Michael S. Branicky, May 11 2025

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 *)

A275512 The consecutive sizes of the blocks of terms containing at least one digit "1" are given by the sequence itself.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 12, 13, 14, 22, 15, 16, 17, 18, 23, 19, 21, 31, 41, 51, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 71, 81, 91, 100, 101, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90
Offset: 1

Views

Author

Eric Angelini, Jul 31 2016

Keywords

Comments

The sequence starts with a(1) = 1 and is extended with the smallest integer not yet used that does not lead to a contradiction.

Examples

			The blocks of terms including at least a digit "1" are indicated here by parentheses; the successive block-sizes are 1, 2, 3, 4, 5,... which reproduces the sequence itself: (1),2,3,4,5,6,7,8,9,(10,11),20,(12,13,14),22,(15,16,17,18),23,(19,21,31,41,51),24...
		

Crossrefs

Programs

  • Maple
    isA011531 := proc(n)
        nops(convert(convert(n,base,10),set) intersect {1}) > 0 ;
        simplify(%) ;
    end proc:
    A011531_next := proc(n)
        local a;
        for a from n+1 do
            if isA011531(a) then
                return a;
            end if;
        end do:
    end proc:
    isA052383 := proc(n)
        not isA011531(n) ;
    end proc:
    A052383_next := proc(n)
        local a;
        for a from n+1 do
            if isA052383(a) then
                return a;
            end if;
        end do:
    end proc:
    A275512grp1 := proc(a)
        local idx1,n ;
        idx1 := 0 ;
        if isA052383(a) then
            return 0;
        end if;
        for n from 1 do
            if isA011531(A275512(n)) then
                if n =1 then
                    idx1 := 1;
                elif isA052383(A275512(n-1)) then
                    idx1 := idx1+1 ;
                end if;
            end if;
            if A275512(n) = a then
                return idx1 ;
            end if;
        end do:
    end proc:
    A275512 := proc(n)
        option remember;
        local a,aprev,prev1,grp1,d,seen,reqlen,npr;
        if n =1 then
            1;
        else
            for a from 2 do
                seen := false;
                for npr from 1 to n-1 do
                    if procname(npr) = a then
                        seen := true;
                        break;
                    end if;
                end do:
                if not seen then
                    aprev := procname(n-1) ;
                    if isA052383(aprev) then
                        return a;
                    else
                        prev1 := 0 ;
                        for d from 1 to n-1 do
                            if isA011531(procname(n-d)) then
                                prev1 := prev1+1 ;
                            else
                                break;
                            end if;
                        end do:
                        grp1 := A275512grp1(aprev) ;
                        reqlen := procname(grp1) ;
                        if reqlen > prev1 then
                            return A011531_next(aprev) ;
                        elif n-prev1-1 > 0 then
                            return A052383_next(procname(n-prev1-1)) ;
                        else
                            return 2 ;
                        end if;
                    end if;
                end if;
            end do;
        end if;
    end proc:
    seq(A275512(n),n=1..100) ; # R. J. Mathar, Jul 31 2016

A282755 Numbers k such that the set of all the decimal digits of k is the same as the set of all the decimal digits of the proper divisors of k.

Original entry on oeis.org

11, 125, 1255, 2510, 11009, 11099, 11255, 11379, 12326, 12955, 14379, 14397, 15033, 15303, 16325, 17482, 21109, 25105, 31007, 31503, 33011, 35213, 37127, 37921, 41303, 44011, 49319, 51367, 53491, 63013, 69413, 70319, 71057, 72013, 72517, 74341, 77011, 81767
Offset: 1

Views

Author

Michel Lagneau, Feb 21 2017

Keywords

Comments

The primes of the form (10^n - 1)/9 are terms (A004022).
A majority of numbers of the sequence are semiprimes (so with 3 proper divisors), except 11, 125, 2510, 16325, 21109, 72013, 126530, 132644, 163025, ... with the corresponding number of proper divisors 1, 3, 7, 5, 7, 7, 7, 5, 5, 5, 7, 7, ...
The even numbers of the sequence are rarer than the odd numbers: 2510, 12326, 17482, 105002, 123206, ...
All terms have a 1 in their decimal representation (A011531). - Michel Marcus, Feb 23 2017
The union of 11 and A237713. - R. J. Mathar, Mar 06 2017

Examples

			16325 is in the sequence because the set of the digits is E = {1, 2, 3, 5, 6} and the proper divisors (or aliquot parts) of 16325 are 1, 5, 25, 653 and 3265 with the same set of digits.
		

Crossrefs

A variant of A237713.

Programs

  • Maple
    with(numtheory):
    for n from 1 to 200000 do:
    z:=convert(n,base,10):n0:=nops(z):lst1:={op(z),z[n0]}:
    x:=divisors(n):n1:=nops(x):lst:={}:
      for m from 1 to n1-1 do:
       y:=convert(x[m],base,10):n2:=nops(y):
       lst2:={op(y),y[n2]}:lst:=lst union lst2
       od:
       if lst1=lst then
       printf(`%d, `,n):
       else
      fi:
    od:
  • Mathematica
    Select[Range[10^5], Function[k, Union@ Flatten@ Map[IntegerDigits, Most@ Divisors@ k] == Union@ IntegerDigits@ k]] (* Michael De Vlieger, Feb 25 2017 *)
Previous Showing 61-70 of 73 results. Next