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.

A316905 a(n) is the index of the first occurrence of n in A316774.

Original entry on oeis.org

0, 1, 2, 5, 4, 8, 11, 22, 14, 32, 28, 42, 48, 45, 68, 71, 77, 89, 108, 115, 92, 140, 95, 149, 216, 268, 194, 260, 310, 254, 263, 340, 362, 257, 295, 277, 298, 476, 346, 431, 365, 560, 539, 424, 486, 462, 576, 479, 579, 692, 657, 707, 754, 794, 757, 797, 928
Offset: 0

Views

Author

Alois P. Heinz, Jul 18 2018

Keywords

Examples

			a(4) = 4 because A316774(j) = 4 for j in {4,7,12,13,36,49,55} with minimal element 4.
		

Crossrefs

Cf. A316774, A316973, A316984, A330440 (a sorted version of this), A330447, A330448.

Programs

  • Maple
    b:= proc() 0 end:
    g:= proc(n) option remember; local t;
          t:= `if`(n<2, n, b(g(n-1))+b(g(n-2)));
          b(t):= b(t)+1; t
        end:
    a:= proc() local t, a; t, a:= -1, proc() -1 end;
          proc(n) local h;
            while a(n) = -1 do
              t:= t+1; h:= g(t);
              if a(h) = -1 then a(h):= t fi
            od; a(n)
          end
        end():
    seq(a(n), n=0..100);
  • Mathematica
    b[_] = 0;
    g[n_] := g[n] = Module[{t}, t = If[n < 2, n, b[g[n - 1]] + b[g[n - 2]]];       b[t] = b[t] + 1; t];
    a[n_] := Module[{t = -1, a}, a[_] = -1; Module[{h}, While[a[n] == -1, t = t + 1; h = g[t]; If[a[h] == -1, a[h] = t]]; a[n]]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Aug 28 2023, after Alois P. Heinz *)

Formula

a(n) = min { j >= 0 : A316774(j) = n }.