A366106 Primes that are the concatenation of three squares in base 10.
101, 109, 149, 191, 199, 401, 409, 419, 449, 491, 499, 911, 919, 941, 991, 1049, 1181, 1259, 1361, 1481, 1499, 1601, 1609, 1619, 1699, 1811, 1949, 2549, 2591, 3691, 4049, 4259, 4481, 4649, 4909, 4919, 4999, 6449, 6491, 8101, 8111, 8191, 9049, 9161, 9181, 9491, 9649, 9811, 9949, 10009, 10091
Offset: 1
Examples
a(16) = 1049 is a term because it is the concatenation of 1 = 1^2, 0 = 0^2 and 49 = 7^2.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A167535.
Programs
-
Maple
M:= 5: # for terms < 10^M S:= {}: for a from 1 while a^2 < 10^(M-2) do x:= a^2; mx:= length(x); for b from 0 while b^2 < 10^(M-1-mx) do y:= b^2; my:= max(1,length(y)); for c from 0 while c^2 < 10^(M-mx-my) do v:= parse(cat(x,y,c^2)); if isprime(v) then S:= S union {v} fi; od od od: sort(convert(S,list));
-
Mathematica
a[maxSquareIndex_Integer?Positive]:=Select[Flatten[Table[ToExpression[IntegerString[a^2]<>IntegerString[b^2]<>IntegerString[c^2]],{a,1,maxSquareIndex},{b,0,maxSquareIndex},{c,0,maxSquareIndex}]],PrimeQ]//Sort;a[10][[1;;51]] (* Robert P. P. McKone, Oct 02 2023 *)
Comments