A348480 For numbers x_n coprime to 10 there exist infinitely many binary numbers b such that gcd(b,rev(b)) = x_n and digitsum(b) = x_n. a(n) is the smallest b converted to decimal that satisfies this constraint.
1, 11, 4399137296449, 767, 4543829, 302306413101798081695809, 1041919, 4120511, 119471087, 92239871, 461373439, 3221191679, 25098711039, 5864072675327, 2642508222647189060948556167549513, 20016007615544303, 208836273045503, 70085007900671, 985162418485119
Offset: 1
Examples
x_2 = 3. a(2)=11 which in binary is 1011. gcd(1011,1101)=3 and there is no smaller binary number that satisfies this constraint. x_4 = 9. a(4)=767 which in binary is 1011111111. gcd(1011111111,1111111101)=9 and there is no smaller binary number that satisfies this constraint.
Links
- Ruediger Jehn, Table of n, a(n) for n = 1..54
- Rüdiger Jehn, A new 200 Euro math puzzle, Youtube video, Sep 17 2021.
- Rüdiger Jehn, Long Solutions of Sequence A348480 of the On-Line Encyclopedia of Integer Sequences, arXiv:2201.00710 [math.GM], 2022.
Programs
-
PARI
xx(n) = 2*n - 1 + (n+1)\4 * 2; \\ A045572 gcdr(n) = my(b=binary(n)); gcd(fromdigits(Vecrev(b), 10), fromdigits(b, 10)); a(n) = my(b=1, x=xx(n)); while ((hammingweight(b) != x) || (gcdr(b) != x), b++); b; \\ Michel Marcus, Dec 01 2021
-
Python
from sympy.utilities.iterables import multiset_permutations from itertools import count from math import gcd def A348480(n): if n == 1: return 1 xn = 2*(n+(n+1)//4) - 1 for l in count(xn-1): for d in multiset_permutations(['0']*(l-xn+1)+['1']*(xn-1)): s = '1'+''.join(d) if gcd(int(s),int(s[::-1])) == xn: return int(s,2) # Chai Wah Wu, Jan 08 2022
Extensions
a(13) from Giorgos Kalogeropoulos, Oct 22 2021
a(14) from Pontus von Brömssen, Oct 23 2021
a(15) from Ruediger Jehn, Dec 01 2021
a(16) - a(29) from Ruediger Jehn, Dec 17 2021
a(30) - a(54) from Ruediger Jehn, Jan 11 2022
Comments