A250202 The "sum of squares of digits" problem in base 12, start with 6 (written in base 10).
6, 36, 9, 81, 117, 162, 38, 13, 2, 4, 16, 17, 26, 8, 64, 41, 34, 104, 128, 164, 66, 61, 26, 8, 64, 41, 34, 104, 128, 164, 66, 61, 26, 8, 64, 41, 34, 104, 128, 164, 66, 61, 26, 8, 64, 41, 34, 104, 128, 164, 66, 61, 26, 8, 64, 41, 34, 104, 128, 164, 66, 61, 26, 8, 64, 41
Offset: 1
Links
- Eric Chen, Table of n, a(n) for n = 1..1000
- Eric Chen, List of A250202 starts with n for n up to 40 (decimal 48)
- Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
Programs
-
Mathematica
NestList[Total[IntegerDigits[#, 12]^2]&, 6, 144] Join[{6, 36, 9, 81, 117, 162, 38, 13, 2, 4, 16, 17},LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 1},{26, 8, 64, 41, 34, 104, 128, 164, 66, 61},54]] (* Ray Chandler, Aug 26 2015 *) PadRight[{6,36,9,81,117,162,38,13,2,4,16,17},80,{66,61,26,8,64,41,34,104,128,164}] (* Harvey P. Dale, Aug 06 2017 *)
-
PARI
a(n) = [6, 36, 9, 81, 117, 162, 38, 13, 2, 4, 16, 17, 26, 8, 64, 41, 34, 104, 128, 164, 66, 61][n%10+10*(n>=10)+10*(n%10<3 & n>=20)]
Comments