login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A066591 Primes which can be expressed as a concatenation of nonnegative squares. 8
11, 19, 41, 101, 109, 149, 181, 191, 199, 251, 401, 409, 419, 449, 491, 499, 641, 811, 911, 919, 941, 991, 1009, 1019, 1049, 1091, 1109, 1181, 1259, 1289, 1361, 1409, 1481, 1499, 1601, 1609, 1619, 1699, 1811, 1901, 1949, 1999, 2251, 2549, 2591, 3691 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
All terms are == {1,9} mod 10. - Zak Seidov, Jul 16 2015
The surprising prime 162536496481 is the concatenation of the 6 double-digit squares in increasing order (see Prime Curios! link). - Bernard Schott, Nov 19 2020
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..2103 from Robert Israel)
Chris K. Caldwell and G. L. Honaker, Jr., 1625364981, Prime Curios!
EXAMPLE
96181 is a term as it is a concatenation of 961 and 81 both of which are squares. 100169 is a term as it is a concatenation of 100 and 169 in one way and also that of 1, 0, 0, 16 and 9 in another way.
MAPLE
N:= 10^4: # to get all terms <= N
catn:= proc(x, y) if y=0 then 10*x else x*10^(ilog10(y)+1)+y fi end proc:
Sq:= {seq(i^2, i=0..floor(sqrt(N)))}: Agenda:= Sq: S:= Sq:
while Agenda <> {} do
Agenda:= select(`<=`, {seq(seq(catn(f, g), f=Agenda), g=Sq)}, N) minus S;
S:= S union Agenda;
od:
sort(convert(select(isprime, S), list)); # Robert Israel, Jul 16 2015
PROG
(Python)
from sympy import sieve
from itertools import count, islice
def iscat(w, A):
return False if len(w) < 2 else any(w[:i] in A and (w[i:] in A or iscat(w[i:], A)) for i in range(1, len(w)))
def agen():
S = {"0"}
for d in count(2):
S |= {str(i*i) for i in range(10**(d-2), 10**(d-1))}
for p in sieve.primerange(10**(d-1), 10**d):
if iscat(str(p), S):
yield p
print(list(islice(agen(), 50))) # Michael S. Branicky, Feb 20 2024
CROSSREFS
A061246 and A167535 are subsequences. - Zak Seidov, Jul 16 2015
Sequence in context: A259190 A165944 A100557 * A061246 A353102 A068493
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Dec 21 2001
EXTENSIONS
Corrected and extended by Christopher Lund (clund(AT)san.rr.com), Apr 11 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 4 16:30 EDT 2024. Contains 372256 sequences. (Running on oeis4.)