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!)
A292591 a(1) = 0, a(2) = 1; and for n > 2, a(n) = 2*a(A285712(n)) + [1 == (n mod 3)]. 4
0, 1, 2, 5, 2, 10, 21, 4, 42, 85, 10, 170, 5, 4, 340, 681, 20, 8, 1363, 42, 2726, 5453, 8, 10906, 11, 84, 21812, 21, 170, 43624, 87249, 20, 40, 174499, 340, 348998, 697997, 10, 16, 1395995, 8, 2791990, 85, 680, 5583980, 43, 1362, 168, 11167961, 40, 22335922, 44671845, 16, 89343690, 178687381, 2726, 357374762, 341, 84, 80, 23, 5452, 8, 714749525, 10906 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Binary expansion of a(n) encodes the positions of numbers of the form 3k+1 (with k >= 1) in the path taken from n to the root in the binary trees A245612 and A244154, except that the most significant 1-bit of a(n) always corresponds to 2 instead of 1 at the root of those trees.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..2048

Index entries for sequences related to binary expansion of n

Index entries for sequences computed from indices in prime factorization

FORMULA

a(n) + A292590(n) = A245611(n).

a(A245612(n)) = A292593(n).

A000120(a(n)) = A292595(n).

MATHEMATICA

f[n_] := f[n] = Which[n == 1, 0, Mod[n, 3] == 2, Ceiling[n/3], True, (Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1] + 1)/2]; a[n_] := a[n] = If[n <= 2, n - 1, 2 a[f@ n] + Boole[Mod[n, 3] == 1]]; Array[a, 65] (* Michael De Vlieger, Sep 22 2017 *)

PROG

(Scheme) (define (A292591 n) (if (<= n 2) (- n 1) (+ (if (= 1 (modulo n 3)) 1 0) (* 2 (A292591 (A285712 n))))))

CROSSREFS

Cf. A244153, A244154, A245611, A245612, A285712, A292590, A292593, A292595.

Cf. also A292245, A292385 (A292381).

Sequence in context: A210697 A085020 A276609 * A240760 A207635 A205715

Adjacent sequences:  A292588 A292589 A292590 * A292592 A292593 A292594

KEYWORD

nonn

AUTHOR

Antti Karttunen, Sep 20 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 18 06:18 EST 2022. Contains 350449 sequences. (Running on oeis4.)