Allan Joseph Champneys Cunningham (1842–1928) was a British-Indian mathematician whose later work focused on number theory. He investigated factors of large numbers in forms such as aⁿ ± bⁿ, including Mersenne and Fermat numbers.
Born in Delhi, Cunningham was the son of archaeologist Sir Alexander Cunningham, founder of the Archaeological Survey of India. He began a military career with the Bengal Engineers of the East India Company and, from 1871 to 1881, taught mathematics at Thomason College of Civil Engineering, later known as IIT Roorkee.
After returning to the United Kingdom in 1881, he taught at military institutes in Chatham, Dublin and Shorncliffe. He left the army in 1891 and devoted the rest of his life to number theory. His factorization work was later carried forward through the Cunningham project.