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!)
A215090 a(n) = Sum_{i=0..m} d(i)*3^i, where Sum_{i=0..m} d(i)*4^i is the base-4 representation of n. 4

%I #24 Jan 03 2021 14:36:44

%S 0,1,2,3,3,4,5,6,6,7,8,9,9,10,11,12,9,10,11,12,12,13,14,15,15,16,17,

%T 18,18,19,20,21,18,19,20,21,21,22,23,24,24,25,26,27,27,28,29,30,27,28,

%U 29,30,30,31,32,33,33,34,35,36,36,37,38,39,27,28,29,30,30,31,32

%N a(n) = Sum_{i=0..m} d(i)*3^i, where Sum_{i=0..m} d(i)*4^i is the base-4 representation of n.

%H Seiichi Manyama, <a href="/A215090/b215090.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..1000 from Clark Kimberling)

%F a(n) = 3*a(n/4) if n == 0 (mod 4); otherwise a(n) = a(n-1)+1.

%t t = Table[FromDigits[RealDigits[n, 4], 3], {n, 0, 100}]

%o (PARI) a(n) = fromdigits(digits(n, 4), 3); \\ _Michel Marcus_, May 02 2018

%o (Julia)

%o function a(n)

%o m, r, b = n, 0, 1

%o while m > 0

%o m, q = divrem(m, 4)

%o r += b * q

%o b *= 3

%o end

%o r end; [a(n) for n in 0:70] |> println # _Peter Luschny_, Jan 03 2021

%Y Cf. A023717.

%K nonn,base,easy

%O 0,3

%A _Clark Kimberling_, Aug 03 2012

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 April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)