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

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).
Showing 1-1 of 1 results.