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!)
A256308 Apply the transformation 0 -> 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 0 to the digits of n written in base 8; do not convert back to base 10. 8

%I #6 Mar 29 2015 14:34:57

%S 1,2,3,4,5,6,7,0,21,22,23,24,25,26,27,20,31,32,33,34,35,36,37,30,41,

%T 42,43,44,45,46,47,40,51,52,53,54,55,56,57,50,61,62,63,64,65,66,67,60,

%U 71,72,73,74,75,76,77,70,1,2,3,4

%N Apply the transformation 0 -> 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 0 to the digits of n written in base 8; do not convert back to base 10.

%C Base 8 variant of A256078 (base 2) and A048379 (base 10). See A256303 - A256307 for bases 3 through 7, A256289 for base 9, and A256298 for the variant where the result is converted back to base 10.

%e a(8) = 21 because 8 = "10" in base 8 becomes "21".

%e a(63) = 0 because 63 = "77" in base 8 becomes "00".

%t Table[FromDigits[IntegerDigits[n,8]/.{0->1,1->2,2->3,3->4,4->5,5->6,6->7,7->0}],{n,0,60}] (* _Harvey P. Dale_, Mar 29 2015 *)

%o (PARI) A256308(n,b=8)=!n+eval(Strchr(apply(d->(d+1)%b+48, digits(n,b))))

%K nonn,base,easy

%O 0,2

%A _M. F. Hasler_, Mar 22 2015

%E Examples corrected by _Harvey P. Dale_, Mar 29 2015

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 September 16 18:59 EDT 2024. Contains 375977 sequences. (Running on oeis4.)