|
|
A230725
|
|
Digital sum of tribonacci numbers with a(0)=a(1)=a(2)=1.
|
|
1
|
|
|
1, 1, 1, 3, 5, 9, 8, 4, 12, 6, 13, 13, 14, 4, 13, 13, 21, 20, 18, 32, 25, 21, 33, 25, 43, 20, 16, 25, 16, 21, 53, 36, 38, 46, 48, 51, 46, 64, 44, 55, 46, 46, 48, 41, 45, 53, 58, 57, 60, 49, 58, 59, 67, 58, 76, 57, 65, 72, 77, 61
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
In the tribonacci sequence with initial values a(0)=a(1)=a(2)=1, the 30th term is 37895489. Its digital sum is 53.
|
|
PROG
|
(Sage)
L=[1, 1, 1]
n=100 #change for more terms
for i in [3..n]:
L.append(L[i-3]+L[i-2]+L[i-1])
[sum(x.digits(base=10)) for x in L] # Tom Edgar, Nov 09 2013
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|