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

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

A235717 Squares which have one or more occurrences of exactly two different digits.

Original entry on oeis.org

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, 40000000000, 90000000000
Offset: 1

Views

Author

Colin Barker, Jan 15 2014

Keywords

Comments

The first term having a repeated digit is 100.
This sequence is the same as A018885, except that A018885 has four additional leading terms.

Examples

			69696 is in the sequence because 69696 = 264^2 and 69696 contains exactly two different digits: 6 and 9.
		

Crossrefs

Programs

  • PARI
    s=[]; for(n=1,10000, if(#vecsort(eval(Vec(Str(n^2))),,8)==2, s=concat(s, n^2))); s

Formula

a(n) = A016069(n)^2.

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]

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

Original entry on oeis.org

4, 15, 32, 55, 84, 119, 455, 799, 900, 3332, 3535, 7007, 8855, 244244, 333332, 335335, 400404, 445444, 555559, 666464, 799799, 1999199, 3303300, 33333332, 33353335, 3333333332, 3333533335, 333333333332, 333335333335, 700007077007, 33333333333332, 33333353333335, 3333333333333332, 3333333533333335
Offset: 1

Views

Author

Seiichi Manyama, Aug 29 2019

Keywords

Crossrefs

Cf. A002277, A018885 (in case of squares), A213516 (in case of triangular numbers), A270710, A322570, A323639.

Programs

  • Magma
    [a:k in [1..10000000]| #Set(Intseq(a)) le 2 where a is (k+1)*(3*k-1)]; // Marius A. Burtea, Aug 29 2019
  • Mathematica
    Select[Table[(n+1)(3n-1),{n,3334*10^4}],Count[DigitCount[#],0]>7&] (* Harvey P. Dale, Jun 12 2022 *)
  • PARI
    for(k=1, 1e8, if(#Set(digits(j=3*k^2+2*k-1))<=2, print1(j", ")))
    

Formula

a(n) = A270710(A322570(n)).
For k > 0, A002277(2*k) - 1 is a term.

A368049 Perfect squares whose decimal expansion consists of k > 1 digits, k-1 of which are equal.

Original entry on oeis.org

16, 25, 36, 49, 64, 81, 100, 121, 144, 225, 400, 441, 484, 676, 900, 1444, 10000, 40000, 44944, 90000, 1000000, 4000000, 9000000, 100000000, 400000000, 900000000, 10000000000, 40000000000, 90000000000, 1000000000000, 4000000000000, 9000000000000, 100000000000000
Offset: 1

Views

Author

José Hernández, Dec 09 2023

Keywords

Comments

The terms > 90000 are of one of the following three forms: 10^(2*j), 4*10^(2*j) or 9*10^(2*j) where j is an integer >= 3.
See Gica/Panaitopol link for proof of above comment. - Ray Chandler, Jan 16 2024

Crossrefs

Subsequence of A000290.

Formula

a(n) = 100*a(n-3) for n > 22. - Stefano Spezia, Dec 09 2023
Showing 1-6 of 6 results.