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.

A137093 Numbers k such that k and k^2 use only the digits 2, 4, 5 and 6.

Original entry on oeis.org

2, 5, 25, 65, 665, 6665, 66665, 666665, 6666665, 25625465, 65226242, 66666665, 666666665, 6666666665, 66666666665, 666666666665, 6666666666665, 66666666666665, 666666666666665, 6666666666666665, 66666666666666665, 666666666666666665, 6666666666666666665
Offset: 1

Views

Author

Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008

Keywords

Comments

Generated with DrScheme.
Contains 6*(10^n - 1)/9 - 1 for n >= 1. There are no others than those of this form with up to 35 digits. - Michael S. Branicky, May 25 2021

Examples

			25625465^2 = 656664456466225.
		

Crossrefs

Cf. A137110.

Programs

  • Mathematica
    fQ[n_] := Block[{d = DigitCount@ n}, Total@ Delete[d, {{2}, {4}, {5}, {6}}] == 0]; Select[Range@ 100000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 29 2015 *)
  • Python
    from itertools import product
    A137093_list = [int(''.join(a)) for l in range(1,10) for a in product('2456',repeat = l) if set(str(int(''.join(a))**2)) <= {'2','4','5','6'}] # Chai Wah Wu, Apr 29 2015
    
  • Python
    # uses auptod in A137110
    print(auptod(16, only="2456")) # Michael S. Branicky, May 25 2021

Extensions

a(20)-a(23) from Michael S. Branicky, May 25 2021