A038628 Erroneous version of A039686.
49, 169, 1225, 1444, 1681, 3249, 4225, 4900, 15625, 16900, 42025, 49729, 64009
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.
import Data.List (findIndices) a191933 n = a191933_list !! (n-1) a191933_list = findIndices (> 0) $ map a193095 [0..] -- Reinhard Zumkeller, Jul 17 2011
CheckSplits:=function(n); v:=false; S:=Intseq(n); for j in [1..#S-1] do A:=[ S[k]: k in [1..j] ]; a:=Seqint(A); B:=[ S[k]: k in [j+1..#S] ]; b:=Seqint(B); if a gt 0 and A[#A] gt 0 and IsSquare(a) and IsSquare(b) then v:=true; end if; end for; return v; end function; [ p: p in [1..1200] | CheckSplits(p) ];
Take[Union[Flatten[Table[FromDigits[Flatten[{IntegerDigits[m^2], IntegerDigits[n^2]}]], {m, 20}, {n, 20}]]], 50] (* Alonso del Arte, Aug 11 2011 *) squareQ[n_] := IntegerQ[Sqrt[n]]; okQ[n_] := MatchQ[IntegerDigits[n], {a__ /; squareQ[FromDigits[{a}]], b__ /; First[{b}] > 0 && squareQ[FromDigits[ {b}]]}]; Select[Range[2000], okQ] (* Jean-François Alcover, Dec 13 2016 *)
1771^2 = 3136441 = 3136_441 and 3136 = 56^2, 441 = 21^2.
squareQ[n_] := IntegerQ[Sqrt[n]]; okQ[n_] := MatchQ[IntegerDigits[n^2], {a__ /; squareQ[FromDigits[{a}]], b__ /; First[{b}] > 0 && squareQ[FromDigits[{b}]]}]; Select[Range[3000], okQ] (* Jean-François Alcover, Oct 20 2011, updated Dec 13 2016 *)
is_A048375(n)={my(p=100^valuation(n,10));n*=n;while(n>p*=10,issquare(n%p)&&issquare(n\p)&&n%p*10>=p&&return(1))} \\ M. F. Hasler, Jan 25 2016
from math import isqrt def issquare(n): return isqrt(n)**2 == n def ok(n): d = str(n) for i in range(1, len(d)): if d[i] != '0' and issquare(int(d[:i])) and issquare(int(d[i:])): return True return False print([r for r in range(2851) if ok(r*r)]) # Michael S. Branicky, Jul 13 2021
324 = 18^2, 9 = 3^2, 3249 = 324:9 = 57^2. 9 = 3^2, 25 = 5^2, 9025 = 9:0:25 = 95^2 (intervening zero).
s={}; Do[n2=n*n; id=IntegerDigits[n2]; Le=Length[id]; Do[If[IntegerQ/@Sqrt[FromDigits/@{Take[id,k], Drop[id,k]}] == {True,True}, If[FromDigits@Drop[id,k]>0, Print[n2]; AppendTo[s,n2]; Break[]]], {k,1,Le-1}], {n,4,10^4}]
4950625=2225^2 can be split into 49=7^2 and 50625=225^2 or into 4=2^2 and 950625=975^2; 6400900=2530^2 can be split into 6400=80^2 and 900=30^2 or into 64=8^2 and 00900=30^2
a(1) = 12: 12^2 = 144, 1 = 1^2, 4 = 2^2, 4 = 2^2; a(1500) = 3176900^2 = 100, 9, 2693610000, 100 = 10^2, 9 = 3^2, 2693610000 = 51900^2.
169 = 13^2 can be split up into 16 and 9 and 16*9 = 144, a square.
p:= proc(k,n) local t; t:= n mod 10^k; t >= 10^(k-1) and issqr(t*(n-t)/10^k) end proc: filter:= n -> ormap(p, [$1..ilog10(n)], n): select(filter, [seq(i^2, i=1..10^4)]); # Robert Israel, Sep 22 2015
f[n_] := Block[{idn = IntegerDigits@ n, c = 0, k = 1, lmt = Floor[1 + Log10@ n]}, While[k < lmt, m = Mod[n, 10^(lmt - k)]; If[ IntegerQ@ Sqrt[ FromDigits[ Take[idn, {1, k}]] m] && m > 0 && IntegerDigits[m] == Take[idn, {k + 1, -1}], c++]; k++]; c]; Select[ Range[1700]^2, f@# > 0 &] (* Robert G. Wilson v, Aug 13 2015 *)
isok(n) = {if (issquare(n), len = #Str(n); for (k=1, len-1, na = n\10^k; nb = n%10^k; if (na && nb && (eval(Str(na,nb))==n) && issquare(na*nb), return (1));););} \\ Michel Marcus, Oct 09 2015
import math list =[] for i in range(1,100000): a = i*i b = str(a) l = len(b) for j in range(1, l): a_1 = b[:j] a_2 = b[j:] c = int(a_1)* int(a_2) sqrt_c = int(math.sqrt(int(c))) if (sqrt_c * sqrt_c == c) and (int(a_2[:1]) > 0): if not a in list: list.append(a) list.append(a) print(list)
25 is the concatenation of 2 and 5, both primes. 4761 is the concatenation of 47 and 61, both primes.
L:= NULL: count:=0: for x from 1 by 2 while count < 100 do xs:= x^2; for i from 1 to ilog10(xs) do a:= xs mod 10^i; if a > 10^(i-1) and isprime(a) then b:= (xs-a)/10^i; if isprime(b) then L:= L, xs; count:= count+1; break fi fi od od: L; # Robert Israel, Oct 01 2023
isb(n)={my(d=10); while(dAndrew Howroyd, Feb 26 2022
from sympy import isprime from itertools import count, islice def agen(): # generator of terms for k in count(1): s = str(k*k) if any(s[i] != '0' and isprime(int(s[:i])) and isprime(int(s[i:])) for i in range(1, len(s))): yield k*k print(list(islice(agen(), 39))) # Michael S. Branicky, Feb 26 2022
Comments