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.

Showing 1-3 of 3 results.

A337832 Porous numbers: Numbers k which are not multiples of 10 such that every m with sum of digits = k and k a divisor of both m and rev(m) has a zero in its digits.

Original entry on oeis.org

11, 37, 74, 101, 121
Offset: 1

Views

Author

Ruediger Jehn, Sep 24 2020

Keywords

Comments

It is straightforward to prove that a number is not porous by finding an m that does not contain a zero, but satisfies the three requirements. For example, 12 is not a term because 48 is a number with sum of digits equal to 12 and both 48 and 84 are multiples of 12. Many numbers of A333666 can be taken directly to prove that a given value is not a term.
So far only for the five numbers of this sequence no m could be found by computer programs to demonstrate that they are not porous. For a good reason, because for these 5 numbers it can be proven that no such m exists (the proofs are provided in the link below).
Up to k = 1000 no further porous numbers exist (see the linked file with the corresponding m where k | m and k | rev(m)). The steadily increasing number of possibilities to construct an m for a given k suggests that the 5 terms might be the only porous numbers, but a mathematical proof for this conjecture seems a big challenge.

Examples

			If we search for an m to demonstrate that k = 11 is not porous, we loop through all m where sum of digits = 11 and 11 a divisor of both m and rev(m). We find 209, 308, 407, ... 902, 2090, 3080, ... All m contain at least one zero. If it can be proven that this holds for all m, then 11 is a porous number.
For k = 11 this proof actually is quite easy:
Let "m_s ... m_3 m_2 m_1 m_0" be a number m with digits m_i and the sum of the digits is 11. We define:
A = m_0 + m_2 + m_4 + ... and B = m_1 + m_3 + m_5 + ...
A divisibility rule for 11 requires that the alternating sum of the digits must be a multiple of 11. Hence:
   A - B = j * 11
Since the sum of the digits is 11, we have
   A + B = 11
Adding the two equations yields
   2 * A = (j + 1) * 11
Therefore A must be 0 or 11. If A is 11, then B is 0. This means either A or B must be zero and m must contain a zero. Hence 11 is a porous number.
		

Crossrefs

Cf. A333666.

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.

Original entry on oeis.org

1, 11, 4399137296449, 767, 4543829, 302306413101798081695809, 1041919, 4120511, 119471087, 92239871, 461373439, 3221191679, 25098711039, 5864072675327, 2642508222647189060948556167549513, 20016007615544303, 208836273045503, 70085007900671, 985162418485119
Offset: 1

Views

Author

Ruediger Jehn, Oct 20 2021

Keywords

Comments

Only for numbers x_n coprime to 10 (A045572, i.e., numbers ending with 1,3,7 or 9) do there exist binary numbers b such that gcd(b, rev(b)) = x_n and digitsum(b) = x_n. For the numbers 7 and 13 and the porous numbers 11, 37 and 101 (A337832), the terms in their binary form have more zeros than ones, which are called long solutions. In these cases, let e = mult_order(10, n), then b = 10^(e*n) + Sum_{i=0..n-2} 10^(e*i). For example, the multiplicative order of 10 mod 11 is 2 and 10001010101010101010101 is the solution. However, in the case of the porous number 121, this formula does not work because both b and rev(b) are divisible by 1111111111111111111111 which also has a multiplicative order of 10 = 22 like 121 and therefore two extra zeros need to be inserted.
For most numbers short solutions exist. Which numbers have a short solution and which have a long solution is still unclear.
For clarification: in gcd(1011,1101)=3 the two numbers 1011 and 1101 are base-10 numbers, but then 1011 is interpreted as a base-2 number and translated back to base 10 to get a(2)=11 (=8+2+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.
		

Crossrefs

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

A350385 Minimum number of zeros that need to be added to x_n ones such that a combination of these zeros and ones can make a number b with the property gcd(b, rev(b)) = digitsum(b) = x_n where x_n is coprime to 10.

Original entry on oeis.org

0, 1, 36, 1, 12, 66, 3, 3, 6, 4, 2, 3, 4, 10, 75, 16, 7, 3, 3, 7, 2, 5, 4, 3, 3, 6, 2, 2, 2, 10, 10, 5, 2, 3, 2, 2, 2, 4, 3, 10, 304, 4, 3, 3, 1, 3, 12, 6, 124
Offset: 1

Views

Author

Ruediger Jehn, Jan 05 2022

Keywords

Comments

Only for numbers x_n coprime to 10 (A045572, i.e., numbers ending with 1,3,7 or 9) do there exist numbers b such that gcd(b, rev(b)) = x_n and digitsum(b) = x_n (rev(b) is the digit reversal of b, e.g., rev(123) = 321). If b must consist only of zeros and ones, the smallest values of b that satisfy these two constraints are converted to decimal and form sequence A348480. The question arose: How many zeros are needed for each x_n to find a matching number b? In most cases just a few zeros are enough, but some numbers, such as 7, 11, 13 and 37, require more zeros than ones and the corresponding b is called a "long solution". x_n = 101 requires 304 zeros because 101 is a porous number (see A337832).

Examples

			a(2) = 1 because x_2 = 3 and if you add 1 zero to 3 ones you can form b = 1011 for which gcd(b,rev(b)) = digitsum(b) = 3.
		

Crossrefs

Programs

  • Python
    A348480 = [1, 11, 4399137296449, 767, 4543829, 302306413101798081695809]
    for m in A348480:
        print(bin(m)[2:].count('0'))
Showing 1-3 of 3 results.