OFFSET
1,3
COMMENTS
Generated with "DrScheme".
From M. F. Hasler, Nov 03 2020: (Start)
A136813(144) = 31733311 is the first term of that sequence which is not in this sequence. All others among A136810-A136815 differ much earlier.
If a(n) is a term then so is 10*a(n). Conjecture: the sequence contains only "binary numbers" (digits 0 or 1) having no more than three 1's in a row, and not more than one run of two or more consecutive 1's. (But not all such numbers, since 101101 for example is not in the sequence.) (End)
Here is a counterexample with two instances of two consecutive ones, i.e., two non-overlapping occurrences of the substring 11: 110010000010100001010000010011^2 = 12102200102222202222322212223022221222322220222220100220121. - Michael S. Branicky, Nov 04 2020
One cannot test candidates digit-by-digit from the right. Specifically, a suffix of the valid counterexample above is invalid: 10100001010000010011^2 = 102010020402001222322220222220100220121. - Michael S. Branicky, Nov 05 2020
With respect to the conjectures and comment above, only digits 0 and 1 occur and no 1111's occur in the first 83990 terms (all with <= 25 digits). These were generated incrementally from the right based on partial screening (see Python program). - Michael S. Branicky, Jul 07 2022
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..12670 (all terms with <= 19 digits; terms 1..1380 from Jonathan Wellons)
Jonathan Wellons, Tables of Shared Digits
EXAMPLE
111^2 = 12321,
11101^2 = 123232201, and
101011^2 = 10203222121,
111001^2 = 12321222001, so 111, 11101, 101011 and 111001 are in the sequence, but:
110011^2 = 12102420121, so 110011 is not in the sequence; also
1100011^2 = 1210024200121, so 1100011 is not in the sequence, and
1010101^2 = 1020304030201, so 1010101 is not in the sequence; but
1110001^2 = 1232102220001, so 1110001 is in the sequence; also
1010100100001^2 = 1020302212022030200200001.
MATHEMATICA
Select[Range[0, 200000], And@@(ContainsAll[{0, 1, 2, 3}, Union@IntegerDigits@#]&/@{#, #^2})&] (* Giorgos Kalogeropoulos, May 21 2021 *)
With[{c={0, 1, 2, 3}}, Select[FromDigits/@Tuples[c, 6], SubsetQ[c, IntegerDigits[ #^2]]&]] (* Harvey P. Dale, Jun 01 2021 *)
PROG
(PARI) select( {is_A136809(n, o(n)=vecmax(digits(n))<4)=o(n^2)&&o(n)}, [fromdigits(binary(n))|n<-[0..99]]) \\ M. F. Hasler, Nov 03 2020
(Python)
from itertools import count, islice
def agen(only="0123"):
digset, valid = set(only), set(only)
for e in count(1):
found, newvalid = set(), set()
for tstr in valid:
t = int(tstr)
if (tstr == "0" or tstr[0] != "0") and set(str(t**2)) <= digset:
found.add(t)
for d in digset:
dtstr = d + tstr
dt = int(dtstr)
remstr = str(dt**2)[-e:]
if set(remstr) <= digset:
newvalid.add(dtstr)
valid = newvalid
yield from sorted(found)
print(list(islice(agen(), 50))) # Michael S. Branicky, Jul 07 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008
STATUS
approved