OFFSET
1,1
COMMENTS
This sequence comes from a problem proposed on the French math site Diophante.
The corresponding numbers m are in A181929.
Question: does some k exist such that a(k) >= 3?
Yes, the first occurrence is a(770) = 3. See attached file. - Scott R. Shannon, Feb 25 2021
LINKS
Michel Marcus, Table of n, a(n) for n = 1..499 (using A181929 b-file).
Diophante, A107, Binaire = décimal (in French).
Scott R. Shannon, The three numbers for a(770) = 3.
FORMULA
a(n) > 0 iff length(A305213(n)) = n.
EXAMPLE
a(1) = 2 because 0 and 1 have same expansion in base 2 and in base 10.
a(3) = 1 because 110_10 = 1101110_2 and 110 is the only 3-digit integer with this property.
a(4) = 0 because there is no 4-digit number whose binary expansion's first 4 digits are the base-10 digits of m. Indeed, the 5-digit integer 10010_10 = 10011100011010_2 is the smallest integer whose binary and decimal expansions coincide through the first 4 digits (1001), but 10010 is not a 4-digit integer.
a(12) = 2 because 101111000101_10 = 1011110001010101011110110110000100101_2 and 110011001110_10 = 1100110011101001010101010100100010110_2; there are no other 12-digit integers with this property.
PROG
(PARI) lista(nn) = {my(list = List()); for (n=0, nn, if (n==0, listput(list, n), my(b = binary(n), db = fromdigits(b), bb = binary(db)); if (vector(#b, k, bb[k]) == b, listput(list, db)); ); ); my(lens = apply(x->#Str(x), list)); vector(vecmax(Vec(lens)), k, #select(x->(x==k), lens)); } \\ Michel Marcus, Feb 10 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Feb 08 2021
STATUS
approved