Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7083679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:12:28+00:00 2026-05-28T07:12:28+00:00

Sum of each digits in a number is defined by 1 + ((i –

  • 0

Sum of each digits in a number is defined by

1 + ((i - 1) % 9) where i is the number

Is there a formula for getting sum of the squares of its digits.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:12:28+00:00Added an answer on May 28, 2026 at 7:12 am

    The formula you give is actually for a repeated sum of digits, in the sense of 384 -> 3 + 8 + 4 = 15 -> 1 + 5 = 6. This sum features in the “casting out nines” method of checking arithmetic by reducing a number to its value modulo 9. See for example the book “Mathematics Made Difficult” or this classic Square One skit:

    http://www.youtube.com/watch?v=Q53GmMCqmAM

    The only reason that modulus provide closed-form equivalent to repeated sum of digits is that 9 is one less than 10 and so 10, 100, 1000, etc. are all equal to 1 modulo 9. For more typical operations on the digits of a number, you actually have to iterate through the digits one by one:

    for( ; number > 0; number /= 10) {
       int digit = number % 10;
       // do something with digit
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We can easily compute the sum of digits of a given number but is
I came across this question.A number is called lucky if the sum of its
Am trying to return the sum of each day of a week in mysql
Simple sum of digits code. It compiles but when executed, the last cout gives
To sum it up, there are two basic trains of thought: The private field
I want function to take the last digit of each number in the list
I have the following select statement where I need to sum each task from
I want to sum up each row and column in matrix and check whether
Problem: Find the sum of the values in 'subtotal' for each 'id' and store
Here is my SQL statement: SELECT [Item], SUM([Quantity]) AS SumOfQuantity, SUM([Price Each]) AS SumOfTotal,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.