The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A008467 a(n) = n OR n^2 (applied to ternary expansions). 3
1, 5, 12, 16, 26, 42, 52, 71, 90, 100, 122, 147, 178, 206, 231, 259, 296, 342, 370, 401, 453, 484, 539, 591, 646, 701, 756, 784, 842, 930, 961, 1025, 1095, 1186, 1259, 1332, 1369, 1445, 1524, 1609, 1691, 1770, 1852, 1943, 2070, 2152, 2237, 2316, 2401, 2510 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
OR(a, b) = max(a, b) for ternary digits a and b. - Sean A. Irvine, Mar 29 2018
LINKS
MAPLE
a:= proc(n) option remember; local g, h, i, r;
g, h, r:= n, n^2, 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:
seq(a(n), n=1..140); # Alois P. Heinz, Mar 29 2018
MATHEMATICA
(* program should not be used to extend this sequence *)
b=3; d=9; Mb=Array[ b^(d-#)&, d ]; Map[ Plus@@(Mb*#)&, Array[ Max /@ Transpose[ {IntegerDigits[ #, b, d ], IntegerDigits[ #^2, b, d ]} ]&, 140 ] ]
CROSSREFS
Sequence in context: A314282 A314283 A342089 * A076718 A076671 A269753
KEYWORD
base,nonn,easy
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 9 11:46 EDT 2024. Contains 373239 sequences. (Running on oeis4.)