A204139 Primes p such that 9p^2 is a penholodigital square (A036744).
5227, 7673, 8147, 8269, 8353, 8647, 8803, 9043, 9091
Offset: 1
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.
lim:=floor(sqrt(987654321)): for n from floor(sqrt(123456789)) 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): fi: od: # Nathaniel Johnston, Jun 22 2011
Sqrt[#]&/@Select[FromDigits/@Permutations[Range[9]],IntegerQ[Sqrt[#]]&] (* Harvey P. Dale, Sep 23 2011 *) Select[Range[11112, 31427,3], DigitCount[#^2] == {1,1,1,1,1,1,1,1,1,0} &] (* Zak Seidov, Jan 11 2012 *)
A071519 = select( {is_A071519(n,L=[1..9])=vecsort(digits(n^2))==L}, [1e5\9..1e5\3]) \\ M. F. Hasler, Jun 28 2023
102495376 is in the sequence because 102495376 = 10124^2 and 102495376 contains exactly nine different digits: 0, 1, 2, 3, 4, 5, 6, 7 and 9.
s=[]; for(n=1, 100000, if(#vecsort(eval(Vec(Str(n^2))),,8)==9, s=concat(s, n^2))); s
from itertools import count, islice def agen(): yield from (r*r for r in count(10**4) if len(set(str(r*r)))==9) print(list(islice(agen(), 23))) # Michael S. Branicky, May 24 2022
69^2 = 4761, 69^3 = 328509, which together contain each digit 0-9 exactly once.
fQ[n_] := Union[ Join[ IntegerDigits[n^2], IntegerDigits[n^3]]] == {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; Select[Range@1500, fQ] (* Robert G. Wilson v, Jun 27 2023 *)
is(k)=#setunion(Set(digits(k^2)),Set(digits(k^3)))>9 select(is,[1..9999])
from itertools import count, islice def A363905_gen(startvalue=1): # generator of terms >= startvalue return filter(lambda n:len(set(str(n**2))|set(str(n**3)))==10,count(max(startvalue,1))) A363905_list = list(islice(A363905_gen(),20)) # Chai Wah Wu, Jun 27 2023
fQ[n_] := Length@ Union[ Count[ Sort[ Join[ IntegerDigits[n^2], IntegerDigits[n^3]]], #] & /@ Range[0, 9]] == 1; Select[ Range@ 52000000, fQ] (* Robert G. Wilson v, Jul 01 2023 *)
is(n)={my(v=concat(digits(n^2),digits(n^3)), c=#v); c%10==0 && vecsort(v)==[0..c-1]\(c\10)} for(n=1,1e6, is(n)&& print1(n","))
6534^2 = 42693156, 6534^3 = 278957081304, which together contain each digit 0-9 exactly twice.
is(n)=#Set(n=concat(digits(n^2),digits(n^3)))>9&&(n=vecsort(n))[#n-1]==9&&!n[2]&&!for(i=3,#n-2,n[i]>n[i-1]&&n[i]
For n=2 there is one penholodigital square, 1_2 = 1 = 1^2. For n=6 there are two penholodigital squares, 15324_6 = 2500 = 50^2 and 53241_6 = 7225 = 85^2. For n=7 there is one penholodigital square, 623514_7 = 106929 = 327^2. For n=8 there is one penholodigital square, 6532471_8 = 1750329 = 1323^2. For n=10 there are 30 penholodigital squares listed in A036744.
from gmpy2 import mpz, digits, isqrt def A370950(n): # requires 2 <= n <= 62 if n&1 and (~(m:=n-1>>1) & m-1).bit_length()&1: return 0 t = ''.join(digits(d,n) for d in range(1,n)) k = mpz(''.join(digits(d,n) for d in range(n-1,0,-1)),n) k2 = mpz(t,n) c = 0 for i in range(isqrt(k2),isqrt(k)+1): if i%n: j = i**2 s = ''.join(sorted(digits(j,n))) if s == t: c += 1 return c
169 is a term, because 169 and 16 are both squares, and each digit of 169 is unique. 18496 is a term, because 18496 and 1849 are both squares, and each digit of 18496 is unique.
dd=Select[Range[11,25000]^2,IntegerLength[#]==CountDistinct[IntegerDigits[#]]&&ContainsNone[IntegerDigits[#],{0}]&];f[n_]:=AnyTrue[Table[FromDigits[Take[IntegerDigits[n],i]],{i,2,IntegerLength[n]-1}]^(1/2),IntegerQ];Select[dd,f[#]&] (* James C. McMahon, May 07 2025 *)
Comments