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!)
A284807 Write in base k, complement, reverse. Case k = 8. 2
7, 6, 5, 4, 3, 2, 1, 0, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 60, 52, 44, 36, 28, 20, 12, 4, 59, 51, 43, 35, 27, 19, 11, 3, 58, 50, 42, 34, 26, 18, 10, 2, 57, 49, 41, 33, 25, 17, 9, 1, 56, 48, 40, 32, 24, 16, 8, 0, 510, 446, 382, 318, 254 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

Michael De Vlieger, Table of n, a(n) for n = 0..10000

EXAMPLE

a(16) = 61 because 16 in base 8 is 20, its complement in base 8 is 57 and the digit reverse is 75 that is 61 in base 10.

MAPLE

P:=proc(q, h) local a, b, k, n; print(h-1); for n from 1 to q do a:=convert(n, base, h); b:=0;

for k from 1 to nops(a) do a[k]:=h-1-a[k]; b:=h*b+a[k]; od; print(b); od; end: P(10^2, 8);

MATHEMATICA

With[{k = 8}, Array[FromDigits[Reverse[k - IntegerDigits[#, k] - 1], k] &, 69, 0]] (* Michael De Vlieger, Feb 04 2022 *)

PROG

(Python)

def A284807(n): return -int((s:=oct(n)[-1:1:-1]), 8)-1+8**len(s) # Chai Wah Wu, Feb 04 2022

CROSSREFS

Cf. A036044, A267193, A284808.

Sequence in context: A307338 A031098 A004448 * A309909 A031099 A260933

Adjacent sequences: A284804 A284805 A284806 * A284808 A284809 A284810

KEYWORD

nonn,base,easy

AUTHOR

Paolo P. Lava, Apr 03 2017

EXTENSIONS

Offset corrected by Chai Wah Wu, Feb 04 2022

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 February 2 17:11 EST 2023. Contains 360023 sequences. (Running on oeis4.)