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.

A137079 Numbers k such that k and k^2 use only the digits 2, 3, 5 and 6.

Original entry on oeis.org

5, 6, 25, 235, 256, 23566, 2352365325, 23523653335
Offset: 1

Views

Author

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

Keywords

Comments

Generated with DrScheme.
No more terms < 10^26. - Robert Israel, Nov 24 2023

Examples

			2352365325^2 = 5533622622262355625.
		

Programs

  • Maple
    Good := {2, 3, 5, 6}: R:= 5, 6:
    G[1]:= {5, 6}:
    for d from 2 to 26 do
      G[d]:= select(t -> member(floor((t^2 mod 10^d)/10^(d-1)), Good), map(t -> seq(10^(d-1)*i+t, i=Good), G[d-1]));
      for t in G[d] do
         if convert(convert(t^2, base, 10), set) subset Good then  R:= R, t fi
    od od:
    sort([R]); # Robert Israel, Nov 24 2023
  • Mathematica
    fQ[n_] := Block[{d = DigitCount@ n}, Total@ Delete[d, {{2}, {3}, {5}, {6}}] == 0]; Select[Range@ 100000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 29 2015 *)
  • Python
    from itertools import product
    A137079_list = [int(''.join(a)+b) for l in range(10) for a in product('2356',repeat = l) for b in ('5','6') if set(str(int(''.join(a)+b)**2)) <= {'2','3','5','6'}]
    # Chai Wah Wu, Apr 29 2015