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-7 of 7 results.

A167535 Primes which are the concatenation of two squares (in decimal notation).

Original entry on oeis.org

11, 19, 41, 149, 181, 251, 449, 491, 499, 641, 811, 1009, 1289, 1361, 1699, 2251, 2549, 4001, 4289, 4441, 4729, 6449, 6481, 6761, 7841, 8419, 9001, 9619, 10891, 11369, 11681, 12149, 12251, 12401, 12601, 12809, 13249, 13691, 13721, 14449, 14489
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Nov 06 2009

Keywords

Comments

Necessarily a(n) has to end with 1 or 9.
It is not known if the sequence is infinite.
The Bunyakovsky conjecture implies that for every b coprime to 10, there are infinitely many terms where the second square is b^2. - Robert Israel, Jun 17 2021
Intersection of A191933 and A000040; A193095(a(n)) > 0 and A010051(a(n))=1. - Reinhard Zumkeller, Jul 17 2011

Examples

			11 = 1^2 * 10 + 1^2, 149 = 1^2 * 10^2 + 7^2, 1361 = 1^2 * 10^3 + 19^2.
14401 = 12^2 * 10^2 + 1^2 is not a term because included "0" (1^2=1 is 1-digit).
14449 = 12^2 * 10^2 + 7^2 = 38^2 * 10 + 3^2 is the smallest prime with 2 such representations.
		

References

  • Richard E. Crandall, Carl Pomerance, Prime Numbers, Springer 2005.
  • Wladyslaw Narkiewicz, The Development of Prime Number Theory from Euclid to Hardy and Littlewood, Springer 2000.
  • Paulo Ribenboim, The New Book of Prime Number Records, Springer 1996.

Crossrefs

Supersequence of A345314.

Programs

  • Haskell
    a167535 n = a167535_list !! (n-1)
    a167535_list = filter ((> 0) . a193095) a000040_list
    -- Reinhard Zumkeller, Jul 17 2011
    
  • Maple
    zcat:= proc(a,b) 10^(1+ilog10(b))*a+b end proc;
    S:= select(t -> t <= 10^7 and isprime(t), {seq(seq(zcat(a^2,b^2),a=1..10^3),b=1..10^3,2)}):
    sort(convert(S,list)); # Robert Israel, Jun 17 2021
  • PARI
    is_A167535(n)={ my(t=1); isprime(n) && while(n>t*=10, apply(issquare,divrem(n,t))==[1,1]~ && n%t*10>=t && return(1))}
    forprime(p=1,default(primelimit), is_A167535(p) && print1(p",")) \\ M. F. Hasler, Jul 24 2011
    
  • Python
    from sympy import isprime
    def aupto(lim):
        s = list(i**2 for i in range(1, int(lim**(1/2))+2))
        t = set(int(str(a)+str(b)) for a in s for b in s)
        return sorted(filter(isprime, filter(lambda x: x<=lim, t)))
    print(aupto(15000)) # Michael S. Branicky, Jun 17 2021

Formula

a(n) = m^2 * 10^k + n^2 for a k-digit square number n^2.

Extensions

11369 inserted by R. J. Mathar, Nov 07 2009

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

A193095 Number of times n can be written as concatenation of exactly two nonzero squares in decimal representation.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 17 2011

Keywords

Comments

a(A193096(n))=0; a(A191933(n))>0; a(A193097(n))=1; a(A192993(n))>1; a(A038670(n))=2.

Examples

			a(164) = 2, A191933(15) = A192993(1) = 164: 1'64 == 16'4.
		

Crossrefs

Cf. A010052.

Programs

  • Haskell
    a193095 n = sum $ map c [1..(length $ show n) - 1] where
       c k | head ys == '0' = 0
           | otherwise      = a010052 (read xs) * a010052 (read ys) where
           (xs,ys) = splitAt k $ show n
    
  • PARI
    A193095(n) = sum( t=1,#Str(n)-1, apply(issquare,divrem(n,10^t))==[1,1]~ && n%10^t>=10^(t-1))  \\ M. F. Hasler, Jul 24 2011
    
  • PARI
    A193095(n)={ my(c,p=1); while( n>p*=10, n%p*10>=p||next; issquare(n%p)||next; issquare(n\p) && c++);c}  \\ M. F. Hasler, Jul 24 2011

A192993 Numbers that are in more than one way the concatenation of the decimal representation of two nonzero squares.

Original entry on oeis.org

164, 1441, 1625, 1961, 2564, 4841, 12116, 14449, 16400, 25625, 46241, 48464, 115625, 116641, 144100, 148841, 160025, 162500, 163844, 169169, 184964, 193636, 196100, 256400, 361225, 368649, 466564, 484100, 493025, 961009, 973441, 1166464
Offset: 1

Views

Author

Klaus Brockhaus and Zak Seidov, Jul 14 2011

Keywords

Comments

Subsequence of A191933.
If k is a term, then k followed by two zeros is also a term.
None of the terms < 40000000 is in more than two ways the concatenation of the decimal representation of two nonzero squares.
A038670 is a subsequence. - Reinhard Zumkeller, Jul 15 2011

Examples

			2564 is the concatenation of 256 and 4 as well as of 25 and 64; 256, 4, 25, 64 are squares, so 2564 is a term.
		

Crossrefs

Programs

  • Haskell
    import Data.List (findIndices)
    a192993 n = a192993_list !! (n-1)
    a192993_list = findIndices (> 1) $ map a193095 [0..]
    -- Reinhard Zumkeller, Jul 17 2011
  • Magma
    SplitToSquares:=function(n); V:=[]; 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 Append(~V, []); end if; end for; return V; end function; [ p: p in [1..1200000] | #P gt 1 where P is SplitToSquares(p) ]; /* to obtain the splittings replace " p: " with " : " */
    
  • Mathematica
    f@n_ := DeleteDuplicates@
      Select[First@# & /@
        Select[Partition[
          Sort@(FromDigits@Flatten@IntegerDigits@# & /@
             Tuples[Range@Sqrt[10^(n - 1) - 1]^2, {2}]), 2, 1],
         Differences@# == {0} &], # <
    10^n &]; f@7 (* Hans Rudolf Widmer, Jun 12 2023 *) (* Numbers with at most n digits that are in more than one way the concatenation of the decimal representation of two nonzero squares. *)

A193096 Numbers that cannot be written as concatenation of two nonzero squares in decimal representation.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 17 2011

Keywords

Comments

Complement of A191933; A193095(a(n)) = 0.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a193096 n = a193096_list !! (n-1)
    a193096_list = elemIndices 0 $ map a193095 [0..]
  • Mathematica
    Complement[Range[75], Union[Flatten[Table[FromDigits[Flatten[{IntegerDigits[m^2], IntegerDigits[n^2]}]], {m, 3}, {n, 3}]]]] (* Alonso del Arte, Aug 11 2011 *)

Extensions

Incorrect terms removed and missing terms added by Jaroslav Krizek, Aug 12 2011

A193097 Numbers that are the concatenation of exactly one pair of nonzero squares.

Original entry on oeis.org

11, 14, 19, 41, 44, 49, 91, 94, 99, 116, 125, 136, 149, 161, 169, 181, 251, 254, 259, 361, 364, 369, 416, 425, 436, 449, 464, 481, 491, 494, 499, 641, 644, 649, 811, 814, 819, 916, 925, 936, 949, 964, 981, 1001, 1004, 1009, 1100, 1121, 1144, 1169, 1196, 1211
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 17 2011

Keywords

Comments

Subsequence of A191933; A193095(a(n)) = 1.

Examples

			161 = concat(4^2,1^2), therefore 161 is a term;
164 = concat(1^2,8^2) = concat(4^2,2^2), therefore 164 is not a term (A191933(15)=A192993(1)=164, A193095(164)=2).
		

Programs

  • Haskell
    import Data.List (elemIndices)
    a193097 n = a193097_list !! (n-1)
    a193097_list = elemIndices 1 $ map a193095 [0..]
  • Mathematica
    Take[Union[FromDigits[Flatten[IntegerDigits/@((#)^2)]]&/@Tuples[Range[14],2]],60] (* Harvey P. Dale, Jul 27 2011 *)

A261713 Natural numbers that can be split into two squares, leading zeros allowed.

Original entry on oeis.org

10, 11, 14, 19, 40, 41, 44, 49, 90, 91, 94, 99, 100, 101, 104, 109, 116, 125, 136, 149, 160, 161, 164, 169, 181, 250, 251, 254, 259, 360, 361, 364, 369, 400, 401, 404, 409, 416, 425, 436, 449, 464, 481, 490, 491, 494, 499, 640, 641, 644, 649, 810, 811, 814
Offset: 1

Views

Author

Giovanni Teofilatto, Aug 29 2015

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local d, i, k;
          for k from 1+`if`(n=1, 1, a(n-1))
          do for i to length(k)-1 do
               if issqr(iquo(k, 10^i, 'd')) and
                  issqr(d) then return k fi
             od
          od
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Aug 29 2015
  • Mathematica
    qQ[n_] := Floor[ Sqrt@ n]^2 == n; ok[n_] := Catch[ Do[ If[ qQ@ Floor[n / 10^k] && qQ@ Mod[n, 10^k],Throw@ True], {k, IntegerLength[n] -1}]; False]; Select[Range@ 1000, ok] (* Giovanni Resta, Aug 29 2015 *)

Extensions

Name clarified by Zak Seidov, Aug 29 2015
Showing 1-7 of 7 results.