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!)
A351925 Squares which are the concatenation of two primes. 1

%I #21 Oct 08 2023 09:29:35

%S 25,289,361,529,729,2401,2601,2809,4761,5329,5929,7569,11449,11881,

%T 15129,19881,21609,22801,23409,24649,25281,26569,29241,29929,31329,

%U 34969,36481,39601,47961,52441,53361,54289,57121,58081,59049,71289,77841,83521,89401

%N Squares which are the concatenation of two primes.

%C The first term that is the concatenation of two primes in more than one way is a(11) = 5929 = 5 | 929 = 59 | 29. - _Robert Israel_, Oct 01 2023

%H Robert Israel, <a href="/A351925/b351925.txt">Table of n, a(n) for n = 1..10000</a>

%F Intersection of A106582 and A000290.

%e 25 is the concatenation of 2 and 5, both primes.

%e 4761 is the concatenation of 47 and 61, both primes.

%p L:= NULL: count:=0:

%p for x from 1 by 2 while count < 100 do

%p xs:= x^2;

%p for i from 1 to ilog10(xs) do

%p a:= xs mod 10^i;

%p if a > 10^(i-1) and isprime(a) then

%p b:= (xs-a)/10^i;

%p if isprime(b) then

%p L:= L, xs; count:= count+1; break

%p fi fi

%p od od:

%p L; # _Robert Israel_, Oct 01 2023

%o (PARI)

%o isb(n)={my(d=10); while(d<n, if(isprime(n%d)&&isprime(n\d), return(1)); d*=10); 0}

%o { for(n=1, 300, if(isb(n^2), print1(n^2, ", ")))} \\ _Andrew Howroyd_, Feb 26 2022

%o (Python)

%o from sympy import isprime

%o from itertools import count, islice

%o def agen(): # generator of terms

%o for k in count(1):

%o s = str(k*k)

%o if any(s[i] != '0' and isprime(int(s[:i])) and isprime(int(s[i:])) for i in range(1, len(s))):

%o yield k*k

%o print(list(islice(agen(), 39))) # _Michael S. Branicky_, Feb 26 2022

%Y Cf. A000290 (squares), A039686, A106582, inverse of A167535.

%Y Cf. A038692, A225135.

%K nonn,base

%O 1,1

%A _Max Z. Scialabba_, Feb 25 2022

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 August 25 00:48 EDT 2024. Contains 375418 sequences. (Running on oeis4.)