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.

A359342 Least pandigital square with n digits.

Original entry on oeis.org

1026753849, 10057482369, 100549873216, 1000574082369, 10000938205476, 100005740082369, 1000000973875264, 10000057400082369, 100000030347218596, 1000000574000082369, 10000000365759287524, 100000005740000082369, 1000000003751486308921, 10000000057400000082369
Offset: 10

Views

Author

Martin Renner, Dec 27 2022

Keywords

Comments

Pandigital squares are perfect squares containing each digit from 0 to 9 at least once.
For number of digits n >= 11, every second term is of the form 10...05740...082369 with (n-1)/2 - 3 zeros after the leading 1 and (n-1)/2 - 5 zeros after the middle three digits 547. This term is 10...0287^2 with (n-1)/2 - 3 zeros after the leading 1. This is the case since (10^m + 287)^2 = 10^(2*m) + 574*10^m + 82369 with m = (n-1)/2 and n >= 11 odd, and is the first n-digit square containing all digits from 0 to 9.

Crossrefs

Programs

  • Maple
    a:=proc(n::posint) local s, k, K: if n<10 then s:=NULL: else for k from ceil(sqrt(10^(n-1))) to floor(sqrt(10^n)) do K:=convert(k^2,base,10); if nops({op(K)})=10 then s:=k^2: break: fi: od: fi: return s; end:
    seq(a(n),n=10..30);
  • Python
    from math import isqrt
    def c(n): return len(set(str(n))) == 10
    def a(n): return next((k*k for k in range(isqrt(10**(n-1))+1, isqrt(10**n-1)+1) if c(k*k)), None)
    print([a(n) for n in range(10, 24)]) # Michael S. Branicky, Dec 27 2022

Formula

a(n) = 10^(n-1) + 574*10^((n-1)/2) + 82369 for n >= 11 odd.