A339693 All pandigital squares which contain each digit exactly once in some base b >= 2. The numbers are written in base 10.
225, 38025, 314721, 622521, 751689, 3111696, 6002500, 7568001, 10323369, 61058596, 73513476, 74545956, 94517284, 105144516, 112572100, 112656996, 132756484, 136936804, 181980100, 202948516, 210308004, 211353444, 219573124, 222069604, 230614596, 238208356, 251983876
Offset: 1
Examples
15^2 in base 4 (225 is 3201 in base 4) contains the digits 0-3. 195^2 in base 6 (38025 is 452013 in base 6) contains the digits 0-5. The next three terms contain all the digits in base 7. The following four entries are pandigital in base 8, the next 26 in base 9, and so on.
Links
- David Schilling, Table of n, a(n) for n = 1..5508
Programs
-
JAI
#import "Basic"; dstr := "0123456789abcdef"; main :: () { digits : [16] int; for j:2..3_000_000 { for b:3..16 { for d : 0..15 digits[d] = 0; k := j*j; s := tprint( "%", formatInt( k, b ) ); if s.count > b continue; for d : 0..s.count-1 { for c : 0..dstr.count-1 { if s[d] == dstr[c] { digits[c] += 1; continue d; } } } for d : 0..b-1 { if digits[d] != 1 continue b; } print( "%, ", k ); } } }
-
PARI
\\ here ispandig(n) returns base if n is pandigital, otherwise 0. ispandig(n)={for(b=2, oo, my(r=logint(n,b)+1); if(rAndrew Howroyd, Dec 20 2020
Comments