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-3 of 3 results.

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 }.

A330439 Number of times g(n) appears in [g(0),g(1),...,g(n)], where g = A316774.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 2, 1, 2, 3, 1, 3, 4, 1, 2, 4, 2, 3, 4, 2, 5, 1, 6, 2, 3, 3, 7, 1, 4, 4, 5, 1, 8, 2, 2, 5, 3, 6, 3, 4, 7, 1, 8, 5, 1, 9, 3, 1, 6, 4, 4, 9, 2, 2, 7, 6, 3, 7, 5, 2, 5, 6, 3, 8, 3, 4, 10, 1, 5, 10, 1, 6, 7, 4, 7, 8, 1, 9, 6, 2, 11, 5, 2, 8, 7, 3, 8, 9, 1, 9, 10, 1, 10, 11, 1, 4, 5, 10, 4, 2, 11, 6
Offset: 0

Views

Author

Alois P. Heinz, Dec 14 2019

Keywords

Crossrefs

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(n) option remember; b(g(n)) end:
    seq(a(n), n=0..200);
  • Mathematica
    b[_] = 0;
    g[n_] := g[n] = Module[{t},
         t = If[n<2, n, b[g[n-1]]+b[g[n-2]]];
         b[t]++; t];
    a[n_] := a[n] = b[g[n]];
    a /@ Range[0, 200] (* Jean-François Alcover, Mar 30 2021, after Alois P. Heinz *)

A330587 A(n,k) is the n-th index m such that A330439(m) = k; square array A(n,k), n>=1, k>=1, read by antidiagonals.

Original entry on oeis.org

0, 3, 1, 6, 7, 2, 13, 10, 9, 4, 21, 16, 12, 15, 5, 23, 31, 19, 18, 17, 8, 27, 38, 36, 29, 25, 20, 11, 33, 41, 49, 44, 30, 26, 24, 14, 46, 43, 55, 56, 59, 40, 37, 34, 22, 67, 52, 64, 58, 62, 61, 50, 39, 35, 28, 81, 70, 78, 76, 73, 72, 69, 51, 47, 53, 32, 104, 94, 91, 88, 84, 75, 79, 82, 66, 57, 54, 42
Offset: 1

Views

Author

Alois P. Heinz, Dec 18 2019

Keywords

Examples

			Square array A(n,k) begins:
   0,  3,  6, 13,  21,  23,  27,  33,  46,  67, ...
   1,  7, 10, 16,  31,  38,  41,  43,  52,  70, ...
   2,  9, 12, 19,  36,  49,  55,  64,  78,  91, ...
   4, 15, 18, 29,  44,  56,  58,  76,  88,  93, ...
   5, 17, 25, 30,  59,  62,  73,  84,  90,  98, ...
   8, 20, 26, 40,  61,  72,  75,  87, 117, 139, ...
  11, 24, 37, 50,  69,  79,  85, 121, 124, 154, ...
  14, 34, 39, 51,  82, 102, 118, 142, 155, 157, ...
  22, 35, 47, 66,  97, 110, 133, 180, 190, 202, ...
  28, 53, 57, 74, 106, 116, 164, 183, 197, 205, ...
		

Crossrefs

Column k=1 gives A330440.
Row n=1 gives A330588.
Main diagonal gives A330589.

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:
    f:= proc(n) option remember; b(g(n)) end:
    A:= proc() local l, t; t, l:= -1, proc() [] end;
          proc(n,k) local h;
            while nops(l(k))
    				
  • Mathematica
    b[_] = 0;
    g[n_] := g[n] = Module[{t}, t = If[n < 2, n, b[g[n - 1]] + b[g[n - 2]]]; b[t]++; t];
    f[n_] := f[n] = b[g[n]];
    A[n_, k_] := Module[{l, t = -1, h}, l[_] = {}; While[Length[l[k]] < n, t++; h = f[t]; AppendTo[l[h], t]]; l[k][[n]]];
    Table[Table[A[n, 1 + d - n], {n, 1, d}], {d, 1, 14}] // Flatten (* Jean-François Alcover, Feb 11 2021, after Alois P. Heinz *)
Showing 1-3 of 3 results.