variable K cannot be deleted

The Wolfram Language currently uses seven single letter capital letters for various core system functions: C, D, E, I, K, N, and O. Mnemonically: OINCKED

The other 19 capital letters are available to use, at least in current versions:

data = {#, Symbol[#], ToExpression[# <> "::usage"]} & /@ CharacterRange["A", "Z"];
Grid[data, Alignment -> Left, Frame -> All, BaseStyle -> "Text"]

enter image description here

Of these seven symbols, K is the only undocumented symbol (in the sense that it does not have a reference page). I would consider that a bug or shortcoming in the documentation.


K is part of the System` context. You were removing symbols from the Global` context only, so K wasn't affected. It could be unset with K=..

That said, when doing interactive work, avoid using any symbols whose name starts with a capital letter, as these may conflict with System symbols or package symbols.

Do not set any value for K and do not attempt to Remove it as this will break things. K is used as the summation index when a generic Sum is returned. An example from the documentation of RSolve:

RSolve[a[n + 1] == a[n] + f[n], a[n], n]

(* {{a[n] -> C[1] + Sum[f[K[1]], {K[1], 0, -1 + n}]}} *)

I do not know why K is not Protected. It seems like it would make sense to protect it as people regularly assign to it by accident.


If K is evaluated then click on "description of K" and you get information:

K is a default generic name for a summation index in a symbolic sum.

The bug is that this information is missing in the help.