cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A199396 Binary XOR of (3^k - 1)/2 as k varies from 1 to n.

Original entry on oeis.org

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
Offset: 1

Views

Author

Paul D. Hanna, Nov 05 2011

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    FoldList[BitXor, Table[(3^n - 1)/2, {n, 1, 29}]] (* Vladimir Reshetnikov, Nov 02 2015 *)
  • PARI
    {a(n)=if(n<=0,0,bitxor(a(n-1),(3^n-1)/2))}

A199399 Binary XOR of 5^k as k varies from 0 to n.

Original entry on oeis.org

1, 4, 29, 96, 529, 3620, 13101, 66048, 325601, 1653380, 9189501, 40187552, 216562929, 1143607140, 5098589837, 26660767488, 161932208321, 635945960964, 4313170161629, 20567937335008, 74804061006033, 551572049610276, 2689136522898669, 10088864973699328, 67578042506892449
Offset: 0

Views

Author

Paul D. Hanna, Nov 05 2011

Keywords

Examples

			a(2) = 1 XOR 5 = 4; a(3) = 1 XOR 5 XOR 25 = 29; a(4) = 1 XOR 5 XOR 25 XOR 125 = 96.
		

Crossrefs

Cf. A199397.

Programs

  • PARI
    {a(n)=if(n<0,0,bitxor(a(n-1),5^n))}
Showing 1-2 of 2 results.