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.

A160417 a(n) = A160415(n+1)/4.

Original entry on oeis.org

2, 1, 7, 1, 7, 3, 21, 1, 7, 3, 21, 3, 21, 9, 63, 1, 7, 3, 21, 3, 21, 9, 63, 3, 21, 9, 63, 9, 63, 27, 189, 1, 7, 3, 21, 3, 21, 9, 63, 3, 21, 9, 63, 9, 63, 27, 189, 3, 21, 9, 63, 9, 63, 27, 189, 9, 63, 27, 189, 27, 189, 81, 567, 1, 7, 3, 21, 3, 21, 9, 63, 3, 21
Offset: 1

Views

Author

Omar E. Pol, Jun 13 2009

Keywords

Crossrefs

Programs

  • Mathematica
    With[{d = 2}, wt[n_] := DigitCount[n, 2, 1]; f[n_] := If[OddQ[n], 3^d + (2^d) * Sum[(2^d - 1)^(wt[k] - 1), {k, 1, (n - 1)/2}] + (2^d)*(3^d - 2) * Sum[(2^d - 1)^(wt[k] - 1), {k, 1, (n - 3)/2}], 3^d + (2^d) * Sum[(2^d - 1)^(wt[k] - 1), {k, 1, n/2 - 1}] + (2^d)*(3^d - 2) * Sum[(2^d - 1)^(wt[k] - 1), {k, 1, n/2 - 1}]]; f[0] = 0; f[1] = 1; Differences[Array[f, 100]]/4] (* Amiram Eldar, Feb 02 2024 *)

Extensions

More terms from Max Alekseyev, Dec 12 2011
More terms from Amiram Eldar, Feb 02 2024