login
Primes that when squared give numbers with digits in nonascending order.
4

%I #35 Sep 04 2024 08:47:06

%S 2,3,29,31

%N Primes that when squared give numbers with digits in nonascending order.

%C No other solutions below 2*10^9 (probably finite). - Dec 15 1999

%C No other solutions below 10^20. - _David A. Corneth_, Oct 28 2023, recomputed after a remark from Max Alekseyev, _David A. Corneth_, Aug 20 2024

%C Primes p such that p^2 is in A062826. - _Max Alekseyev_, Aug 18 2024

%H David A. Corneth, <a href="/A028868/a028868_1.gp.txt">PARI program</a>

%e From _David A. Corneth_, Oct 28 2023: (Start)

%e 31 is in the sequence as 31 is prime and 31^2 = 961 which has its digits in nonascending order.

%e 2979 is not in the sequence even though 2979^2 = 8874441 does have digits in nonascending order but 2979 = 3^2 * 331 is not prime. (End)

%o (PARI) is(n) = my(d = digits(n^2)); d == vecsort(d,,4) && isprime(n) \\ _David A. Corneth_, Oct 28 2023

%o (PARI) \\ see link for a faster program

%Y Cf. A028869, A028865, A028866, A062826.

%K nonn,base,hard,more

%O 1,1

%A _Patrick De Geest_

%E Name clarified by _Jon E. Schoenfield_, Oct 27 2023