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.

A136808 Numbers k such that k and k^2 use only the digits 0, 1 and 2.

This page as a plain text file.
%I A136808 #79 Nov 28 2024 13:32:03
%S A136808 0,1,10,11,100,101,110,1000,1001,1010,1011,1100,1101,10000,10001,
%T A136808 10010,10011,10100,10110,11000,11001,11010,100000,100001,100010,
%U A136808 100011,100100,100101,100110,101000,101001,101100,110000,110001,110010,110100,1000000,1000001,1000010,1000011,1000100
%N A136808 Numbers k such that k and k^2 use only the digits 0, 1 and 2.
%C A136808 Generated with DrScheme.
%C A136808 Subsequence of A136809, A136816, ..., A136836. - _M. F. Hasler_, Jan 24 2008
%C A136808 A278038(18) = 10101, A136827(294) = 10110001101, A136831(1276) = 101100010001101 resp. A136836(1262) = 101090009991101 are the first terms from where on these four sequences differ from the present one. - _M. F. Hasler_, Nov 15 2017
%C A136808 From _Jovan Radenkovicc_, Nov 15 2024: (Start)
%C A136808 A nonnegative integer n is in this sequence iff 10*n is also in this sequence.
%C A136808 Not a subsequence of A278038 (binary numbers without '111'). A counterexample is 10^2884 + 10^2880 + 10^2872 + 10^2857 + 10^2497 + 10^2426 + 10^2285 + 10^2004 + 10^1443 + 10^1442 + 10^1441 + 10^881 + 10^600 + 10^459 + 10^388 + 10^27 + 10^12 + 10^4 + 1. There are infinitely many counterexamples not divisible by 10. This counterexample follows from the fact that 111^2+2000*4+200*4=12321+8000+800=21121. In fact, every binary substring will eventually occur in this sequence. Also, if n is a term containing only the digits 0 and 1, then 10^k*n+1 and n+10^k are also in this sequence for any sufficiently large integer k. (End)
%H A136808 Giovanni Resta, <a href="/A136808/b136808.txt">Table of n, a(n) for n = 1..10000</a> (first 1359 terms from Jonathan Wellons)
%H A136808 Jonathan Wellons, <a href="https://web.archive.org/web/20090206165028/http://jonathanwellons.com/shared-digits/">Tables of Shared Digits</a> [archived]
%H A136808 <a href="/index/Sq#squares">Index to sequences related to squares</a>.
%e A136808 101000100100001^2 = 10201020220210222010200200001.
%p A136808 isA136808 := proc(n) local ndgs,n2dgs ; ndgs := convert(convert(n,base,10),set) ; n2dgs := convert(convert(n^2,base,10),set) ; if ( (ndgs union n2dgs) minus {0,1,2} ) = {} then true ; else false ; fi ; end: LtonRev := proc(L) local i ; add(op(i,L)*10^(i-1),i=1..nops(L)) ; end: A007089 := proc(n) convert(n,base,3) ; LtonRev(%) ; end: n := 1: for i from 0 do n3 := A007089(i) ; if isA136808(n3) then printf("%d %d ",n,n3) ; n := n+1 ; fi ; od: # _R. J. Mathar_, Jan 24 2008
%t A136808 Select[FromDigits/@Tuples[{0,1},7],Union[Take[DigitCount[#^2],{3,9}]]=={0}&] (* _Harvey P. Dale_, May 29 2013 *)
%o A136808 (PARI) for(n=1,999,vecmax(digits((N=fromdigits(binary(n),10))^2))<3 && print1(N",")) \\ _M. F. Hasler_, Nov 15 2017
%Y A136808 A subsequence of the binary numbers A007088.
%Y A136808 Cf. A278038.
%Y A136808 Cf. A136809, A136810, ..., A137147 for other digit combinations.
%Y A136808 See also A058412 = A058411^2: squares having only digits {0,1,2}, A277946 = A277959^2 = squares whose largest digit is 2.
%K A136808 nonn,base
%O A136808 1,3
%A A136808 Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008