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.

A292593 a(n) = A292591(A245612(n)).

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 4, 5, 8, 8, 10, 11, 8, 8, 10, 10, 16, 17, 16, 17, 20, 20, 22, 23, 16, 17, 16, 16, 20, 21, 20, 21, 32, 32, 34, 35, 32, 32, 34, 34, 40, 41, 40, 41, 44, 44, 46, 47, 32, 32, 34, 34, 32, 33, 32, 32, 40, 40, 42, 43, 40, 40, 42, 42, 64, 65, 64, 65, 68, 68, 70, 71, 64, 65, 64, 64, 68, 69, 68, 69, 80, 80, 82, 83, 80, 80, 82, 82, 88, 89, 88, 89
Offset: 0

Views

Author

Antti Karttunen, Sep 20 2017

Keywords

Crossrefs

Differs from A292271 for the first time at n=31, where a(31) = 21, while A292271(31) = 20.

Programs

  • Mathematica
    f[n_] := f[n] = Which[n == 1, 0, Mod[n, 3] == 2, Ceiling[n/3], True, (Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1] + 1)/2]; g[n_] := g[n] = If[n <= 2, n - 1, 2 g[f@ n] + Boole[Mod[n, 3] == 1]]; h[n_] := (Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ If[n == 0, 1, Prime[#] Product[Prime[m]^(Map[ Ceiling[ (Length@ # - 1)/2] &, DeleteCases[Split@ Join[Riffle[IntegerDigits[n, 2], 0], {0}], {k__} /; k == 1]][[-m]]), {m, #}] &[DigitCount[n, 2, 1]]]; Array[g@ h@ # &, 92, 0] (* Michael De Vlieger, Sep 22 2017 *)

Formula

a(n) + A292592(n) = n.