SlideShare a Scribd company logo
1 of 28
Math problem related to 
multiples, digits and three 
How many Nabeatsu numbers are 
there between 1 and 푁?
Before the definition of Nabeatsu 
numbers… 
Definition: 
Let 푛 be a positive integer. Let’s call 풏 contains 
digit 3 if and only if there exists a digit of 푛 
that is 3. 
Let 푎푛 be the 푛-th number that contains 3.
Examples 1 
The number 푎1 = 3 contains digit 3. 
The number 푎2 = 13 contains digit 3. 
푎3 = 23. 
푎4 = 30. 
푎5 = 31. 
푎6 = 32. 
푎7 = 33. 
… 
푎13 = 39.
Examples 2 
푎14 = 43. 
푎15 = 53. 
푎16 = 63. 
… 
푎22 = 123. 
푎23 = 130. 
푎24 = 131. 
… 
푎32 = 139. 
푎33 = 143.
What are Nabeatsu numbers? 
Definition(Nabeatsu numbers): 
A positive integer 푛 is a Nabeatsu number if 
and only if 푛 is a multiple of three or 푛 
contains digit 3. 
This definition is at my discretion. 
Sekai no Nabeatsu was a Japanese comedian. 
I defined it associated with him.
Examples 
• 45 is a Nabeatsu number. (It is a multiple of 
three. ) 
• 1399 is a Nabeatsu number. (It is not a 
multiple of three, but it contains digit 3. ) 
• 333 is a Nabeatsu number. 
• 256 is not a Nabeatsu number.
Question 
How many Nabeatsu numbers are there 
between 1 and 푁? 
Let 퐴(푁) be the answer of the question.
For example, there are 퐴 40 = 21 Nabeatsu 
numbers between 1 and 40. 
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 
31, 32, 33, 34, 35, 36, 37, 38, 39, 40. 
Is there any efficient algorithm to calculate the 
퐴(푁)?
Approach to solve the problem 
• Assume that there are 푥 multiples of three 
between 1 and 푁. 
• Assume that there are 푦 numbers that 
contain digits 3 between 1 and 푁. 
• Assume that there are 푧 multiples of three 
that also contain digits 3 between 1 and 푁. 
The answer of the problem is 퐴 푁 = 푥 + 푦 − 푧. 
Let’s calculate 푥, 푦 and 푧.
Calculate 푥! 
There are 
푥 = 
푁 
3 
(floor function) 
multiples of three between 1 and 푁.
Calculate 푦! 
How many numbers containing digit 3 are 
there between 1 and 푁? 
Assume that there are 푦 numbers that don’t 
contain digit 3 between 1 and 푁. 
It holds that 푦 = 푁 − 푦 , so we will calculate 푦 
at first. 
I will show you the way of calculating 푦 .
For example, let 푁 = 25383. 
Then, what is the value of 푦 ? 
How many numbers that do not contain 
digit 3 in {00001, 00002, … , 25389} ? 
Numbers’ form: 0**** or 1**** 
Each digit * is 0, 1, 2, 4, 5, 6, 7, 8 or 9. But 00000 
is not considered. Thus, there are 
2 × 94 − 1 
numbers in this form.
Numbers’ form: 
20*** or 21*** or 22*** or 24*** 
There are 
(5 − 1) × 93 
numbers in this form. 
Since 5 > 3, the term −1 arised.
Numbers’ form: 
250** or 251** or 252** 
There are 
3 × 92 
numbers in this form.
Thus, if 푁 = 25383, 
푦 = 2 × 94 + (5 − 1) × 93 + 3 × 92 − 1.
In the same way, if 푁 = 260734397, then 
푦 = 2 × 98 + 6 − 1 × 97 + 0 × 96 
+ 7 − 1 × 95 + 3 × 94 − 1. 
If 푁 = 51048, then 
푦 = (5 − 1) × 94 + 1 × 93 + 0 × 92 
+ 4 − 1 × 91 + 8 × 90.
If the value of 푦 become clear, we can calculate 
the value of 푦 = 푁 − 푦 .
Calculate 푧! 
Claim: 
푎푛+1 = 푎푛 + 1 or 4 or 7 or 10 . 
Proof: 
Case 1-1: 푎푛 =∗∗ ⋯ ∗ 3, each digit ∗ is not 3 and 
the end of 푎푛 is neither 299 ⋯ 93 nor 23. 
It holds that 푎푛+1 = 푎푛 + 10. 
(For example, if 푎푛 = 1283, then 푎푛+1 = 1293 = 
푎푛 + 10.)
Case 1-2: 푎푛 =∗∗ ⋯ ∗ 3, each digit ∗ is not 3 
and the end of 푎푛 is 299 ⋯ 93 or 23. 
It holds that 푎푛+1 = 푎푛 + 7. 
(For example, if 푎푛 = 1293, then 푎푛+1 = 
1300 = 푎푛 + 7.)
Case 2-1: 푎푛 =∗∗ ⋯ ∗ 3@@ ⋯ @ or 3@@ ⋯ @, 
each digit ∗ is not 3 and at least one digit @ is 
not 9. 
It holds that 푎푛+1 = 푎푛 + 1. 
(For example, if 푎푛 = 13998, then 푎푛+1 = 
13999 = 푎푛 + 1.)
Case 2-2: 푎푛 =∗∗ ⋯ ∗ 399 ⋯ 9 or 399 ⋯ 9 , and 
each digit ∗ is not 3. 
It holds that 푎푛+1 = 푎푛 + 4. 
(For example, if 푎푛 = 13999, then 푎푛+1 = 
14003 = 푎푛 + 4.)
Thus, it holds that 
푎푛+1 = 푎푛 + 1 or 4 or 7 or 10 . ∎ 
Thus, it holds that 
푎푛+1 ≡ 푎푛 + 1 (mod 3). 
Since 푎1 = 3 is a multiple of three, 
푎3푛+1 is a multiple of three for 푛 ≥ 0.
Thus, it holds that 
푧 = 
푦 + 2 
3 
. 
Buy the way, it holds that 
푦 − 푧 = 
2 
3 
푦 . 
(Hint: If 푦 = 3푘 + 1, then 푦 − 푧 =? ? ?. If 푦 = 3푘 + 2, 
then 푦 − 푧 =? ? ?. If 푦 = 3푘 + 1, then 푦 − 푧 =? ? ?.)
Answer 
There are 
퐴 푁 = 푥 + 푦 − 푧 = 
푁 
3 
+ 
2 
3 
푦 
Nabeatsu numbers between 1 and 푁. 
I think it is also interesting to make a program 
that calculate 퐴 푁 . 
I will show you three examples.
Example 1 
• 푁 = 2014 
푦 = 2 × 93 + 0 × 92 + 1 × 91 + 4 − 1 × 90 
= 1470. 
푦 = 푁 − 푦 = 544 . 
퐴 2014 = 
2014 
3 
+ 
2 
3 
× 544 = 1033.
Example 2 
• 푁 = 10푛 (푛 ≥ 1) 
푦 = 9푛. 
푦 = 10푛 − 9푛 . 
퐴 10푛 = 
10푛 
3 
+ 
2 
3 
× 10푛 − 9푛 
= 
10푛 − 1 
3 
+ 
2 × (10푛 − 1) 
3 
− 6 × 9푛−1 
= 10푛 − 6 × 9푛−1 − 1.
Example 3 
• 푁 = 25389 
푦 = 2 × 94 + 5 − 1 × 93 + 3 × 92 − 1 
= 16280. 
푦 = 푁 − 푦 = 9109. 
퐴 25389 = 
25389 
3 
+ 
2 
3 
× 9109 = 14535.
Thank you for watching !

More Related Content

Recently uploaded

TEST BANK for Organic Chemistry 6th Edition.pdf
TEST BANK for Organic Chemistry 6th Edition.pdfTEST BANK for Organic Chemistry 6th Edition.pdf
TEST BANK for Organic Chemistry 6th Edition.pdfmarcuskenyatta275
 
Information science research with large language models: between science and ...
Information science research with large language models: between science and ...Information science research with large language models: between science and ...
Information science research with large language models: between science and ...Fabiano Dalpiaz
 
In-pond Race way systems for Aquaculture (IPRS).pptx
In-pond Race way systems for Aquaculture (IPRS).pptxIn-pond Race way systems for Aquaculture (IPRS).pptx
In-pond Race way systems for Aquaculture (IPRS).pptxMAGOTI ERNEST
 
Film Coated Tablet and Film Coating raw materials.pdf
Film Coated Tablet and Film Coating raw materials.pdfFilm Coated Tablet and Film Coating raw materials.pdf
Film Coated Tablet and Film Coating raw materials.pdfPharmatech-rx
 
Harry Coumnas Thinks That Human Teleportation is Possible in Quantum Mechanic...
Harry Coumnas Thinks That Human Teleportation is Possible in Quantum Mechanic...Harry Coumnas Thinks That Human Teleportation is Possible in Quantum Mechanic...
Harry Coumnas Thinks That Human Teleportation is Possible in Quantum Mechanic...kevin8smith
 
NuGOweek 2024 programme final FLYER short.pdf
NuGOweek 2024 programme final FLYER short.pdfNuGOweek 2024 programme final FLYER short.pdf
NuGOweek 2024 programme final FLYER short.pdfpablovgd
 
EU START PROJECT. START-Newsletter_Issue_4.pdf
EU START PROJECT. START-Newsletter_Issue_4.pdfEU START PROJECT. START-Newsletter_Issue_4.pdf
EU START PROJECT. START-Newsletter_Issue_4.pdfStart Project
 
Soil and Water Conservation Engineering (SWCE) is a specialized field of stud...
Soil and Water Conservation Engineering (SWCE) is a specialized field of stud...Soil and Water Conservation Engineering (SWCE) is a specialized field of stud...
Soil and Water Conservation Engineering (SWCE) is a specialized field of stud...yogeshlabana357357
 
Manganese‐RichSandstonesasanIndicatorofAncientOxic LakeWaterConditionsinGale...
Manganese‐RichSandstonesasanIndicatorofAncientOxic  LakeWaterConditionsinGale...Manganese‐RichSandstonesasanIndicatorofAncientOxic  LakeWaterConditionsinGale...
Manganese‐RichSandstonesasanIndicatorofAncientOxic LakeWaterConditionsinGale...Sérgio Sacani
 
RACEMIzATION AND ISOMERISATION completed.pptx
RACEMIzATION AND ISOMERISATION completed.pptxRACEMIzATION AND ISOMERISATION completed.pptx
RACEMIzATION AND ISOMERISATION completed.pptxArunLakshmiMeenakshi
 
MODERN PHYSICS_REPORTING_QUANTA_.....pdf
MODERN PHYSICS_REPORTING_QUANTA_.....pdfMODERN PHYSICS_REPORTING_QUANTA_.....pdf
MODERN PHYSICS_REPORTING_QUANTA_.....pdfRevenJadePalma
 
Heads-Up Multitasker: CHI 2024 Presentation.pdf
Heads-Up Multitasker: CHI 2024 Presentation.pdfHeads-Up Multitasker: CHI 2024 Presentation.pdf
Heads-Up Multitasker: CHI 2024 Presentation.pdfbyp19971001
 
Quantifying Artificial Intelligence and What Comes Next!
Quantifying Artificial Intelligence and What Comes Next!Quantifying Artificial Intelligence and What Comes Next!
Quantifying Artificial Intelligence and What Comes Next!University of Hertfordshire
 
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptx
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptxPlasmapheresis - Dr. E. Muralinath - Kalyan . C.pptx
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptxmuralinath2
 
ERTHROPOIESIS: Dr. E. Muralinath & R. Gnana Lahari
ERTHROPOIESIS: Dr. E. Muralinath & R. Gnana LahariERTHROPOIESIS: Dr. E. Muralinath & R. Gnana Lahari
ERTHROPOIESIS: Dr. E. Muralinath & R. Gnana Laharimuralinath2
 
Isolation of AMF by wet sieving and decantation method pptx
Isolation of AMF by wet sieving and decantation method pptxIsolation of AMF by wet sieving and decantation method pptx
Isolation of AMF by wet sieving and decantation method pptxGOWTHAMIM22
 
Factor Causing low production and physiology of mamary Gland
Factor Causing low production and physiology of mamary GlandFactor Causing low production and physiology of mamary Gland
Factor Causing low production and physiology of mamary GlandRcvets
 
Biochemistry and Biomolecules - Science - 9th Grade by Slidesgo.pptx
Biochemistry and Biomolecules - Science - 9th Grade by Slidesgo.pptxBiochemistry and Biomolecules - Science - 9th Grade by Slidesgo.pptx
Biochemistry and Biomolecules - Science - 9th Grade by Slidesgo.pptxjayabahari688
 
WASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 Rp
WASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 RpWASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 Rp
WASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 RpSérgio Sacani
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
 

Recently uploaded (20)

TEST BANK for Organic Chemistry 6th Edition.pdf
TEST BANK for Organic Chemistry 6th Edition.pdfTEST BANK for Organic Chemistry 6th Edition.pdf
TEST BANK for Organic Chemistry 6th Edition.pdf
 
Information science research with large language models: between science and ...
Information science research with large language models: between science and ...Information science research with large language models: between science and ...
Information science research with large language models: between science and ...
 
In-pond Race way systems for Aquaculture (IPRS).pptx
In-pond Race way systems for Aquaculture (IPRS).pptxIn-pond Race way systems for Aquaculture (IPRS).pptx
In-pond Race way systems for Aquaculture (IPRS).pptx
 
Film Coated Tablet and Film Coating raw materials.pdf
Film Coated Tablet and Film Coating raw materials.pdfFilm Coated Tablet and Film Coating raw materials.pdf
Film Coated Tablet and Film Coating raw materials.pdf
 
Harry Coumnas Thinks That Human Teleportation is Possible in Quantum Mechanic...
Harry Coumnas Thinks That Human Teleportation is Possible in Quantum Mechanic...Harry Coumnas Thinks That Human Teleportation is Possible in Quantum Mechanic...
Harry Coumnas Thinks That Human Teleportation is Possible in Quantum Mechanic...
 
NuGOweek 2024 programme final FLYER short.pdf
NuGOweek 2024 programme final FLYER short.pdfNuGOweek 2024 programme final FLYER short.pdf
NuGOweek 2024 programme final FLYER short.pdf
 
EU START PROJECT. START-Newsletter_Issue_4.pdf
EU START PROJECT. START-Newsletter_Issue_4.pdfEU START PROJECT. START-Newsletter_Issue_4.pdf
EU START PROJECT. START-Newsletter_Issue_4.pdf
 
Soil and Water Conservation Engineering (SWCE) is a specialized field of stud...
Soil and Water Conservation Engineering (SWCE) is a specialized field of stud...Soil and Water Conservation Engineering (SWCE) is a specialized field of stud...
Soil and Water Conservation Engineering (SWCE) is a specialized field of stud...
 
Manganese‐RichSandstonesasanIndicatorofAncientOxic LakeWaterConditionsinGale...
Manganese‐RichSandstonesasanIndicatorofAncientOxic  LakeWaterConditionsinGale...Manganese‐RichSandstonesasanIndicatorofAncientOxic  LakeWaterConditionsinGale...
Manganese‐RichSandstonesasanIndicatorofAncientOxic LakeWaterConditionsinGale...
 
RACEMIzATION AND ISOMERISATION completed.pptx
RACEMIzATION AND ISOMERISATION completed.pptxRACEMIzATION AND ISOMERISATION completed.pptx
RACEMIzATION AND ISOMERISATION completed.pptx
 
MODERN PHYSICS_REPORTING_QUANTA_.....pdf
MODERN PHYSICS_REPORTING_QUANTA_.....pdfMODERN PHYSICS_REPORTING_QUANTA_.....pdf
MODERN PHYSICS_REPORTING_QUANTA_.....pdf
 
Heads-Up Multitasker: CHI 2024 Presentation.pdf
Heads-Up Multitasker: CHI 2024 Presentation.pdfHeads-Up Multitasker: CHI 2024 Presentation.pdf
Heads-Up Multitasker: CHI 2024 Presentation.pdf
 
Quantifying Artificial Intelligence and What Comes Next!
Quantifying Artificial Intelligence and What Comes Next!Quantifying Artificial Intelligence and What Comes Next!
Quantifying Artificial Intelligence and What Comes Next!
 
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptx
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptxPlasmapheresis - Dr. E. Muralinath - Kalyan . C.pptx
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptx
 
ERTHROPOIESIS: Dr. E. Muralinath & R. Gnana Lahari
ERTHROPOIESIS: Dr. E. Muralinath & R. Gnana LahariERTHROPOIESIS: Dr. E. Muralinath & R. Gnana Lahari
ERTHROPOIESIS: Dr. E. Muralinath & R. Gnana Lahari
 
Isolation of AMF by wet sieving and decantation method pptx
Isolation of AMF by wet sieving and decantation method pptxIsolation of AMF by wet sieving and decantation method pptx
Isolation of AMF by wet sieving and decantation method pptx
 
Factor Causing low production and physiology of mamary Gland
Factor Causing low production and physiology of mamary GlandFactor Causing low production and physiology of mamary Gland
Factor Causing low production and physiology of mamary Gland
 
Biochemistry and Biomolecules - Science - 9th Grade by Slidesgo.pptx
Biochemistry and Biomolecules - Science - 9th Grade by Slidesgo.pptxBiochemistry and Biomolecules - Science - 9th Grade by Slidesgo.pptx
Biochemistry and Biomolecules - Science - 9th Grade by Slidesgo.pptx
 
WASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 Rp
WASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 RpWASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 Rp
WASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 Rp
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Math problem related to multiples, digits and three

  • 1. Math problem related to multiples, digits and three How many Nabeatsu numbers are there between 1 and 푁?
  • 2. Before the definition of Nabeatsu numbers… Definition: Let 푛 be a positive integer. Let’s call 풏 contains digit 3 if and only if there exists a digit of 푛 that is 3. Let 푎푛 be the 푛-th number that contains 3.
  • 3. Examples 1 The number 푎1 = 3 contains digit 3. The number 푎2 = 13 contains digit 3. 푎3 = 23. 푎4 = 30. 푎5 = 31. 푎6 = 32. 푎7 = 33. … 푎13 = 39.
  • 4. Examples 2 푎14 = 43. 푎15 = 53. 푎16 = 63. … 푎22 = 123. 푎23 = 130. 푎24 = 131. … 푎32 = 139. 푎33 = 143.
  • 5. What are Nabeatsu numbers? Definition(Nabeatsu numbers): A positive integer 푛 is a Nabeatsu number if and only if 푛 is a multiple of three or 푛 contains digit 3. This definition is at my discretion. Sekai no Nabeatsu was a Japanese comedian. I defined it associated with him.
  • 6. Examples • 45 is a Nabeatsu number. (It is a multiple of three. ) • 1399 is a Nabeatsu number. (It is not a multiple of three, but it contains digit 3. ) • 333 is a Nabeatsu number. • 256 is not a Nabeatsu number.
  • 7. Question How many Nabeatsu numbers are there between 1 and 푁? Let 퐴(푁) be the answer of the question.
  • 8. For example, there are 퐴 40 = 21 Nabeatsu numbers between 1 and 40. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40. Is there any efficient algorithm to calculate the 퐴(푁)?
  • 9. Approach to solve the problem • Assume that there are 푥 multiples of three between 1 and 푁. • Assume that there are 푦 numbers that contain digits 3 between 1 and 푁. • Assume that there are 푧 multiples of three that also contain digits 3 between 1 and 푁. The answer of the problem is 퐴 푁 = 푥 + 푦 − 푧. Let’s calculate 푥, 푦 and 푧.
  • 10. Calculate 푥! There are 푥 = 푁 3 (floor function) multiples of three between 1 and 푁.
  • 11. Calculate 푦! How many numbers containing digit 3 are there between 1 and 푁? Assume that there are 푦 numbers that don’t contain digit 3 between 1 and 푁. It holds that 푦 = 푁 − 푦 , so we will calculate 푦 at first. I will show you the way of calculating 푦 .
  • 12. For example, let 푁 = 25383. Then, what is the value of 푦 ? How many numbers that do not contain digit 3 in {00001, 00002, … , 25389} ? Numbers’ form: 0**** or 1**** Each digit * is 0, 1, 2, 4, 5, 6, 7, 8 or 9. But 00000 is not considered. Thus, there are 2 × 94 − 1 numbers in this form.
  • 13. Numbers’ form: 20*** or 21*** or 22*** or 24*** There are (5 − 1) × 93 numbers in this form. Since 5 > 3, the term −1 arised.
  • 14. Numbers’ form: 250** or 251** or 252** There are 3 × 92 numbers in this form.
  • 15. Thus, if 푁 = 25383, 푦 = 2 × 94 + (5 − 1) × 93 + 3 × 92 − 1.
  • 16. In the same way, if 푁 = 260734397, then 푦 = 2 × 98 + 6 − 1 × 97 + 0 × 96 + 7 − 1 × 95 + 3 × 94 − 1. If 푁 = 51048, then 푦 = (5 − 1) × 94 + 1 × 93 + 0 × 92 + 4 − 1 × 91 + 8 × 90.
  • 17. If the value of 푦 become clear, we can calculate the value of 푦 = 푁 − 푦 .
  • 18. Calculate 푧! Claim: 푎푛+1 = 푎푛 + 1 or 4 or 7 or 10 . Proof: Case 1-1: 푎푛 =∗∗ ⋯ ∗ 3, each digit ∗ is not 3 and the end of 푎푛 is neither 299 ⋯ 93 nor 23. It holds that 푎푛+1 = 푎푛 + 10. (For example, if 푎푛 = 1283, then 푎푛+1 = 1293 = 푎푛 + 10.)
  • 19. Case 1-2: 푎푛 =∗∗ ⋯ ∗ 3, each digit ∗ is not 3 and the end of 푎푛 is 299 ⋯ 93 or 23. It holds that 푎푛+1 = 푎푛 + 7. (For example, if 푎푛 = 1293, then 푎푛+1 = 1300 = 푎푛 + 7.)
  • 20. Case 2-1: 푎푛 =∗∗ ⋯ ∗ 3@@ ⋯ @ or 3@@ ⋯ @, each digit ∗ is not 3 and at least one digit @ is not 9. It holds that 푎푛+1 = 푎푛 + 1. (For example, if 푎푛 = 13998, then 푎푛+1 = 13999 = 푎푛 + 1.)
  • 21. Case 2-2: 푎푛 =∗∗ ⋯ ∗ 399 ⋯ 9 or 399 ⋯ 9 , and each digit ∗ is not 3. It holds that 푎푛+1 = 푎푛 + 4. (For example, if 푎푛 = 13999, then 푎푛+1 = 14003 = 푎푛 + 4.)
  • 22. Thus, it holds that 푎푛+1 = 푎푛 + 1 or 4 or 7 or 10 . ∎ Thus, it holds that 푎푛+1 ≡ 푎푛 + 1 (mod 3). Since 푎1 = 3 is a multiple of three, 푎3푛+1 is a multiple of three for 푛 ≥ 0.
  • 23. Thus, it holds that 푧 = 푦 + 2 3 . Buy the way, it holds that 푦 − 푧 = 2 3 푦 . (Hint: If 푦 = 3푘 + 1, then 푦 − 푧 =? ? ?. If 푦 = 3푘 + 2, then 푦 − 푧 =? ? ?. If 푦 = 3푘 + 1, then 푦 − 푧 =? ? ?.)
  • 24. Answer There are 퐴 푁 = 푥 + 푦 − 푧 = 푁 3 + 2 3 푦 Nabeatsu numbers between 1 and 푁. I think it is also interesting to make a program that calculate 퐴 푁 . I will show you three examples.
  • 25. Example 1 • 푁 = 2014 푦 = 2 × 93 + 0 × 92 + 1 × 91 + 4 − 1 × 90 = 1470. 푦 = 푁 − 푦 = 544 . 퐴 2014 = 2014 3 + 2 3 × 544 = 1033.
  • 26. Example 2 • 푁 = 10푛 (푛 ≥ 1) 푦 = 9푛. 푦 = 10푛 − 9푛 . 퐴 10푛 = 10푛 3 + 2 3 × 10푛 − 9푛 = 10푛 − 1 3 + 2 × (10푛 − 1) 3 − 6 × 9푛−1 = 10푛 − 6 × 9푛−1 − 1.
  • 27. Example 3 • 푁 = 25389 푦 = 2 × 94 + 5 − 1 × 93 + 3 × 92 − 1 = 16280. 푦 = 푁 − 푦 = 9109. 퐴 25389 = 25389 3 + 2 3 × 9109 = 14535.
  • 28. Thank you for watching !