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.

A321882 a(n) is the least base b > 1 such that the sum n + n can be computed without carry.

Original entry on oeis.org

2, 3, 5, 3, 3, 4, 5, 5, 6, 3, 3, 5, 3, 3, 6, 7, 4, 4, 8, 8, 4, 4, 7, 7, 7, 5, 5, 3, 3, 9, 3, 3, 5, 10, 10, 5, 3, 3, 6, 3, 3, 10, 6, 6, 6, 11, 11, 11, 6, 6, 5, 5, 5, 12, 13, 5, 5, 5, 7, 7, 5, 5, 5, 7, 4, 4, 7, 8, 4, 4, 7, 7, 6, 6, 6, 8, 14, 15, 6, 6, 4, 3, 3, 8
Offset: 0

Views

Author

Rémy Sigrist, Nov 20 2018

Keywords

Comments

Equivalently, a(n) is the least base b > 1 where:
- twice the greatest digit of n is < b,
- twice the digital sum of n equals the digital sum of twice n.
The sequence is well defined as, for any n > 0, n + n can be computed without carry in base 2*n + 1.
The sequence is unbounded; by contradiction:
- suppose that v = a(n) is the greatest term of the sequence,
- we can assume that v > 2,
- let d be the greatest digit of v!^A000120(n) in base v,
- let k = floor((v-1) / d),
- necessarily a(n + k * (v!^A000120(n))) > v, QED.

Examples

			For n = 42:
- in base 2, 42 + 42 cannot be computed without carry: "101010" + "101010" = "1010100",
- in base 3, 42 + 42 cannot be computed without carry: "1120" + "1120" = "10010",
- in base 4, 42 + 42 cannot be computed without carry: "222" + "222" = "1110",
- in base 5, 42 + 42 cannot be computed without carry: "132" + "132" = "314",
- in base 6, 42 + 42 can be computed without carry: "110" + "110" = "220",
- hence a(42) = 6.
		

Crossrefs

See A319478 for the multiplicative variant.

Programs

  • Mathematica
    Array[Block[{b = 2}, While[2 Max@ IntegerDigits[#, b] >= b, b++]; b] &, 84, 0] (* Michael De Vlieger, Nov 25 2018 *)
  • PARI
    a(n) = for (b=2, oo, if (2*sumdigits(n, b)==sumdigits(n*2, b), return (b)))

Formula

a(n) = 2 iff n = 0.
a(n) = 3 iff n > 0 and n belongs to A005836.
a(n * a(n)) <= a(n).
a(A007091(n)) <= 10 for any n >= 0.