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.

A333523 Number of iterations of Reverse And Add needed to reach a number divisible by n (or 0 if such a number is never reached).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 61, 1, 3, 8, 34, 22, 8, 17, 2, 8, 119, 14, 1, 17, 7, 110, 7, 12, 33, 34, 158, 28, 12, 1, 60, 11, 12, 50, 79, 7, 129, 64, 13, 42, 1, 4, 89, 131, 8, 14, 81, 30, 19, 125, 12, 1, 88, 13, 33, 67, 232, 26, 27, 24, 123, 59, 1, 24, 59, 36, 206, 148, 12, 217, 90, 97
Offset: 1

Views

Author

Daniel Starodubtsev, Mar 26 2020

Keywords

Comments

If n is a palindrome > 0, a(n) = 1. See A002113.
a(n) > 0 for n < 10000.

Examples

			a(12) = 3, because 12 takes 3 iterations (12 -> 33 -> 66 -> 132) to become 132, which is divisible by 12.
		

Crossrefs

Programs

  • PARI
    radd(n) = fromdigits(Vecrev(digits(n)))+n; \\ A056964
    a(n) = {my(i=1, k=n, x); while((x=radd(n)) % k, i++; n=x); i;} \\ Michel Marcus, Apr 11 2020