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.

A135510 Least positive number missing from row n of Stern's diatomic array (see A049456 or A002487).

Original entry on oeis.org

2, 3, 4, 6, 6, 14, 20, 28, 38, 54, 90, 150, 216, 350, 506, 876, 1230, 2034, 3160, 4470, 7764, 12190, 18816, 29952, 43800, 73968, 112602, 182210, 285780, 474558, 729432, 1194078, 1843110, 2990880, 4662450, 7608720, 11801580, 18489120, 29790300
Offset: 1

Views

Author

mc (da-da(AT)lycos.de), Feb 09 2008

Keywords

Comments

The old definition was "Least numbers not generated by Eisenstein's algorithm: m=1 n=1, then insert between them m+n, at stage p=1. (E.g. next stage (p=2) of Eisenstein's algorithm would be m, m+m+n, m+n, m+n+n, n). The maximum of these symmetric row elements at stage p is fibonacci(p+2); but how to determine the first number not generated at stage p?"

Crossrefs

Programs

  • Maple
    A049456 := proc(n, k)
        option remember;
        if n =1 then
            if k >= 0 and k <=1 then
                1;
            else
                0 ;
            end if;
        elif type(k, 'even') then
            procname(n-1, k/2) ;
        else
            procname(n-1, (k+1)/2)+procname(n-1, (k-1)/2) ;
        end if;
    end proc: # R. J. Mathar, Dec 12 2014
    mex := proc(L)
            local k;
            for k from 1 do
                    if not k in L then
                            return k;
                    end if;
            end do:
    end proc:
    rho:=n->[seq(A049456(n,k),k=0..2^(n-1))];
    [seq(mex(rho(n)),n=1..16)]; # N. J. A. Sloane, Oct 14 2017
  • Mathematica
    (* T is A049456 *)
    T[n_, k_] := T[n, k] = If[n == 1, If[k >= 0 && k <= 1, 1, 0], If[EvenQ[k], T[n-1, k/2], T[n-1, (k+1)/2] + T[n-1, (k-1)/2]]];
    mex[L_] := Module[{k}, For[k = 1, True, k++, If[FreeQ[L, k], Return[k]]]];
    rho[n_] := Table[T[n, k], {k, 0, 2^(n-1)}];
    a[n_] := a[n] = mex[rho[n]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 25}] (* Jean-François Alcover, Aug 03 2023, after Maple code *)

Extensions

Entry revised by N. J. A. Sloane, Oct 14 2017
a(29)-a(39) from Don Reble, Oct 16 2016