Skip to main content
added 3 characters in body
Source Link
Luis Mendo
  • 105.3k
  • 9
  • 135
  • 372

MATL, 15 bytes

lOi:"yyhFYAss]&

Try it online!

lO       % Push 1, then 0. ThusSo the next generated terms will be 1, 1, 2,... 
i        % Input n
:"       % Repeat that many times
  yy     %   Duplicate top two elements in the stack
  h      %   Concatenate into length-2 horizontal vector
  FYA    %   Convert to decimal digits. Gives a 2-row matrix
  ss     %   Sum of all matrix entries
]        % End
&        % Specify that next function (display) will take only 1 input
         % Implicit display

MATL, 15 bytes

lOi:"yyhFYAss]&

Try it online!

lO       % Push 1, then 0. Thus the next generated terms will be 1, 1, 2
i        % Input n
:"       % Repeat that many times
  yy     %   Duplicate top two elements in the stack
  h      %   Concatenate into length-2 horizontal vector
  FYA    %   Convert to decimal digits. Gives a 2-row matrix
  ss     %   Sum of all matrix entries
]        % End
&        % Specify that next function (display) will take only 1 input
         % Implicit display

MATL, 15 bytes

lOi:"yyhFYAss]&

Try it online!

lO       % Push 1, then 0. So the next generated terms will be 1, 1, 2,... 
i        % Input n
:"       % Repeat that many times
  yy     %   Duplicate top two elements in the stack
  h      %   Concatenate into length-2 horizontal vector
  FYA    %   Convert to decimal digits. Gives a 2-row matrix
  ss     %   Sum of all matrix entries
]        % End
&        % Specify that next function (display) will take only 1 input
         % Implicit display
added 509 characters in body
Source Link
Luis Mendo
  • 105.3k
  • 9
  • 135
  • 372

MATL, 15 bytes

lOi:"yyhFYAss]&

Try it online!

lO       % Push 1, then 0. Thus the next generated terms will be 1, 1, 2
i        % Input n
:"       % Repeat that many times
  yy     %   Duplicate top two elements in the stack
  h      %   Concatenate into length-2 horizontal vector
  FYA    %   Convert to decimal digits. Gives a 2-row matrix
  ss     %   Sum of all matrix entries
]        % End
&        % Specify that next function (display) will take only 1 input
         % Implicit display

MATL, 15 bytes

lOi:"yyhFYAss]&

Try it online!

MATL, 15 bytes

lOi:"yyhFYAss]&

Try it online!

lO       % Push 1, then 0. Thus the next generated terms will be 1, 1, 2
i        % Input n
:"       % Repeat that many times
  yy     %   Duplicate top two elements in the stack
  h      %   Concatenate into length-2 horizontal vector
  FYA    %   Convert to decimal digits. Gives a 2-row matrix
  ss     %   Sum of all matrix entries
]        % End
&        % Specify that next function (display) will take only 1 input
         % Implicit display
Source Link
Luis Mendo
  • 105.3k
  • 9
  • 135
  • 372

MATL, 15 bytes

lOi:"yyhFYAss]&

Try it online!