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!)
A126760 a(0) = 0, a(2n) = a(n), a(3n) = a(n), a(6n+1) = 2n + 1, a(6n+5) = 2n + 2. 33

%I #42 Apr 18 2022 17:49:09

%S 0,1,1,1,1,2,1,3,1,1,2,4,1,5,3,2,1,6,1,7,2,3,4,8,1,9,5,1,3,10,2,11,1,

%T 4,6,12,1,13,7,5,2,14,3,15,4,2,8,16,1,17,9,6,5,18,1,19,3,7,10,20,2,21,

%U 11,3,1,22,4,23,6,8,12,24,1,25,13,9,7,26,5,27,2,1,14,28,3,29,15,10,4,30,2

%N a(0) = 0, a(2n) = a(n), a(3n) = a(n), a(6n+1) = 2n + 1, a(6n+5) = 2n + 2.

%C For further information see A126759, which provided the original motivation for this sequence.

%C From _Antti Karttunen_, Jan 28 2015: (Start)

%C The odd bisection of the sequence gives A253887, and the even bisection gives the sequence itself.

%C A254048 gives the sequence obtained when this sequence is restricted to A007494 (numbers congruent to 0 or 2 mod 3).

%C For all odd numbers k present in square array A135765, a(k) = the column index of k in that array. (End)

%C A322026 and this sequence (without the initial zero) are ordinal transforms of each other. - _Antti Karttunen_, Feb 09 2019

%H Antti Karttunen, <a href="/A126760/b126760.txt">Table of n, a(n) for n = 0..19683</a>

%F a(n) = A126759(n)-1. [The original definition.]

%F From _Antti Karttunen_, Jan 28 2015: (Start)

%F a(0) = 0, a(2n) = a(n), a(3n) = a(n), a(6n+1) = 2n + 1, a(6n+5) = 2n + 2.

%F Or with the last clause represented in another way:

%F a(0) = 0, a(2n) = a(n), a(3n) = a(n), a(6n+1) = 2n + 1, a(6n-1) = 2n.

%F Other identities. For all n >= 1:

%F a(n) = A253887(A003602(n)).

%F a(6n-3) = a(4n-2) = a(2n-1) = A253887(n).

%F (End)

%F a(n) = A249746(A003602(A064989(n))). - _Antti Karttunen_, Feb 04 2015

%F a(n) = A323882(4*n). - _Antti Karttunen_, Apr 18 2022

%t f[n_] := Block[{a}, a[0] = 0; a[1] = a[2] = a[3] = 1; a[x_] := Which[EvenQ@ x, a[x/2], Mod[x, 3] == 0, a[x/3], Mod[x, 6] == 1, 2 (x - 1)/6 + 1, Mod[x, 6] == 5, 2 (x - 5)/6 + 2]; Table[a@ i, {i, 0, n}]] (* _Michael De Vlieger_, Feb 03 2015 *)

%o (Scheme, with memoizing macro definec)

%o (definec (A126760 n) (cond ((zero? n) n) ((even? n) (A126760 (/ n 2))) ((zero? (modulo n 3)) (A126760 (/ n 3))) ((= 1 (modulo n 6)) (+ 1 (/ (- n 1) 3))) (else (/ (+ n 1) 3))))

%o ;; _Antti Karttunen_, Jan 28 2015

%o (PARI) A126760(n)={n&&n\=3^valuation(n,3)<<valuation(n,2);n%3+n\6*2} \\ _M. F. Hasler_, Jan 19 2016

%Y One less than A126759.

%Y Cf. A003586, A003602, A007310, A064989, A249746, A253887, A254048, A273669, A322026 (ordinal transform), A322317, A323881 (Dirichlet inverse), A323882.

%Y Cf. A347233 (Möbius transform) and also A349390, A349393, A349395 for other Dirichlet convolutions.

%Y Related arrays: A135765, A254102.

%K nonn

%O 0,6

%A _N. J. A. Sloane_, Feb 19 2007

%E Name replaced with an independent recurrence and the old description moved to the Formula section - _Antti Karttunen_, Jan 28 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 April 19 03:46 EDT 2024. Contains 371782 sequences. (Running on oeis4.)