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

A014716 Incomplete version of A016070.

Original entry on oeis.org

38, 88, 109, 173, 212, 235, 3114
Offset: 0

Views

Author

Keywords

A043537 Number of distinct base-10 digits of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2
Offset: 1

Views

Author

Keywords

Comments

a(A000079(A130694(n))) = 10. - Reinhard Zumkeller, Jul 29 2007
a(A000290(A016070(n))) = 2. - Reinhard Zumkeller, Aug 05 2010
a(n) = 10 for almost all n. - Charles R Greathouse IV, Oct 02 2013

Crossrefs

Programs

A016069 Numbers k such that k^2 contains exactly 2 distinct digits.

Original entry on oeis.org

4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 20, 21, 22, 26, 30, 38, 88, 100, 109, 173, 200, 212, 235, 264, 300, 1000, 2000, 3000, 3114, 10000, 20000, 30000, 81619, 100000, 200000, 300000, 1000000, 2000000, 3000000, 10000000, 20000000, 30000000, 100000000, 200000000, 300000000
Offset: 1

Views

Author

Keywords

Comments

10^k, 2*10^k, 3*10^k for k > 0 are terms. - Chai Wah Wu, Dec 17 2021
Subsequence of primes is A057659. - Bernard Schott, Jul 29 2022

Examples

			26 is in the sequence because 26^2 = 676 contains exactly 2 distinct digits.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, F24.

Crossrefs

Programs

  • Haskell
    import Data.List (nub)
    a016069 n = a016069_list !! (n-1)
    a016069_list = filter ((== 2) . length . nub . show . (^ 2)) [0..]
    -- Reinhard Zumkeller, Apr 14 2011
    
  • Magma
    [n: n in [0..20000000] | #Set(Intseq(n^2)) eq 2]; // Vincenzo Librandi, Nov 04 2014
  • Mathematica
    Join[Select[Range[90000],Count[DigitCount[#^2],?(#!=0&)]==2&],Flatten[ NestList[ 10#&,{100000,200000,300000},5]]] (* _Harvey P. Dale, Mar 09 2013 *)
    Select[Range[20000000], Length[Union[IntegerDigits[#^2]]]==2&] (* Vincenzo Librandi, Nov 04 2014 *)
  • PARI
    /* needs version >= 2.6 */
    for (n=1, 10^9, if ( #Set(digits(n^2))==2, print1(n,", ") ) );
    /* Joerg Arndt, Mar 09 2013 */
    
  • Python
    from gmpy2 import is_square, isqrt
    from itertools import combinations, product
    A016069_list = []
    for g in range(2,10):
        n = 2**g-1
        for x in combinations('0123456789',2):
            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):
                        A016069_list.append(int(isqrt(z)))
    A016069_list = sorted(A016069_list) # Chai Wah Wu, Nov 03 2014
    

Formula

a(n) = ((n-1) mod 3 + 1)*10^(ceiling(n/3)-7) for n >= 34 (conjectured). - Chai Wah Wu, Dec 17 2021

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