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.

A078255 Squares with distinct digits. To make an infinite sequence, we also include m-digit numbers in which each digit occurs no more than ceiling(m/10) times.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 169, 196, 256, 289, 324, 361, 529, 576, 625, 729, 784, 841, 961, 1024, 1089, 1296, 1369, 1764, 1849, 1936, 2304, 2401, 2601, 2704, 2809, 2916, 3025, 3249, 3481, 3721, 4096, 4356, 4761, 5041, 5184, 5329, 5476, 6084, 6241
Offset: 1

Views

Author

Amarnath Murthy, Nov 24 2002

Keywords

Comments

The largest square with no digit repeated more than m times, for m = 1 to 4: 99066^2 = 9814072356; 9994363488^2 = 99887301530267526144; 999944387118711^2 = 999888777330214565264406301521; 99999444387327303945^2 = 9999888877774166231060453541302412563025.
There are exactly 87 10-digit squares with distinct digits. - Harvey P. Dale, Sep 06 2020

Examples

			100116^2 = 10023213456 is a term because it has 11 digits,
ceiling(11/10) = 2 and no digit occurs more than twice. This is the first term after 9814072356.
		

Crossrefs

Cf. A075309.

Programs

  • Mathematica
    Select[Range[0,80]^2,Max[DigitCount[#]]==1&] (* The program only selects numbers with no more than 10 digits, and even that would require changing the high Range constant to 100000. *) (* Harvey P. Dale, Sep 06 2020 *)
  • Python
    from itertools import count, islice
    def c(n): return all((s:=str(n)).count(d)<=(len(s)-1)//10+1 for d in "0123456789")
    def agen(): yield from filter(c, (k*k for k in count(0)))
    print(list(islice(agen(), 50))) # Michael S. Branicky, Oct 29 2023

Extensions

Edited and extended by David Wasserman, Jun 27 2006