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!)
A119795 a(1) = a(2) = 1. a(n) = a(n-2) + (largest power of 2 dividing a(n-1)). 1
1, 1, 2, 3, 3, 4, 7, 5, 8, 13, 9, 14, 11, 15, 12, 19, 13, 20, 17, 21, 18, 23, 19, 24, 27, 25, 28, 29, 29, 30, 31, 31, 32, 63, 33, 64, 97, 65, 98, 67, 99, 68, 103, 69, 104, 77, 105, 78, 107, 79, 108, 83, 109, 84, 113, 85, 114, 87, 115, 88, 123, 89, 124, 93, 125, 94, 127, 95, 128 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
4 is the largest power of two dividing a(18) = 20. So a(19) = a(17) + 4 = 17.
MAPLE
A006519 := proc(n::integer) RETURN(gcd(2^n, n)) ; end; A119795 := proc(nmax::integer) local a, n; a := array(1..nmax) ; a[1] := 1 ; a[2] := 1 ; for n from 3 to nmax do a[n] := a[n-2]+A006519(a[n-1]) ; end ; RETURN(a) ; end ; nmax := 200 ; a := A119795(nmax) ; for n from 1 to nmax do printf("%d, ", a[n]) ; od ; # R. J. Mathar, Aug 04 2006
CROSSREFS
Cf. A006519.
Sequence in context: A368305 A184271 A269098 * A207618 A119614 A260167
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 30 2006
EXTENSIONS
More terms from R. J. Mathar, Aug 04 2006
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 April 25 11:36 EDT 2024. Contains 371968 sequences. (Running on oeis4.)