|
|
A133211
|
|
Sum of all n-digit Perrin numbers.
|
|
0
|
|
|
27, 338, 3113, 29524, 280003, 3619458, 33362676, 316408590, 3000790339, 28459223116, 367878072268, 3390948851403, 32159451022886, 304997313558856, 2892566829325533, 37390757461695633, 344652632558806213, 3268654274185743387, 30999620356388134160, 293997584825511430878
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
Sum of all 1-digit Perrin numbers = 3 + 0 + 2 + 3 + 2 + 5 + 5 + 7 = 27.
Sum of all 2-digit Perrin numbers = 10 + 12 + 17 + 22 + 29 + 39 + 51 + 68 + 90 = 338.
Sum of all 3-digit Perrin numbers = 119 + 158 + 209 + 277 + 367 + 486 + 644 + 853 = 3113.
|
|
MATHEMATICA
|
a[n_] := a[n] = a[n - 2] + a[n - 3]; a[0] = 3; a[1] = 0; a[2] = 2; t = Table[a@n, {n, 0, 150}]; Table[Plus @@ Select[t, 10^(n - 1) -1 < # < 10^n &], {n, 18}] - Robert G. Wilson v, Oct 14 2007
With[{pernos=LinearRecurrence[{0, 1, 1}, {3, 0, 2}, 200]}, Table[Total[ Select[ pernos, IntegerLength[#]==n&]], {n, 20}]] (* Harvey P. Dale, Apr 20 2012 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,less
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|