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

A018885 Squares using no more than two distinct digits.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 225, 400, 441, 484, 676, 900, 1444, 7744, 10000, 11881, 29929, 40000, 44944, 55225, 69696, 90000, 1000000, 4000000, 9000000, 9696996, 100000000, 400000000, 900000000, 6661661161, 10000000000
Offset: 1

Views

Author

Keywords

Comments

Is 6661661161 the largest term not of the form 10^k, 4*10^k or 9*10^k? Any larger ones must have >= 22 digits. - Robert Israel, Dec 03 2015

Crossrefs

Programs

  • Maple
    F:= proc(r, a, b, m)
    # get all squares starting with r, with at most m further digits, all from {a,b} where a < b
    local res,Ls,Us,L,U,looking;
    if issqr(r) then res:= r else res:= NULL fi;
    if m = 0 then return res fi;
    Ls:= r*10^m + a*(10^m-1)/9;
    Us:= r*10^m + b*(10^m-1)/9;
    L:= isqrt(Ls);
    if L^2 > Ls then L:= L-1 fi;
    U:= isqrt(Us);
    if U^2 < Us then U:= U+1 fi;
    if L > U then res
    else res, procname(10*r+a,a,b,m-1), procname(10*r+b,a,b,m-1)
    fi
    end proc:
    S2:= {seq(i^2 mod 100, i=0..99)}:
    prs:= map(t -> `if`(t < 10, {0,t},{(t mod 10),(t - (t mod 10))/10}), S2):
    prs:= map(p -> `if`(nops(p)=1, seq(p union {s},s={$0..9} minus p), p), prs):
    Res:= NULL:
    for p in prs do
      a:= min(p); b:= max(p);
      if a > 0 then
         Res:= Res, F(a,a,b,14);
      fi;
      Res:= Res, F(b,a,b,14);
    od:
    sort(convert({0,Res},list)); # Robert Israel, Dec 03 2015
  • Mathematica
    Select[Range[0, 10^5]^2, Length@ Union@ IntegerDigits@ # <= 2 &] (* Michael De Vlieger, Dec 03 2015 *)
    Select[Range[0,100000]^2,Count[DigitCount[#],0]>7&] (* Harvey P. Dale, Jul 25 2020 *)
  • PARI
    for (n=0, 10^6, if ( #Set(digits(n^2))<=2, print1(n^2, ", ") ) ); \\ Michel Marcus, May 21 2015

Formula

For n > 4, a(n) = A016069(n-4)^2.

Extensions

0 inserted and definition edited by Jon E. Schoenfield, Jan 15 2014

A018884 Squares using at most two distinct digits, not ending in 0.

Original entry on oeis.org

1, 4, 9, 16, 25, 36, 49, 64, 81, 121, 144, 225, 441, 484, 676, 1444, 7744, 11881, 29929, 44944, 55225, 69696, 9696996, 6661661161
Offset: 1

Views

Author

Keywords

Comments

No other terms below 10^41.
The sequence is probably finite.
The two distinct digits of a term cannot both be in the set {0,2,3,7,8}. Looking at the digits (with leading zeros) of i^2 mod 10^4 for 0 <= i < 10^4 shows that there are no repunit terms > 10 and the two distinct digits of a term must be one of the following 21 pairs: '01', '04', '09', '12', '14', '16', '18', '24', '25', '29', '34', '36', '45', '46', '47', '48', '49', '56', '67', '69', '89'. - Chai Wah Wu, Apr 06 2019

References

  • Richard K. Guy, Unsolved Problems in Number Theory, Section F24 (at p. 262) (Springer-Verlag, 2d ed. 1994).

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Select[Flatten[Table[FromDigits/@Tuples[{a,b},n],{n,10}]], IntegerQ[ Sqrt[#]]&],{a,9},{b,9}]]//Union (* Harvey P. Dale, Sep 21 2018 *)

A016070 Numbers k such that k^2 contains exactly 2 different digits, excluding 10^m, 2*10^m, 3*10^m.

Original entry on oeis.org

4, 5, 6, 7, 8, 9, 11, 12, 15, 21, 22, 26, 38, 88, 109, 173, 212, 235, 264, 3114, 81619
Offset: 1

Views

Author

Keywords

Comments

No other terms below 3.16*10^20 (derived from A018884).

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 109, p. 38, Ellipses, Paris 2008.
  • R. K. Guy, Unsolved Problems in Number Theory, F24.

Crossrefs

Programs

  • Mathematica
    Select[Range[100000],Length[DeleteCases[DigitCount[#^2],0]]==2 && !Divisible[ #,10]&] (* Harvey P. Dale, Aug 15 2013 *)
    Reap[For[n = 4, n < 10^5, n++, id = IntegerDigits[n^2]; If[FreeQ[id, {, 0 ...}], If[Length[Union[id]] == 2, Sow[n]]]]][[2, 1]] (* _Jean-François Alcover, Sep 30 2016 *)
  • Python
    from gmpy2 import is_square, isqrt
    from itertools import combinations, product
    A016070_list = []
    for g in range(2,20):
        n = 2**g-1
        for x in combinations('0123456789',2):
            if not x in [('0','1'), ('0','4'), ('0','9')]:
                for i,y in enumerate(product(x,repeat=g)):
                    if i > 0 and i < n and y[0] != '0':
                        z = int(''.join(y))
                        if is_square(z):
                            A016070_list.append(isqrt(z))
    A016070_list = sorted(A016070_list) # Chai Wah Wu, Nov 03 2014

Formula

A043537(a(n)) = 2. [Reinhard Zumkeller, Aug 05 2010]

A322570 Positive integers k such that A270710(k) (= (k+1)*(3*k-1)) have only 1 or 2 different digits in base 10.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 12, 16, 17, 33, 34, 48, 54, 285, 333, 334, 365, 385, 430, 471, 516, 816, 1049, 3333, 3334, 33333, 33334, 333333, 333334, 483048, 3333333, 3333334, 33333333, 33333334, 333333333, 333333334, 3333333333, 3333333334, 33333333333, 33333333334
Offset: 1

Views

Author

Seiichi Manyama, Aug 29 2019

Keywords

Crossrefs

Cf. A002277, A016069, A093137, A213517 (in case of triangular numbers), A270710, A322571.

Programs

  • Magma
    [k:k in [1..10000000]| #Set(Intseq((k+1)*(3*k-1))) le 2]; // Marius A. Burtea, Aug 29 2019
  • Mathematica
    Select[Range@ 50000, Length@ Union@ IntegerDigits[3 #^2 + 2 # - 1] <= 2 &] (* Giovanni Resta, Sep 04 2019 *)
  • PARI
    for(k=1, 1e8, if(#Set(digits(3*k^2+2*k-1))<=2, print1(k", ")))
    

Formula

For k > 0, A002277(k) is a term.
For k >= 0, A002277(k) + 1 (= A093137(k)) is a term.

Extensions

a(35)-a(36) from Jinyuan Wang, Aug 30 2019
a(37)-a(40) from Giovanni Resta, Sep 04 2019

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

A057659 Prime numbers whose square is composed of just two different decimal digits.

Original entry on oeis.org

5, 7, 11, 109, 173, 81619
Offset: 1

Views

Author

Carlos Rivera, Oct 15 2000

Keywords

Comments

Conjectured to be a finite sequence.
No further terms up to prime(1000000)=15485863. - Harvey P. Dale, Mar 20 2011

Examples

			81619^2 = 6661661161.
		

References

  • Related to the Unsolved problem F24, p. 262, of the UPiNT by R. K. Guy

Crossrefs

Subsequence of A016069.
Cf. A235154.

Programs

  • Maple
    filter:= p -> nops(convert(convert(p^2,base,10),set))= 2:
    select(filter, [seq(ithprime(i),i=1..10^5)]); # Robert Israel, Feb 11 2025
  • Mathematica
    Select[Prime[Range[10000]],Count[DigitCount[#^2],0] ==8&] (* Harvey P. Dale, Mar 20 2011 *)
  • PARI
    select(x->#Set(digits(x^2))==2, primes(10000)) \\ Michel Marcus, Feb 11 2025

A247045 Triangle read by rows: T(n,k) = least number m > 0 such that m^k in base n contains exactly k distinct digits, 1 <= k <= n.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 1, 2, 3, 5, 1, 3, 3, 6, 12, 1, 3, 5, 7, 7, 15, 1, 3, 5, 9, 5, 17, 15, 1, 4, 5, 10, 9, 7, 11, 33, 1, 3, 5, 7, 11, 19, 14, 16, 53, 1, 4, 5, 6, 7, 13, 13, 14, 21, 36, 1, 4, 5, 7, 10, 8, 12, 12, 16, 42, 41, 1, 4, 6, 16, 11, 8, 19, 19, 16, 28, 35, 55, 1, 4, 6, 9, 9, 14, 10, 18, 14
Offset: 1

Views

Author

Derek Orr, Sep 10 2014

Keywords

Examples

			T(n,k) is given by (row n corresponds to base n):
1;
1, 2;
1, 3, 4;
1, 2, 3,  5;
1, 3, 3,  6, 12;
1, 3, 5,  7,  7, 15;
1, 3, 5,  9,  5, 17, 15;
1, 4, 5, 10,  9,  7, 11, 33;
1, 3, 5,  7, 11, 19, 14, 16, 53;
1, 4, 5,  6,  7, 13, 13, 14, 21, 36; (base 10)
1, 4, 5,  7, 10,  8, 12, 12, 16, 42, 41;
Example: T(7,3) = 5 means that 5 is the smallest number such that 5^3 in base 7 (which is 125 in base 7 = 236) has 3 distinct digits (2, 3, and 6).
		

Crossrefs

Programs

  • PARI
    print1(1,", ");n=2;while(n<20,m=1;for(k=1,n,while(m,d=digits(m^k,n);if(#vecsort(d,,8)!=k,m++);if(#vecsort(d,,8)==k,print1(m,", ");m=1;break)));n++)

A247047 Numbers k such that k^2 contains exactly 2 distinct digits and k^3 contains exactly 3 distinct digits.

Original entry on oeis.org

5, 6, 8, 9, 15, 30, 173, 300, 3000, 30000, 300000, 3000000, 30000000, 300000000, 3000000000, 30000000000, 300000000000, 3000000000000, 30000000000000, 300000000000000, 3000000000000000
Offset: 1

Views

Author

Derek Orr, Sep 10 2014

Keywords

Comments

Intersection of A016069 and A155146.
This sequence is infinite since 3*10^k is always in this sequence for k > 0.
Is 173 the last term not of the form 3*10^k?
3*10^7 < a(14) <= 3*10^8.
The numbers k such that k^2 contains 2 distinct digits, k^3 contains 3 distinct digits, and k^4 contains 4 distinct digits are conjectured to only be 6, 8, and 15. (Intersection of A016069, A155146, and A155150.)

Examples

			k = 15 is a member of this sequence since 15^2 = 225 contains two distinct digits and 15^3 = 3375 contains three distinct digits.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[3*10^6],Length[DeleteCases[DigitCount[#^2],0]]==2&&Length[ DeleteCases[ DigitCount[#^3],0]]==3&] (* The program generates the first 12 terms of the sequence. *) (* Harvey P. Dale, Jan 21 2023 *)
  • PARI
    for(n=1,3*10^7,d2=digits(n^2);d3=digits(n^3);if(#vecsort(d2,,8)==2&&#vecsort(d3,,8)==3,print1(n,", ")))
    
  • Python
    A247047_list = [n for n in range(1,10**6) if len(set(str(n**3))) == 3 and len(set(str(n**2))) == 2]
    # Chai Wah Wu, Sep 26 2014

Extensions

a(14)-a(15) from Chai Wah Wu, Sep 26 2014
a(16)-a(18) from Kevin P. Thompson, Jul 01 2022
a(19)-a(21) from Michael S. Branicky, Jun 05 2025
Previous Showing 11-18 of 18 results.