|
|
A008469
|
|
a(n) = n OR n^3 (applied to ternary expansions).
|
|
3
|
|
|
1, 8, 30, 67, 125, 222, 349, 512, 738, 1009, 1340, 1740, 2200, 2744, 3390, 4102, 4913, 5850, 6877, 8018, 9282, 10660, 12176, 13848, 15631, 17576, 19710, 21979, 24416, 27003, 29794, 32768, 35943, 39337, 42902, 46692, 50662, 54881, 59331, 64030, 68921
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
MAPLE
|
a:= proc(n) option remember; local g, h, i, r;
g, h, r:= n, n^3, 0; for i from 0 while h>0 do
r:= r + 3^i * max(irem(g, 3, 'g'), irem(h, 3, 'h')) od; r
end:
|
|
MATHEMATICA
|
(* program should not be used to extend this sequence *)
b=3; d=12; Mb=Array[ b^(d-#)&, d ]; Map[ Plus@@(Mb*#)&, Array[ Max /@ Transpose[ {IntegerDigits[ #, b, d ], IntegerDigits[ #^3, b, d ]} ]&, 80 ] ]
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|