login
Base-100 digital root of n (equivalent to repeatedly adding pairs of decimal digits starting from the least significant pair).
1

%I #28 Feb 13 2017 05:10:56

%S 0,1,4,9,16,25,36,49,64,81,1,22,45,70,97,27,58,91,27,64,4,45,88,34,81,

%T 31,82,36,91,49,9,70,34,99,67,37,9,82,58,36,16,97,81,67,55,45,37,31,

%U 27,25,25,27,31,37,45,55,67,81,97,16,36,58,82,9,37,67,99,34,70,9,49,91,36,82,31,81,34,88,45,4,64,27,91,58,27,97,70,45,22,1,81,64,49,36,25,16,9,4,1

%N Base-100 digital root of n (equivalent to repeatedly adding pairs of decimal digits starting from the least significant pair).

%C Could also be called "bidigital root" of n^2.

%C When defining the bidigital root of a number, you must add the number's 2-digit groups starting from the RIGHT. If you start from the left and your number has an even number of digits, it will be correct, but if you start from the left and your number has an odd number of digits, you'll usually be wrong. For example, if you start from the left dealing with 121, you're going to get 12 + 1 = 13, not 21 + 1 = 22. (In fact, the number you'll have the bidigital root of is a number whose digits differ from the original number solely in that there's an additional 0 between the last 2 digits; in this case 1201.

%C The definition "bidigital root of n" simply produces a periodic sequence where the numbers 1 to 99 repeat in cycles of 99.

%H Indranil Ghosh, <a href="/A277342/b277342.txt">Table of n, a(n) for n = 0..990</a>

%e a(11) = 22 because 11^2 is 121 and the bidigital root of 121 is 21 + 1 = 22.

%t Table[NestWhile[Total@ IntegerDigits[#, 100] &, n^2, IntegerLength@ # >= 3 &], {n, 0, 98}] (* _Michael De Vlieger_, Oct 14 2016 *)

%o (PARI) bdr(n) = n-99*floor((n-1)/99);

%o a(n) = bdr(n^2); \\ _Michel Marcus_, Oct 10 2016

%Y Cf. A010888.

%K nonn,base

%O 0,3

%A _J. Lowell_, Oct 09 2016

%E Replaced definition with simpler definition from _Michael De Vlieger_. - _N. J. A. Sloane_, Nov 05 2016