Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Problem 1477. Champernowne Constant

Created by G K

The Champernowne constant is a real number whose digits in decimal representation come from the concatenation of all consecutive positive integers starting from 1.

That is


This constant is of interest because it can be understood to contain an encoding of any past, present or future information, because any given sequence of numbers can be shown to exist somewhere in the champernowne representation.

Return the nth digit of the champernowne constant. The function takes an array of position values and returns an array of digits corresponding to those positions.


 [1 2 3 4 5] returns [1 2 3 4 5]
 [10 11 12 13 14 15] returns [1 0 1 1 1 2]
 [188 289] returns [9 9] 

Problem 3) Prev: 1472 Next: 1478


Problem Group

Solution Statistics

9 correct solutions 12 incorrect solutions
Last solution submitted on Dec 01, 2014

Problem Comments