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.

A085240 As exponents > 0 in powers of 2 or 3 (A006899) occur in A085238 exactly twice, a self-inverse permutation of natural numbers is induced.

Original entry on oeis.org

2, 1, 5, 7, 3, 10, 4, 12, 15, 6, 18, 8, 20, 23, 9, 25, 28, 11, 31, 13, 33, 36, 14, 38, 16, 41, 43, 17, 46, 49, 19, 51, 21, 54, 56, 22, 59, 24, 62, 64, 26, 67, 27, 69, 72, 29, 74, 77, 30, 80, 32, 82, 85, 34, 87, 35, 90, 93, 37, 95, 98, 39, 100, 40, 103, 105, 42, 108
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 22 2003

Keywords

Crossrefs

Programs

  • Mathematica
    seq[lim_] := Module[{r2 = Range[0, Floor[Log2[lim]]], r3 = Range[0, Floor[Log[3, lim]]], s, m, v, ind, j}, s = Rest@Rest@ SortBy[Join[{#, 2^#} & /@ r2, {#, 3^#} & /@ r3], Last][[;; , 1]]; ind = Flatten /@ (Position[s, #] & /@ Range[Max[s]]); m = Max[Flatten[ind]]; v = Table[0, {m}]; Do[If[Length[i] == 2, v[[i[[1]]]] = i[[2]]; v[[i[[2]]]] = i[[1]]], {i, ind}]; TakeWhile[v, # > 0 &]]; seq[10^25] (* Amiram Eldar, Mar 25 2025 *)

Formula

A085238(n+1) = A085238(a(n)+1). [corrected by Amiram Eldar, Mar 25 2025]
a(a(n)) = n.