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 11-15 of 15 results.

A031953 Numbers with exactly two distinct base-8 digits.

Original entry on oeis.org

8, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 72, 74, 75, 76, 77, 78, 79, 81, 82, 89, 91, 97, 100, 105
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[100],Length[Union[IntegerDigits[#,8]]]==2&] (* Harvey P. Dale, Feb 15 2019 *)
  • PARI
    is(n)=#Set(digits(n, 8))==2 \\ Charles R Greathouse IV, Feb 15 2017
    
  • Python
    def ok(n): return len(set(oct(n)[2:])) == 2
    print(list(filter(ok, range(106)))) # Michael S. Branicky, Aug 10 2021

Extensions

Name edited by Michael S. Branicky, Aug 10 2021

A380974 Numbers k such that k*(k-1) is composed of exactly two different decimal digits.

Original entry on oeis.org

4, 5, 6, 7, 8, 9, 10, 11, 17, 24, 25, 32, 34, 67, 75, 78, 100, 101, 142, 167, 334, 667, 1000, 1001, 1667, 3334, 6667, 10000, 10001, 16667, 33334, 66667, 100000, 100001, 166667, 333334, 666667, 1000000, 1000001, 1666667, 3333334, 6666667, 10000000, 10000001, 16666667, 33333334, 66666667, 100000000
Offset: 1

Views

Author

Robert Israel, Feb 11 2025

Keywords

Comments

Numbers k such that A002378(k-1) is in A031955.
Conjecture: all terms >= 334 are of the form 10...0, 10...01, 16...67, 3...34, or 6...67.
Last decimal digit of a(n)*(a(n)-1) is either 0, 2 or 6. - Chai Wah Wu, Feb 19 2025

Examples

			a(10) = 23 is a term because 23 * 24 = 552 contains two different digits 2 and 5.
		

Crossrefs

Programs

  • Maple
    select(k -> nops(convert(convert(k*(k+1),base,10),set)) = 2, [$1..10^6]);
  • Mathematica
    Select[Range[10^7],Length[Union[IntegerDigits[#*(#-1)]]]==2&] (* James C. McMahon, Feb 13 2025 *)
  • PARI
    isok(k) = #Set(digits(k*(k-1))) == 2; \\ Michel Marcus, Feb 11 2025
    
  • Python
    from math import isqrt
    from itertools import count, combinations, product, islice
    def A380974_gen(): # generator of terms
        for n in count(1):
            c = []
            for a in combinations('0123456789',2):
                if '0' in a or '2' in a or '6' in a:
                    for b in product(a,repeat=n):
                        if b[0] != '0' and b[-1] in {'0','2','6'} and b != (a[0],)*n and b != (a[1],)*n:
                            m = int(''.join(b))
                            q = isqrt(m)
                            if q*(q+1)==m:
                                c.append(q+1)
            yield from sorted(c)
    A380974_list = list(islice(A380974_gen(),30)) # Chai Wah Wu, Feb 19 2025

Formula

Conjectured: for k >= 0,
a(20 + 5*k) = (10^(3+k) + 2)/6,
a(21 + 5*k) = (10^(3+k) + 2)/3,
a(22 + 5*k) = (2*10^(3+k)+1)/3,
a(23 + 5*k) = 10^(3+k),
a(24 + 5*k) = 10^(3+k) + 1.
Conjectured G.f.: (4*x + 5*x^2 + 6*x^3 + 7*x^4 + 8*x^5 - 35*x^6 - 45*x^7 - 55*x^8 - 60*x^9 - 64*x^10 - 34*x^11 - 28*x^12 - 27*x^13 - 50*x^14 - 109*x^15 - 107*x^16 - 152*x^17 - 163*x^18 - 425*x^19 - 418*x^20 - 274*x^21 - 113*x^22 + 229*x^23 + 109*x^24 + 580*x^25 + 440*x^26 + 330*x^27 + 10*x^28 + 410*x^29)/(1 - 11 * x^5 + 10 * x^10).

A334963 a(n) is the least positive multiple of n that has at most two distinct digits.

Original entry on oeis.org

1122, 515, 1144, 525, 212, 535, 1188, 545, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 600, 121, 122, 3444, 744, 500, 252, 889, 4224, 774, 10010, 131, 660, 133, 4422, 4455, 272, 411, 414, 556, 700, 141, 994, 858, 144, 3335, 292, 441, 444, 447, 300, 151, 2888
Offset: 102

Views

Author

David A. Corneth, May 17 2020

Keywords

Examples

			a(102) = 1122 as 1122 = 11*102 is the least multiple of 102 that has at most 2 distinct digits.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = n}, While[Length @ Select[DigitCount[k, 10], # > 0 &] > 2, k += n]; k]; Array[a, 51, 102] (* Amiram Eldar, May 21 2020 *)
  • PARI
    a(n) = for(i = 1, oo, if(#Set(digits(i*n))<3, return(i*n)))

Formula

a(n) <= A004290(n).
a(n) = n if n is in A031955. - Bernard Schott, May 17 2020

A380997 a(n) is the least number with exactly 2 different decimal digits that is a multiple of n.

Original entry on oeis.org

10, 10, 12, 12, 10, 12, 14, 16, 18, 10, 110, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 110, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 330, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 220, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 110, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 330, 67, 68, 69, 70, 71, 72, 73
Offset: 1

Views

Author

Robert Israel, Feb 11 2025

Keywords

Comments

a(n) is the least multiple of n that is in A031955.

Examples

			a(22) = 110 because 110 has two different decimal digits 0 and 1, is a multiple of 22, and no smaller multiple of 22 works.
		

Crossrefs

Cf. A031955.

Programs

  • Maple
    f:= proc(n) local d,i,s,S;
           S:= select(t -> nops(convert(convert(t*n mod 100,base,10),set)) <= 2, [$1..99] );
           for d from 3 do
             S:= select(s -> nops(convert(convert(s*n mod 10^d,base,10),set)) <= 2,
                   [seq(seq(s+i*10^(d-1),s = S),i=0..9)]);
             for s in S do if nops(convert(convert(s*n,base,10),set)) = 2  then return s*n fi od;
           od;
    end proc:
    map(f, [$1..1000]);
  • Mathematica
    a[n_]:=Module[{k=n}, While[Length[DeleteDuplicates[IntegerDigits[k]]]!=2, k+=n]; k]; Array[a,73] (* Stefano Spezia, Feb 13 2025 *)
  • PARI
    a(n) = my(k=n); while(#Set(digits(k)) != 2, k+=n); k; \\ Michel Marcus, Feb 13 2025

A288040 Integers whose number of distinct decimal digits is prime.

Original entry on oeis.org

10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 100, 101
Offset: 1

Views

Author

Jonathan Frech, Jun 04 2017

Keywords

Comments

Differs from A139819 (which contains, for example, 1234, a number with 4 distinct decimal digits). - R. J. Mathar, Jun 14 2017

Crossrefs

Union of A031955 and A031962 and ....

Programs

  • Mathematica
    Select[Range@ 101, PrimeQ@ Count[DigitCount[#], ?(# != 0 &)] &] (* _Michael De Vlieger, Jun 06 2017 *)
  • PARI
    isok(m) = isprime(#Set(digits(m))); \\ Michel Marcus, May 10 2020
  • Python
    from sympy import isprime
    print([n for n in range(1, 100) if isprime(len(set(str(n))))])
    
Previous Showing 11-15 of 15 results.