A036744 Penholodigital squares: squares containing each of the digits 1..9 exactly once.
139854276, 152843769, 157326849, 215384976, 245893761, 254817369, 326597184, 361874529, 375468129, 382945761, 385297641, 412739856, 523814769, 529874361, 537219684, 549386721, 587432169, 589324176, 597362481, 615387249, 627953481, 653927184, 672935481, 697435281, 714653289, 735982641, 743816529, 842973156, 847159236, 923187456
Offset: 1
Programs
-
Maple
lim:=floor(sqrt(987654321)): for n from 11112 by 3 to lim do d:=[op(convert(n^2, base, 10))]: pandig:=true: for k from 1 to 9 do if(numboccur(k, d)<>1)then pandig:=false: break: fi: od: if(pandig)then printf("%d, ", n^2): fi: od: # Nathaniel Johnston, Jun 22 2011
-
Mathematica
Select[Range[11112, 31427]^2, Union[Drop[DigitCount[ # ], -1]] == {1} &]
-
PARI
A036744 = [n^2 | n <- A071519] \\ or less efficient & more explicit: A036744 = [n^2 | n <- [1e5\9..1e5\3], vecsort(digits(n^2)) == [1..9]] \\ M. F. Hasler, Jun 28 2023
Formula
a(n) = A071519(n)^2.
Extensions
More terms from Harvey P. Dale, Sep 26 2001
Keyword base added by Reinhard Zumkeller, May 16 2010
Comments