SlideShare a Scribd company logo
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

2001_Book_HumanChromosomes - Genéticapdf
2001_Book_HumanChromosomes - Genéticapdf2001_Book_HumanChromosomes - Genéticapdf
2001_Book_HumanChromosomes - Genéticapdf
lucianamillenium
 
Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...
Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...
Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...
Sérgio Sacani
 
fermented food science of sauerkraut.pptx
fermented food science of sauerkraut.pptxfermented food science of sauerkraut.pptx
fermented food science of sauerkraut.pptx
ananya23nair
 
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Leonel Morgado
 
Male reproduction physiology by Suyash Garg .pptx
Male reproduction physiology by Suyash Garg .pptxMale reproduction physiology by Suyash Garg .pptx
Male reproduction physiology by Suyash Garg .pptx
suyashempire
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
University of Maribor
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
Carl Bergstrom
 
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
Scintica Instrumentation
 
Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
Vandana Devesh Sharma
 
BIRDS DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptx
BIRDS  DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptxBIRDS  DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptx
BIRDS DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptx
goluk9330
 
Physiology of Nervous System presentation.pptx
Physiology of Nervous System presentation.pptxPhysiology of Nervous System presentation.pptx
Physiology of Nervous System presentation.pptx
fatima132662
 
Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...
Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...
Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...
Creative-Biolabs
 
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdfMending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Selcen Ozturkcan
 
Methods of grain storage Structures in India.pdf
Methods of grain storage Structures in India.pdfMethods of grain storage Structures in India.pdf
Methods of grain storage Structures in India.pdf
PirithiRaju
 
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
hozt8xgk
 
AJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR NIET GreNo Guava Project File.pdfAJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR
 
Direct Seeded Rice - Climate Smart Agriculture
Direct Seeded Rice - Climate Smart AgricultureDirect Seeded Rice - Climate Smart Agriculture
Direct Seeded Rice - Climate Smart Agriculture
International Food Policy Research Institute- South Asia Office
 
SDSS1335+0728: The awakening of a ∼ 106M⊙ black hole⋆
SDSS1335+0728: The awakening of a ∼ 106M⊙ black hole⋆SDSS1335+0728: The awakening of a ∼ 106M⊙ black hole⋆
SDSS1335+0728: The awakening of a ∼ 106M⊙ black hole⋆
Sérgio Sacani
 
Farming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptxFarming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptx
Frédéric Baudron
 
gastroretentive drug delivery system-PPT.pptx
gastroretentive drug delivery system-PPT.pptxgastroretentive drug delivery system-PPT.pptx
gastroretentive drug delivery system-PPT.pptx
Shekar Boddu
 

Recently uploaded (20)

2001_Book_HumanChromosomes - Genéticapdf
2001_Book_HumanChromosomes - Genéticapdf2001_Book_HumanChromosomes - Genéticapdf
2001_Book_HumanChromosomes - Genéticapdf
 
Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...
Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...
Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...
 
fermented food science of sauerkraut.pptx
fermented food science of sauerkraut.pptxfermented food science of sauerkraut.pptx
fermented food science of sauerkraut.pptx
 
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
 
Male reproduction physiology by Suyash Garg .pptx
Male reproduction physiology by Suyash Garg .pptxMale reproduction physiology by Suyash Garg .pptx
Male reproduction physiology by Suyash Garg .pptx
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
 
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
 
Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
 
BIRDS DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptx
BIRDS  DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptxBIRDS  DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptx
BIRDS DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptx
 
Physiology of Nervous System presentation.pptx
Physiology of Nervous System presentation.pptxPhysiology of Nervous System presentation.pptx
Physiology of Nervous System presentation.pptx
 
Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...
Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...
Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...
 
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdfMending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
 
Methods of grain storage Structures in India.pdf
Methods of grain storage Structures in India.pdfMethods of grain storage Structures in India.pdf
Methods of grain storage Structures in India.pdf
 
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
 
AJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR NIET GreNo Guava Project File.pdfAJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR NIET GreNo Guava Project File.pdf
 
Direct Seeded Rice - Climate Smart Agriculture
Direct Seeded Rice - Climate Smart AgricultureDirect Seeded Rice - Climate Smart Agriculture
Direct Seeded Rice - Climate Smart Agriculture
 
SDSS1335+0728: The awakening of a ∼ 106M⊙ black hole⋆
SDSS1335+0728: The awakening of a ∼ 106M⊙ black hole⋆SDSS1335+0728: The awakening of a ∼ 106M⊙ black hole⋆
SDSS1335+0728: The awakening of a ∼ 106M⊙ black hole⋆
 
Farming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptxFarming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptx
 
gastroretentive drug delivery system-PPT.pptx
gastroretentive drug delivery system-PPT.pptxgastroretentive drug delivery system-PPT.pptx
gastroretentive drug delivery system-PPT.pptx
 

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 Hubspot
Marius 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 ChatGPT
Expeed 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 Engineerings
Pixeldarts
 
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
ThinkNow
 
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
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
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
Neil 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 2024
Albert 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 Insights
Kurio // 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 2024
Search 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 summary
SpeakerHub
 
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 Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit 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 management
MindGenius
 
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 !