login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A199396 Binary XOR of (3^k - 1)/2 as k varies from 1 to n. 3
1, 5, 8, 32, 89, 309, 1392, 2464, 12241, 23685, 66936, 329856, 598377, 2972885, 4204000, 17321536, 47254689, 156943365, 737779176, 1276350496, 6369950073, 12290868597, 35051319632, 175157734688, 319624706161, 1569854375813, 2311734655064, 9333158201280, 25600877525257 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Paul D. Hanna, Table of n, a(n) for n = 1..365

EXAMPLE

a(2) = (3^1-1)/2 XOR (3^2-1)/2 = 1 XOR 4 = 5;

a(3) = (3^1-1)/2 XOR (3^2-1)/2 XOR (3^3-1)/2 = 1 XOR 4 XOR 13 = 8;

a(4) = (3^1-1)/2 XOR (3^2-1)/2 XOR (3^3-1)/2 XOR (3^4-1)/2 = 1 XOR 4 XOR 13 XOR 40 = 32.

MATHEMATICA

FoldList[BitXor, Table[(3^n - 1)/2, {n, 1, 29}]] (* Vladimir Reshetnikov, Nov 02 2015 *)

PROG

(PARI) {a(n)=if(n<=0, 0, bitxor(a(n-1), (3^n-1)/2))}

CROSSREFS

Cf. A199397, A199403, A199402, A000975.

Sequence in context: A002536 A068981 A099631 * A275003 A032790 A187997

Adjacent sequences:  A199393 A199394 A199395 * A199397 A199398 A199399

KEYWORD

nonn

AUTHOR

Paul D. Hanna, Nov 05 2011

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 June 19 09:43 EDT 2021. Contains 345126 sequences. (Running on oeis4.)