%I #5 Jan 15 2017 11:48:49
%S 1,6,44,424,4176,41696,416704,4166784,41666816
%N Number of distinct residues of triangular numbers mod 10^n.
%C Number of distinct n-digit endings of triangular numbers A000217 (written in base 10).
%F (Empirical) a(n) = (5*10^n + (9 - 2*(-1)^n)*2^n)/12.
%e The last digit of a triangular number is one of 0, 1, 3, 5, 6, or 8, so a(1) = 6. (To verify that no number from {2, 4, 7, 9} can be the last digit of a triangular number T, note that 8*T+1, which must be a square, would end with 7, 3, 7, or 3, respectively, but no square ends with 3 or 7.)
%e The 44 two-digit combinations with which a triangular number may end are 00, 01, 03, 05, 06, 10, 11, 15, 16, 20, 21, 25, 26, 28, 30, 31, 35, 36, 40, 41, 45, 46, 50, 51, 53, 55, 56, 60, 61, 65, 66, 70, 71, 75, 76, 78, 80, 81, 85, 86, 90, 91, 95, 96. Of these, there are ten combinations of each of the forms x0, x1, x5, and x6; the other four, which are the only ones that end with a digit other than 0, 1, 5, or 6, are 03, 28, 53, and 78 (i.e., numbers whose residue modulo 25 is 3):
%e .
%e last digit
%e 0 1 2 3 4 5 6 7 8 9
%e +------------------------------
%e 0 | 00 01 03 05 06
%e 1 | 10 11 15 16
%e 2 | 20 21 25 26 28
%e next-to-last 3 | 30 31 35 36
%e digit 4 | 40 41 45 46
%e 5 | 50 51 53 55 56
%e 6 | 60 61 65 66
%e 7 | 70 71 75 76 78
%e 8 | 80 81 85 86
%e 9 | 90 91 95 96
%Y Cf. A000217, A000993.
%K nonn,base,more
%O 0,2
%A _Jon E. Schoenfield_, Jan 14 2017