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!)
A285326 a(0) = 0, for n > 0, a(n) = n + A006519(n). 5
0, 2, 4, 4, 8, 6, 8, 8, 16, 10, 12, 12, 16, 14, 16, 16, 32, 18, 20, 20, 24, 22, 24, 24, 32, 26, 28, 28, 32, 30, 32, 32, 64, 34, 36, 36, 40, 38, 40, 40, 48, 42, 44, 44, 48, 46, 48, 48, 64, 50, 52, 52, 56, 54, 56, 56, 64, 58, 60, 60, 64, 62, 64, 64, 128, 66, 68, 68, 72, 70, 72, 72, 80, 74, 76, 76, 80, 78, 80, 80, 96, 82, 84, 84, 88, 86, 88, 88, 96, 90, 92, 92 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
From M. F. Hasler, Oct 19 2019: (Start)
This sequence is equal to itself multiplied by 2 and interleaved with the positive even numbers: We have a(2n-1) = 2n (n >= 1) from the very definition, since A006519(m) = 1 for odd m. And a(2n) = 2n + A006519(2n) = 2*a(n), using A006519(2n) = 2*A006519(n).
The sequence repeats the pattern [A, B, C, C] where in the n-th occurrence C = 4n, B = C - 2, A = C if n is even, A = C + 4 if n = 3 (mod 4), and A = 16*a((n-1)/4) otherwise. (End)
LINKS
FORMULA
a(0) = 0; for n > 0, a(n) = n + A006519(n).
For n >= 1, a(n) = 2*A109168(n).
a(n) = 2*A140472(n) and a(2n) = 2*a(n) and a(2^n) = 2^(n+1) for all n >= 0, a(2n-1) = 2n for all n >= 1. - M. F. Hasler, Oct 19 2019
MATHEMATICA
Table[If[n>0, n + GCD[2^n, n], 0], {n, 0, 100}] (* Indranil Ghosh, Apr 20 2017 *)
PROG
(Scheme)
(define (A285326 n) (if (zero? n) n (+ n (A006519 n))))
(define (A285326 n) (A048675 (A065642 (A019565 n))))
(Python)
from sympy import gcd
def a(n): return n + gcd(2**n, n) if n>0 else 0 # Indranil Ghosh, Apr 20 2017
(PARI) a(n) = if(n>0, n + gcd(2^n, n), 0); \\ Indranil Ghosh, Apr 20 2017
(PARI) A285326(n)=n+bitand(n, -n) \\ Or: {a(n)=-bitand(-n, bitneg(n))}, not faster. - M. F. Hasler, Oct 19 2019
CROSSREFS
Row 2 of A285325 (after the initial zero).
Cf. A109168 (same terms divided by 2), also A140472.
Sequence in context: A353190 A005884 A229913 * A355467 A079890 A337973
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Apr 19 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 24 15:10 EDT 2024. Contains 375417 sequences. (Running on oeis4.)