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!)
A099810 a(n) = a(n-1) XOR (a(n-1) + a(n-2)), with a(1)=1, a(2)=3, where XOR is the binary exclusive OR operation. 1
1, 3, 7, 13, 25, 63, 103, 193, 489, 835, 1647, 4061, 6545, 12543, 31343, 53505, 105073, 258307, 424567, 790797, 2005641, 3420447, 6748855, 16634209, 26811769, 51377059, 128377535, 219165917, 430383937, 1058044767, 1739056639 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
a(3) = 7 since 3 XOR (3+1) = 3 XOR 4 = 7.
a(4) = 13 since 7 XOR (7+3) = 7 XOR 10 = 13.
a(5) = 25 since 13 XOR (13+7) = 13 XOR 20 = 25.
The binary expansions of a(n) form a triangle (listed with ones place in leftmost column):
1,
1,1,
1,1,1,
1,0,1,1,
1,0,0,1,1,
1,1,1,1,1,1,
1,1,1,0,0,1,1,
1,0,0,0,0,0,1,1,
1,0,0,1,0,1,1,1,1,
1,1,0,0,0,0,1,0,1,1,
1,1,1,1,0,1,1,0,0,1,1,
1,0,1,1,1,0,1,1,1,1,1,1,...
PROG
(PARI) a(n)=if(n==1, 1, if(n==2, 3, bitxor(a(n-1), a(n-1)+a(n-2))))
CROSSREFS
Cf. A099811.
Sequence in context: A363143 A282913 A284026 * A283177 A284297 A205521
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Oct 26 2004
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 19 07:38 EDT 2024. Contains 371782 sequences. (Running on oeis4.)