|
Search: id:A099810
|
|
|
| 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. |
|
+0 2
|
|
| 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; listen)
|
|
|
OFFSET
|
1,2
|
|
|
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 left-most 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,...
|
|
PROGRAM
|
(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: A017994 A078000 A007909 this_sequence A125898 A146928 A068673
Adjacent sequences: A099807 A099808 A099809 this_sequence A099811 A099812 A099813
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Paul D. Hanna (pauldhanna(AT)juno.com), Oct 26 2004
|
|
|
Search completed in 0.002 seconds
|