cp's OEIS Frontend

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.

Showing 1-6 of 6 results.

A039686 Squares which are the concatenation of two nonzero squares.

Original entry on oeis.org

49, 169, 361, 1225, 1444, 1681, 3249, 4225, 4900, 15625, 16900, 36100, 42025, 49729, 64009, 81225, 93025, 122500, 144400, 168100, 225625, 237169, 324900, 422500, 490000, 519841, 819025, 950625, 970225, 1024144, 1442401, 1562500
Offset: 1

Views

Author

Keywords

Comments

Intersection of A191933 and A000290; A193095(a(n))>0 and A010052(a(n))=1. - Reinhard Zumkeller, Jul 17 2011
Note that "leading zeros" are not allowed, e.g., 9025 = 95^2 is not in the sequence although it is the concatenation of 9 = 3^2 and 025 = 5^2. - M. F. Hasler, Jan 25 2016

Examples

			1225=35^2, 225=15^2, 1=1^2.
		

References

  • D. Wells, Curious and interesting numbers, Penguin Books, p. 152.

Crossrefs

Cf. A048375.

Programs

  • Haskell
    a039686 n = a039686_list !! (n-1)
    a039686_list = filter ((== 1) . a010052) a191933_list
    -- Reinhard Zumkeller, Jul 17 2011
    
  • Mathematica
    t = Table[n^2, {n, 750}]; f[j_, k_] := Block[{n = j*10^Floor[1 + Log10@ k] + k}, If[IntegerQ@ Sqrt@ n, n, 0]]; Take[ Union@ Flatten@ Table[ f[t[[j]], t[[k]]], {j, 250}, {k, 750}], {2, 33}] (* Robert G. Wilson v, Jul 18 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]^2, okQ] (* Jean-François Alcover, Dec 13 2016 *)
  • PARI
    is_A039686(n)={my(p=10);until(n<=p*=10,issquare(n%p)&&issquare(n\p)&&n%p*10>=p&&issquare(n)&&return(n>10))} \\ We must check whether n is a square but in practice this will be sure a priori (cf below) so we put this test at the end. The same applies for "n>10". - M. F. Hasler, Jan 25 2016
    
  • PARI
    {for(m=4,999, is_A039686(m^2)&&print1(m^2,","))} \\ Here the final checks issquare(n) & n>10 in the above function are superfluous, but they will only be done in the ("few") positive cases. - M. F. Hasler, Jan 25 2016

Formula

a(n) = A048375(n)^2. - M. F. Hasler, Jan 25 2016

Extensions

More terms from Patrick De Geest, March 1999

A048646 Primes p such that the decimal digits of p^2 can be partitioned into two or more nonzero squares.

Original entry on oeis.org

7, 13, 19, 37, 41, 107, 191, 223, 379, 487, 997, 1063, 1093, 1201, 1301, 1907, 2029, 3019, 3169, 3371, 5081, 5099, 5693, 6037, 9041, 9619, 9721, 9907, 10007, 11681, 12227, 12763, 17393, 18493, 19013, 19213, 19219, 21059, 21157, 21193, 25931
Offset: 1

Views

Author

Keywords

Examples

			7 is present because 7^2=49 can be partitioned into two squares 4 and 9; 13^2 = 169 = 16_9; 37^2 = 1369 = 1_36_9.
997^2 = 994009 = 9_9_400_9, 1063^2 = 1129969 = 1_12996_9, 997 and 1063 are primes, so 997 and 1063 are in the sequence.
		

Crossrefs

Cf. A048375.
Cf. A010051, intersection of A048653 and A000040.

Programs

  • Haskell
    a048646 n = a048646_list !! (n-1)
    a048646_list = filter ((== 1) . a010051') a048653_list
    -- Reinhard Zumkeller, Apr 17 2015
    
  • Python
    from math import isqrt
    from sympy import primerange
    def issquare(n): return isqrt(n)**2 == n
    def ok(n, c):
        if n%10 in {2, 3, 7, 8}: return False
        if issquare(n) and c > 1: return True
        d = str(n)
        for i in range(1, len(d)):
            if d[i] != '0' and issquare(int(d[:i])) and ok(int(d[i:]), c+1):
                return True
        return False
    def aupto(lim): return [p for p in primerange(1, lim+1) if ok(p*p, 1)]
    print(aupto(25931)) # Michael S. Branicky, Jul 10 2021

Extensions

Corrected and extended by Naohiro Nomoto, Sep 01 2001
"Nonzero" added to definition by N. J. A. Sloane, May 08 2021

A048653 Numbers k such that the decimal digits of k^2 can be partitioned into two or more nonzero squares.

Original entry on oeis.org

7, 12, 13, 19, 21, 35, 37, 38, 41, 44, 57, 65, 70, 107, 108, 112, 119, 120, 121, 125, 129, 130, 190, 191, 204, 205, 209, 210, 212, 223, 253, 285, 305, 306, 315, 342, 343, 345, 350, 369, 370, 379, 380, 408, 410, 413, 440, 441, 475, 487, 501, 538, 570, 642, 650
Offset: 1

Views

Author

Keywords

Examples

			12 is present because 12^2=144 can be partitioned into three squares 1, 4 and 4.
108^2 = 11664 = 1_16_64, 120^2 = 14400 = 1_4_400, so 108 and 120 are in the sequence.
		

Crossrefs

Cf. A048646, A048375, A010052, A000290; subsequence of A128783.

Programs

  • Haskell
    a048653 n = a048653_list !! (n-1)
    a048653_list = filter (f . show . (^ 2)) [1..] where
       f zs = g (init $ tail $ inits zs) (tail $ init $ tails zs)
       g (xs:xss) (ys:yss)
         | h xs      = h ys || f ys || g xss yss
         | otherwise = g xss yss
         where h ds = head ds /= '0' && a010052 (read ds) == 1
       g   = False
    -- Reinhard Zumkeller, Oct 11 2011
    
  • Mathematica
    (* This non-optimized program is not suitable to compute a large number of terms. *) split[digits_, pos_] := Module[{pos2}, pos2 = Transpose[{Join[ {1}, Most[pos+1]], pos}]; FromDigits[Take[digits, {#[[1]], #[[2]]}]]& /@ pos2]; sel[n_] := Module[{digits, ip, ip2, accu, nn}, digits = IntegerDigits[n^2]; ip = IntegerPartitions[Length[digits]]; ip2 = Flatten[ Permutations /@ ip, 1]; accu = Accumulate /@ ip2; nn = split[ digits, #]& /@ accu; SelectFirst[nn, Length[#]>1 && Flatten[ IntegerDigits[#] ] == digits && AllTrue[#, #>0 && IntegerQ[Sqrt[#]]&]&] ]; k = 1; Reap[Do[If[(s = sel[n]) != {}, Print["a(", k++, ") = ", n, " ", n^2, " ", s]; Sow[n]], {n, 1, 10^4}]][[2, 1]] (* Jean-François Alcover, Sep 28 2016 *)
  • Python
    from math import isqrt
    def issquare(n): return isqrt(n)**2 == n
    def ok(n, c):
        if n%10 in {2, 3, 7, 8}: return False
        if issquare(n) and c > 1: return True
        d = str(n)
        for i in range(1, len(d)):
            if d[i] != '0' and issquare(int(d[:i])) and ok(int(d[i:]), c+1):
                return True
        return False
    def aupto(lim): return [r for r in range(lim+1) if ok(r*r, 1)]
    print(aupto(650)) # Michael S. Branicky, Jul 10 2021

Extensions

Corrected and extended by Naohiro Nomoto, Sep 01 2001
Definition clarified by Harvey P. Dale, May 09 2021

A054737 Numbers n such that n^2 can be split into two nonzero squares (perhaps with leading zeros) in exactly two different ways.

Original entry on oeis.org

253, 1265, 2225, 2530, 6325, 12650, 18025, 18975, 22250, 24982, 25300, 31625, 63250, 94875, 126500, 158125, 180250, 189750, 221375, 222500, 249820, 253000, 316250, 632500, 702247, 948750, 1265000, 1581250, 1802500, 1897500, 2213750, 2225000, 2498200, 2530000
Offset: 1

Views

Author

Henry Bottomley, Apr 26 2000

Keywords

Examples

			2225^2=4950625 can be split into 49=7^2 and 50625=225^2 or into 4=2^2 and 950625=975^2; 2530^2=6400900 can be split into 6400=80^2 and 900=30^2 or into 64=8^2 and 00900=30^2
		

Crossrefs

Extensions

More terms from Sean A. Irvine, Feb 20 2022

A198035 Numbers n such that n^2 is a concatenation of two nonzero squares with no trailing zeros in n.

Original entry on oeis.org

7, 13, 19, 35, 38, 41, 57, 65, 125, 205, 223, 253, 285, 305, 475, 487, 721, 905, 975, 985, 1012, 1201, 1265, 1301, 1442, 1518, 1771, 2024, 2163, 2225, 2277, 2402, 2435, 3075, 3125, 3925, 4901, 6013, 7045, 7969, 8225, 8855, 9607, 9625, 9805, 10815, 11125, 11385, 12025
Offset: 1

Views

Author

Zak Seidov, Oct 20 2011

Keywords

Comments

Primitive solutions of A048375 (whose numbers can have trailing zeros).

Examples

			a(150)=1002445 and 1002445^2=1004895978025=100489_5978025, x^2=317^2=100489, y^2=2445^2=5978025.
		

Crossrefs

Cf. A048375.

Programs

  • Mathematica
    Reap[Do[r=0; If[Mod[n,10]>0, Do[mo=PowerMod[n,2,10^k]; If[mo>10^(k-1)-1 && IntegerQ[Sqrt[mo]] && IntegerQ[Sqrt[qu=Quotient[n^2,10^k]]], r=1; Break[]], {k,Log[10,n^2]}]; If[r>0,Sow[n]; Print[{n,Sqrt[qu],Sqrt@mo}]]], {n,7,10^6}]][[2,1]] (* Zak Seidov, Oct 20 2011 *)

A219542 Numbers n such that n^2 is a concatenation of 3 nonzero squares, leading zeros not allowed.

Original entry on oeis.org

12, 21, 37, 44, 107, 108, 120, 129, 191, 204, 209, 210, 223, 306, 315, 342, 343, 345, 370, 408, 413, 440, 501, 642, 696, 804, 955, 959, 982, 995, 1002, 1044, 1063, 1065, 1070, 1080, 1107, 1169, 1200, 1275, 1281, 1290, 1301, 1306, 1315, 1349, 1385, 1503, 1910
Offset: 1

Views

Author

Zak Seidov, Nov 22 2012

Keywords

Examples

			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.
		

Crossrefs

Showing 1-6 of 6 results.