Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #161709

Re: Losing my mind: results change with/without printf() statements

Subject Re: Losing my mind: results change with/without printf() statements
Newsgroups comp.lang.c
References (1 earlier) <87a6n0c1ux.fsf@bsb.me.uk> <2pmdnZmxQ42VOn79nZ2dnUU7-S_NnZ2d@giganews.com> <c7bfb14a-2084-41c3-beea-438139f73393n@googlegroups.com> <a_CdnUJgh4wOD3n9nZ2dnUU7-XvNnZ2d@giganews.com> <bdc09058-f92c-4084-92c2-5186bfea63bcn@googlegroups.com>
From DFS <nospam@dfs.com>
Message-ID <KA6FI.173$Yv3.34@fx41.iad> (permalink)
Organization blocknews - www.blocknews.net
Date 2021-07-06 20:30 -0400

Show all headers | View raw


On 7/6/2021 7:02 PM, Michael S wrote:


> I have exact results for up to 13 digits.

> Ndigits N-one-childs
> 1 - 10
> 2 - 20
> 3 - 360
> 4 - 2701
> 5 - 4096
> 6 - 109466
> 7 - 161022
> 8 - 13068583
> 9 - 2136960
> 10 - 0
> 11 - 71101800
> 12 - 55121700430
> 13 - 1057516028

> Pay attention, format is slightly different from yours, yours is accumulated, mine is per specific number of digits.


Per the problem description F(10^1) = 9, which means 0 isn't included.

https://projecteuler.net/problem=413


You may have some insights if you look at the numbers like this:

N   Substrings               * = one-child
--- -----------------------  ---------------
81. [8, 81, 1]                *
82. [8, 82, 2]
83. [8, 83, 3]                *
84. [8, 84, 4]
85. [8, 85, 5]                *
86. [8, 86, 6]
87. [8, 87, 7]                *
88. [8, 88, 8]
89. [8, 89, 9]                *
90. [9, 90, 0]
91. [9, 91, 1]
92. [9, 92, 2]
93. [9, 93, 3]
94. [9, 94, 4]
95. [9, 95, 5]
96. [9, 96, 6]
97. [9, 97, 7]
98. [9, 98, 8]
99. [9, 99, 9]
100. [1, 10, 100, 0, 0, 0]
101. [1, 10, 101, 0, 1, 1]     *
102. [1, 10, 102, 0, 2, 2]
103. [1, 10, 103, 0, 3, 3]
104. [1, 10, 104, 0, 4, 4]     *
105. [1, 10, 105, 0, 5, 5]
106. [1, 10, 106, 0, 6, 6]
107. [1, 10, 107, 0, 7, 7]     *
108. [1, 10, 108, 0, 8, 8]
109. [1, 10, 109, 0, 9, 9]
110. [1, 11, 110, 1, 10, 0]    *
111. [1, 11, 111, 1, 11, 1]    *
112. [1, 11, 112, 1, 12, 2]    *
113. [1, 11, 113, 1, 13, 3]    *
114. [1, 11, 114, 1, 14, 4]    *
115. [1, 11, 115, 1, 15, 5]    *
116. [1, 11, 116, 1, 16, 6]    *
117. [1, 11, 117, 1, 17, 7]    *
118. [1, 11, 118, 1, 18, 8]    *
119. [1, 11, 119, 1, 19, 9]    *
120. [1, 12, 120, 2, 20, 0]
121. [1, 12, 121, 2, 21, 1]
122. [1, 12, 122, 2, 22, 2]    *
123. [1, 12, 123, 2, 23, 3]
124. [1, 12, 124, 2, 24, 4]
125. [1, 12, 125, 2, 25, 5]    *
126. [1, 12, 126, 2, 26, 6]
127. [1, 12, 127, 2, 27, 7]
128. [1, 12, 128, 2, 28, 8]    *
129. [1, 12, 129, 2, 29, 9]
130. [1, 13, 130, 3, 30, 0]
131. [1, 13, 131, 3, 31, 1]    *
132. [1, 13, 132, 3, 32, 2]
133. [1, 13, 133, 3, 33, 3]
134. [1, 13, 134, 3, 34, 4]    *
135. [1, 13, 135, 3, 35, 5]
136. [1, 13, 136, 3, 36, 6]
137. [1, 13, 137, 3, 37, 7]    *
138. [1, 13, 138, 3, 38, 8]
139. [1, 13, 139, 3, 39, 9]
140. [1, 14, 140, 4, 40, 0]    *
141. [1, 14, 141, 4, 41, 1]    *
142. [1, 14, 142, 4, 42, 2]    *
143. [1, 14, 143, 4, 43, 3]    *
144. [1, 14, 144, 4, 44, 4]    *
145. [1, 14, 145, 4, 45, 5]    *
146. [1, 14, 146, 4, 46, 6]    *
147. [1, 14, 147, 4, 47, 7]    *
148. [1, 14, 148, 4, 48, 8]    *
149. [1, 14, 149, 4, 49, 9]    *

They definitely follow patterns.

* All 2-digit numbers of even-odd are one-child.

* 3-digit numbers beginning with the same 2 numbers are one-child,
   unless those 2 starting numbers are factors of 3

110. [1, 11, 110, 1, 10, 0]    *
111. [1, 11, 111, 1, 11, 1]    *
112. [1, 11, 112, 1, 12, 2]    *
113. [1, 11, 113, 1, 13, 3]    *
114. [1, 11, 114, 1, 14, 4]    *
115. [1, 11, 115, 1, 15, 5]    *
116. [1, 11, 116, 1, 16, 6]    *
117. [1, 11, 117, 1, 17, 7]    *
118. [1, 11, 118, 1, 18, 8]    *
119. [1, 11, 119, 1, 19, 9]    *

220. [2, 22, 220, 2, 20, 0]    *
221. [2, 22, 221, 2, 21, 1]    *
222. [2, 22, 222, 2, 22, 2]    *
223. [2, 22, 223, 2, 23, 3]    *
224. [2, 22, 224, 2, 24, 4]    *
225. [2, 22, 225, 2, 25, 5]    *
226. [2, 22, 226, 2, 26, 6]    *
227. [2, 22, 227, 2, 27, 7]    *
228. [2, 22, 228, 2, 28, 8]    *
229. [2, 22, 229, 2, 29, 9]    *

330. [3, 33, 330, 3, 30, 0]
331. [3, 33, 331, 3, 31, 1]
332. [3, 33, 332, 3, 32, 2]
333. [3, 33, 333, 3, 33, 3]
334. [3, 33, 334, 3, 34, 4]
335. [3, 33, 335, 3, 35, 5]
336. [3, 33, 336, 3, 36, 6]
337. [3, 33, 337, 3, 37, 7]
338. [3, 33, 338, 3, 38, 8]
339. [3, 33, 339, 3, 39, 9]

440. [4, 44, 440, 4, 40, 0]    *
441. [4, 44, 441, 4, 41, 1]    *
442. [4, 44, 442, 4, 42, 2]    *
443. [4, 44, 443, 4, 43, 3]    *
444. [4, 44, 444, 4, 44, 4]    *
445. [4, 44, 445, 4, 45, 5]    *
446. [4, 44, 446, 4, 46, 6]    *
447. [4, 44, 447, 4, 47, 7]    *
448. [4, 44, 448, 4, 48, 8]    *
449. [4, 44, 449, 4, 49, 9]    *

550. [5, 55, 550, 5, 50, 0]    *
551. [5, 55, 551, 5, 51, 1]    *
552. [5, 55, 552, 5, 52, 2]    *
553. [5, 55, 553, 5, 53, 3]    *
554. [5, 55, 554, 5, 54, 4]    *
555. [5, 55, 555, 5, 55, 5]    *
556. [5, 55, 556, 5, 56, 6]    *
557. [5, 55, 557, 5, 57, 7]    *
558. [5, 55, 558, 5, 58, 8]    *
559. [5, 55, 559, 5, 59, 9]    *

660. [6, 66, 660, 6, 60, 0]
661. [6, 66, 661, 6, 61, 1]
662. [6, 66, 662, 6, 62, 2]
663. [6, 66, 663, 6, 63, 3]
664. [6, 66, 664, 6, 64, 4]
665. [6, 66, 665, 6, 65, 5]
666. [6, 66, 666, 6, 66, 6]
667. [6, 66, 667, 6, 67, 7]
668. [6, 66, 668, 6, 68, 8]
669. [6, 66, 669, 6, 69, 9]

770. [7, 77, 770, 7, 70, 0]    *
771. [7, 77, 771, 7, 71, 1]    *
772. [7, 77, 772, 7, 72, 2]    *
773. [7, 77, 773, 7, 73, 3]    *
774. [7, 77, 774, 7, 74, 4]    *
775. [7, 77, 775, 7, 75, 5]    *
776. [7, 77, 776, 7, 76, 6]    *
777. [7, 77, 777, 7, 77, 7]    *
778. [7, 77, 778, 7, 78, 8]    *
779. [7, 77, 779, 7, 79, 9]    *

etc

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Losing my mind: results change with/without printf() statements DFS <nospam@dfs.com> - 2021-06-30 12:26 -0400
  Re: Losing my mind: results change with/without printf() statements David Brown <david.brown@hesbynett.no> - 2021-06-30 19:03 +0200
    Re: Losing my mind: results change with/without printf() statements DFS <nospam@dfs.com> - 2021-06-30 13:58 -0400
      Re: Losing my mind: results change with/without printf() statements Bart <bc@freeuk.com> - 2021-06-30 19:44 +0100
        Re: Losing my mind: results change with/without printf() statements DFS <nospam@dfs.com> - 2021-06-30 16:16 -0400
          Re: Losing my mind: results change with/without printf() statements Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-07-01 00:03 +0100
            Re: Losing my mind: results change with/without printf() statements DFS <nospam@dfs.com> - 2021-06-30 23:54 -0400
              Re: Losing my mind: results change with/without printf() statements David Brown <david.brown@hesbynett.no> - 2021-07-01 10:56 +0200
              Re: Losing my mind: results change with/without printf() statements Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-07-01 10:38 +0100
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-02 02:49 -0700
                Re: Losing my mind: results change with/without printf() statements Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-07-02 14:44 +0100
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-02 07:48 -0700
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-02 09:25 -0700
                Re: Losing my mind: results change with/without printf() statements Bart <bc@freeuk.com> - 2021-07-02 18:33 +0100
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-04 01:27 -0700
                Re: Losing my mind: results change with/without printf() statements Bart <bc@freeuk.com> - 2021-07-04 15:19 +0100
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-04 09:04 -0700
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-04 09:51 -0700
          Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-02 03:20 -0700
            Re: Losing my mind: results change with/without printf() statements Bart <bc@freeuk.com> - 2021-07-02 11:42 +0100
              Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-02 04:47 -0700
          Re: Losing my mind: results change with/without printf() statements Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-07-02 15:21 +0100
            Re: Losing my mind: results change with/without printf() statements DFS <nospam@dfs.com> - 2021-07-02 11:37 -0400
            Re: Losing my mind: results change with/without printf() statements Bart <bc@freeuk.com> - 2021-07-02 17:06 +0100
            Re: Losing my mind: results change with/without printf() statements Kaz Kylheku <563-365-8930@kylheku.com> - 2021-07-02 17:41 +0000
              Re: Losing my mind: results change with/without printf() statements Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-07-02 19:09 +0100
                Re: Losing my mind: results change with/without printf() statements Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-07-02 19:48 +0100
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-04 03:21 -0700
                Re: Losing my mind: results change with/without printf() statements Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-07-04 14:01 +0100
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-05 02:44 -0700
                Re: Losing my mind: results change with/without printf() statements Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-07-05 14:43 +0100
                Re: Losing my mind: results change with/without printf() statements kegs@provalid.com (Kent Dickey) - 2021-07-05 19:42 -0500
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-06 03:36 -0700
                Re: Losing my mind: results change with/without printf() statements kegs@provalid.com (Kent Dickey) - 2021-07-06 12:27 -0500
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-06 16:02 -0700
                Re: Losing my mind: results change with/without printf() statements DFS <nospam@dfs.com> - 2021-07-06 20:30 -0400
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-08 01:02 -0700
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-09 05:52 -0700
                Re: Losing my mind: results change with/without printf() statements kegs@provalid.com (Kent Dickey) - 2021-07-09 08:24 -0500
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-09 07:20 -0700
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-10 15:27 -0700
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-12 00:56 -0700
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-12 12:01 -0700
                Re: Losing my mind: results change with/without printf() statements Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-07-12 21:30 +0100
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-13 00:33 -0700
                Re: Losing my mind: results change with/without printf() statements Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-07-13 22:58 +0100
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-20 13:38 -0700
                Re: Losing my mind: results change with/without printf() statements DFS <nospam@dfs.com> - 2021-07-09 11:23 -0400
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-09 08:43 -0700
                Re: Losing my mind: results change with/without printf() statements Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2021-07-11 16:40 +0100
                Re: Losing my mind: results change with/without printf() statements Michael S <already5chosen@yahoo.com> - 2021-07-12 02:51 -0700
                Re: Losing my mind: results change with/without printf() statements Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2021-07-12 16:57 +0100
                Re: Losing my mind: results change with/without printf() statements Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2021-07-12 17:25 +0100
                Re: Losing my mind: results change with/without printf() statements Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2021-07-20 18:03 +0100
      Re: Losing my mind: results change with/without printf() statements David Brown <david.brown@hesbynett.no> - 2021-07-01 10:46 +0200
        Re: Losing my mind: results change with/without printf() statements DFS <nospam@dfs.com> - 2021-07-02 11:52 -0400
          Re: Losing my mind: results change with/without printf() statements Bart <bc@freeuk.com> - 2021-07-02 17:16 +0100
            Re: Losing my mind: results change with/without printf() statements DFS <nospam@dfs.com> - 2021-07-02 13:27 -0400
      Re: Losing my mind: results change with/without printf() statements luser droog <luser.droog@gmail.com> - 2021-07-12 16:19 -0700
  Re: Losing my mind: results change with/without printf() statements Barry Schwarz <schwarzb@delq.com> - 2021-06-30 11:36 -0700
    Re: Losing my mind: results change with/without printf() statements DFS <nospam@dfs.com> - 2021-06-30 16:03 -0400
      Re: Losing my mind: results change with/without printf() statements Barry Schwarz <schwarzb@delq.com> - 2021-06-30 13:22 -0700
      Re: Losing my mind: results change with/without printf() statements David Brown <david.brown@hesbynett.no> - 2021-07-01 11:03 +0200
  Re: Losing my mind: results change with/without printf() statements Rosario19 <Ros@invalid.invalid> - 2021-07-01 10:49 +0200

csiph-web