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.

A319478 a(n) is the least base b > 1 such that the product n * n can be computed without carry by long multiplication.

Original entry on oeis.org

2, 2, 2, 3, 2, 4, 5, 5, 2, 3, 3, 5, 3, 6, 7, 7, 2, 4, 9, 9, 4, 4, 10, 11, 11, 5, 5, 3, 3, 13, 3, 3, 2, 11, 11, 5, 3, 3, 6, 13, 13, 13, 6, 6, 6, 15, 15, 15, 6, 7, 5, 5, 17, 17, 18, 5, 7, 7, 7, 19, 19, 20, 20, 7, 2, 4, 8, 22, 4, 4, 17, 23, 6, 6, 8, 24, 19, 19, 6
Offset: 0

Views

Author

Rémy Sigrist, Nov 21 2018

Keywords

Comments

Apparently, a(n) is also the least base b > 1 where the square of the digital sum of n equals the digital sum of the square of n.
The sequence is well defined as, for any n > 0, n * n can be computed without carry in base n^2 + 1.

Crossrefs

See A321882 for the additive variant.

Programs

  • Mathematica
    Array[Block[{b = 2}, While[AnyTrue[With[{d = IntegerDigits[#, b]}, Function[{s, t}, Total@ Map[PadLeft[#, t] &, s]] @@ {#, Max[Length /@ #]} &@ MapIndexed[Join[d #, ConstantArray[0, First@ #2 - 1]] &, Reverse@ d]], # >= b &], b++]; b] &, 79, 0] (* Michael De Vlieger, Nov 25 2018 *)
  • PARI
    a(n) = for (b=2, oo, my (d=if(n==0, [0], digits(n,b))); if (vecmax(d)^2
    				

Formula

a(n) = 2 iff n belongs to A131577.
a(n * a(n)) <= a(n).
a(A061909(n)) <= 10 for any n > 0.

A362366 Square array A(n, k), n, k >= 0, read by antidiagonals; A(n, k) is the least base >= 2 where the sum n + k can be computed without carry.

Original entry on oeis.org

2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 5, 3, 2, 2, 2, 3, 3, 2, 2, 2, 4, 2, 3, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 5, 5, 4, 4, 5, 5, 2, 2, 2, 3, 2, 6, 4, 4, 4, 6, 2, 3, 2, 2, 2, 2, 2, 4, 4, 4, 4, 2, 2, 2, 2, 2, 5, 5, 3, 2, 5, 5, 5, 2, 3, 5, 5, 2
Offset: 0

Views

Author

Rémy Sigrist, Apr 17 2023

Keywords

Examples

			Array A(n, k) begins:
  n\k | 0  1  2  3  4  5  6  7  8  9  10  11  12
  ----+-----------------------------------------
    0 | 2  2  2  2  2  2  2  2  2  2   2   2   2
    1 | 2  3  2  3  2  4  2  3  2  3   2   5   2
    2 | 2  2  5  3  2  2  3  5  2  2   5   5   2
    3 | 2  3  3  3  2  3  5  6  2  3   3   3   2
    4 | 2  2  2  2  3  4  4  4  2  2   2   2   3
    5 | 2  4  2  3  4  4  4  5  2  3   2   5   3
    6 | 2  2  3  5  4  4  5  5  2  2   3   3   5
    7 | 2  3  5  6  4  5  5  5  2  3   3   5   5
    8 | 2  2  2  2  2  2  2  2  6  3   5   5   6
    9 | 2  3  2  3  2  3  2  3  3  3   3   3   3
   10 | 2  2  5  3  2  2  3  3  5  3   3   5   3
   11 | 2  5  5  3  2  5  3  5  5  3   5   5   3
   12 | 2  2  2  2  3  3  5  5  6  3   3   3   3
		

Crossrefs

Programs

  • PARI
    A(n, k) = { for (b = 2, oo, if (sumdigits(n+k, b) == sumdigits(n, b) + sumdigits(k, b), return (b););); }

Formula

A(n, k) <= max(2, n + k + 1).
A(n, k) = A(k, n).
A(n, 0) = 2.
A(n, n) = A321882(n).

A321909 a(n) is the least base b > 1 in which the additive persistence of n is <= 1.

Original entry on oeis.org

2, 2, 2, 3, 2, 4, 3, 5, 2, 3, 3, 5, 3, 6, 6, 5, 2, 4, 3, 6, 4, 4, 7, 7, 4, 5, 5, 3, 3, 7, 3, 5, 2, 4, 8, 5, 3, 6, 6, 6, 5, 8, 6, 6, 6, 6, 9, 9, 4, 6, 5, 5, 5, 7, 3, 5, 5, 7, 7, 7, 5, 10, 10, 7, 2, 4, 4, 8, 4, 4, 7, 7, 4, 6, 6, 5, 5, 7, 6, 6, 4, 3, 3, 8, 3, 6
Offset: 0

Views

Author

Rémy Sigrist, Nov 21 2018

Keywords

Comments

Equivalently, a(n) is the least base b > 1 in which the sum of digits of n is < b.
The sequence is well defined as, for any n > 0, the additive persistence of n is 0 in base n + 1.
This sequence is unbounded.

Examples

			For n = 42:
- in base 2, 42 has additive persistence 3: "101010" -> "11" -> "10" -> "1",
- in base 3, 42 has additive persistence 2: "1120" -> "11" -> "2",
- in base 4, 42 has additive persistence 2: "222" -> "12" -> "3",
- in base 5, 42 has additive persistence 2: "132" -> "11" -> "2",
- in base 6, 42 has additive persistence 1: "110" -> "2",
- hence a(42) = 6.
		

Crossrefs

See A321882 for a similar sequence.

Programs

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

Formula

a(n) = 2 iff n belongs to A131577.
a(n * a(n)) <= a(n).
Showing 1-3 of 3 results.