login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A259143 Number of distinct digits needed to write the calendar date of n-th day of a non-leap year in decimal representation, without leading zeros. 1

%I #13 May 04 2018 08:11:38

%S 1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,3,2,2,3,3,3,3,3,3,3,3,2,2,1,2,

%T 2,2,2,2,2,2,3,2,2,3,3,3,3,3,3,3,2,2,1,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,

%U 3,2,3,2,3,3,3,3,3,3,3,3,2,2,3,3,3,3

%N Number of distinct digits needed to write the calendar date of n-th day of a non-leap year in decimal representation, without leading zeros.

%C a(n) <= 4.

%H Reinhard Zumkeller, <a href="/A259143/b259143.txt">Table of n, a(n) for n = 1..365</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Calendar_date">Calendar date</a>

%H <a href="/index/Ca#calendar">Index entries for sequences related to calendars</a>

%e . | Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

%e . | 1 2 3 4 5 6 7 8 9 10 11 12

%e . ----+-------------------------------------------------

%e . 1 | 1 2 2 2 2 2 2 2 2 2 1 2

%e . 2 | 2 1 2 2 2 2 2 2 2 3 2 2

%e . 3 | 2 2 1 2 2 2 2 2 2 3 2 3

%e . 4 | 2 2 2 1 2 2 2 2 2 3 2 3

%e . 5 | 2 2 2 2 1 2 2 2 2 3 2 3

%e . 6 | 2 2 2 2 2 1 2 2 2 3 2 3

%e . 7 | 2 2 2 2 2 2 1 2 2 3 2 3

%e . 8 | 2 2 2 2 2 2 2 1 2 3 2 3

%e . 9 | 2 2 2 2 2 2 2 2 1 3 2 3

%e . 10 | 2 3 3 3 3 3 3 3 3 2 2 3

%e . 11 | 1 2 2 2 2 2 2 2 2 2 1 2

%e . 12 | 2 2 3 3 3 3 3 3 3 3 2 2

%e . 13 | 2 3 2 3 3 3 3 3 3 3 2 3

%e . 14 | 2 3 3 2 3 3 3 3 3 3 2 3

%e . 15 | 2 3 3 3 2 3 3 3 3 3 2 3

%e . 16 | 2 3 3 3 3 2 3 3 3 3 2 3

%e . 17 | 2 3 3 3 3 3 2 3 3 3 2 3

%e . 18 | 2 3 3 3 3 3 3 2 3 3 2 3

%e . 19 | 2 3 3 3 3 3 3 3 2 3 2 3

%e . 20 | 3 2 3 3 3 3 3 3 3 3 3 3

%e . 21 | 2 2 3 3 3 3 3 3 3 3 2 2

%e . 22 | 2 1 2 2 2 2 2 2 2 3 2 2

%e . 23 | 3 2 2 3 3 3 3 3 3 4 3 3

%e . 24 | 3 2 3 2 3 3 3 3 3 4 3 3

%e . 25 | 3 2 3 3 2 3 3 3 3 4 3 3

%e . 26 | 3 2 3 3 3 2 3 3 3 4 3 3

%e . 27 | 3 2 3 3 3 3 2 3 3 4 3 3

%e . 28 | 3 2 3 3 3 3 3 2 3 4 3 3

%e . 29 | 3 _ 3 3 3 3 3 3 2 4 3 3

%e . 30 | 3 _ 2 3 3 3 3 3 3 3 3 4

%e . 31 | 2 _ 2 _ 3 _ 3 3 _ 3 _ 3 .

%e 13 days need just 1 digit: {1, 11, 33, 53, 62, 94, 125, 157, 188, 220, 252, 305, 315} = {Jan 1, Jan 11, Feb 2, Feb 22, Mar 3, Apr 4, May 5, Jun 6, Jul 7, Aug 8, Sep 9, Nov 1, Nov 11};

%e 152 days need 2 digits: the first is the 2nd day = Jan 2, the last one is the 356th day = Dec 22;

%e 192 days need 3 digits: the first is the 20th day = Jan 20, the last one is the last day of the year = Dec 31;

%e 8 days need 4 digits: {296 .. 302, 364} = Oct 23 through Oct 29, and also the penultimate day of the year = Dec 30.

%o (Haskell)

%o import Data.List (nub)

%o a259143 n = a259143_list !! (n-1)

%o a259143_list = [length $ nub $ show m ++ show d |

%o m <- [1 .. 12], d <- [1 .. a008685 m]]

%Y Cf. A008685.

%K nonn,base,fini,full

%O 1,2

%A _Reinhard Zumkeller_, Jun 19 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)