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!)
A058411 Numbers k such that k^2 contains only digits {0,1,2}, not ending with zero. 11

%I #81 Apr 04 2024 10:41:22

%S 1,11,101,149,1001,1011,1101,10001,10011,11001,14499,100001,100011,

%T 100101,101001,110001,316261,1000001,1000011,1000101,1010001,1010011,

%U 1100001,1100101,10000001,10000011,10000101,10001001,10001011,10001101,10010001,10100001,10100011,10110001

%N Numbers k such that k^2 contains only digits {0,1,2}, not ending with zero.

%C Sporadic solutions (not consisting only of digits 0 and 1): a(4) = 149, a(11) = 14499, a(17) = 316261, a(209) = 4604367505011, a(715) = 10959977245460011, a(1015) = 110000500908955011, a(1665) = 10099510939154979751, ... Three infinite subsequences are given by numbers of the form 10...01, 10...011 and 110...01, but there are many others. - _M. F. Hasler_, Nov 14 2017

%C From _Zhao Hui Du_, Mar 12 2024: (Start)

%C Most terms have a special pattern in that they have only digits 0 and 1 and could be written as Sum_{h=0..t} 10^x(h), where 2x(h) and x(h1)+x(h2) are distinct and x(0)=0 for the nonzero ending constraint. The number of n-digit terms in the sequence in the special pattern is A143823(n) - 2*A143823(n-1) + A143823(n-2) for n >= 2.

%C Terms with only digits 0 and 1 but not in the special pattern exist as well. If we define f(x) = 1 + x^768 + x^960 + x^1008 + x^1020 + x^1028 + x^1040 + x^1088 + x^1280 + x^2048, f(x)^2 is a function with all nonzero coefficients 1,2,10 (the only coefficient of x^2048 is 10 and the coefficient of x^2049 is 0). So f(10) is in the sequence but not in the special pattern. (End)

%H Zhao Hui Du, <a href="/A058411/b058411.txt">Table of n, a(n) for n = 1..4000</a> (first 1000 terms from Chai Wah Wu; 1001..1269 from M. F. Hasler)

%H Patrick De Geest, <a href="http://www.worldofnumbers.com/threedigits.htm">Index to related sequences</a>.

%H Hisanori Mishima, <a href="http://www.asahi-net.or.jp/~KC2H-MSM/mathland/math02/math0210.htm#012">Sporadic tridigital solutions</a>.

%H OEIS Wiki, <a href="/index/Sq#squares">Index to sequences related to squares having only given digits</a>.

%F a(n) = sqrt(A058412(n)). - _Zak Seidov_, Jul 01 2013

%p R[1]:= {1,9};

%p for m from 2 to 10 do

%p R[m]:= select(t -> max(convert(t^2 mod 10^m, base, 10)) <= 2, map(s -> seq(s + i*10^(m-1),i=0..9), R[m-1]))

%p od:

%p Res:= {seq(op(select(t -> t >= 10^(m-1) and max(convert(t^2,base,10)) <= 2, R[m])),m=1..10)}:

%p sort(convert(Res,list)); # _Robert Israel_, Feb 23 2016

%t Select[Range[10^6], And[Total@ Take[RotateRight@ DigitCount@ #, -7] == 0, Mod[#, 10] != 0] &[#^2] &] (* _Michael De Vlieger_, Nov 14 2017 *)

%o (Python)

%o A058411_list = [i for i in range(10**6) if i % 10 and max(str(i**2)) < '3'] # _Chai Wah Wu_, Feb 23 2016

%o (PARI) isok(n)={ n%10 && vecmax(digits(n^2)) < 3 } \\ _Michel Marcus_, Feb 24 2016, edited by _M. F. Hasler_, Nov 14 2017

%o (Magma) [n: n in [1..2*10^8 by 2] | Set(Intseq(n^2)) subset [0,1,2]]; // _Vincenzo Librandi_, Feb 24 2016

%Y Cf. A058412 (the squares); A058412, ..., A058474 (other 3-digit combinations).

%Y Cf. A063009, A066139. - _Zak Seidov_, Jul 01 2013

%K nonn,base

%O 1,2

%A _Patrick De Geest_, Nov 15 2000

%E b-file corrected by _Zhao Hui Du_, Mar 07 2024

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 11 12:11 EDT 2024. Contains 375069 sequences. (Running on oeis4.)