Talk:Steady squares: Difference between revisions

→‎Reduce search range by observation of the results: Added syntaxhighlight tag on pascal code snippet.
(→‎Reduce search range by observation of the results: Added syntaxhighlight tag on pascal code snippet.)
 
(7 intermediate revisions by 5 users not shown)
Line 4:
And there comes the solution:By prepending a digit to n, than n*n must end in n to be a steady square.<BR>
So only solutions of one digit before can be solutions.
<langsyntaxhighlight lang="pascal">
function CalcSquare(n:LongInt;Pot10:byte);
//pot10 is 10^(count of digits of n -1)
Line 20:
// so n*n must end in n, to be a steady square
end;
</syntaxhighlight>
</lang>
 
:Note also that it must end in 1,5 or 6 (not 0 as any number ending in 0 squared ends with twice as many zeros).--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:46, 21 December 2021 (UTC)
Line 77:
Starting with g<sub>0</sub>=5 I let g=0 and n=g<sub>0</sub>*g<sub>0</sub>/10=2.
Looking up 2 in the table g<sub>1</sub>=2. I let n=(n+g+2*g<sub>1</sub>*g<sub>0</sub>)/10=2, g=g<sub>1</sub>*g<sub>1</sub>=4.
Looking up 6 in the table g<sub>2</sub>=6. I let n=(n+g+2*g<sub>2</sub>*g<sub>0</sub>)/10=26, g=g<sub>2</sub>*g<sub>1</sub>+g<sub>1</sub>*g<sub>2</sub>=24.
Looking up 0 in the table g<sub>3</sub>=0. I let n=(n+g+2*g<sub>3</sub>*g<sub>0</sub>)/10=3, g=g<sub>3</sub>*g<sub>1</sub>+g<sub>2</sub>*g<sub>2</sub>+g<sub>1</sub>*g<sub>3</sub>=36.
Looking up 9 in the table g<sub>4</sub>=9. I let n=(n+g+2*g<sub>4</sub>*g<sub>0</sub>)/10=12, g=g<sub>4</sub>*g<sub>1</sub>+g<sub>3</sub>*g<sub>2</sub>+g<sub>2</sub>*g<sub>3</sub>+g<sub>1</sub>*g<sub>4</sub>=36.
Line 84:
The existence of this table and method proves that these two sequences are infinite and unique.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 19:30, 26 December 2021 (UTC)
 
:Agreed and well done''!. I haven't' foundPhix timeentry to check/implement any of this yet though. Being petty for a mo, I think there is a typo at the start of line 2 in the second paragraph: 2+24 -> looking up 0added. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 1715:0417, 2931 December 2021 (UTC)
 
==RC's First Interesting Fact for 2022==
 
With the exception of g0 where 5 -> 6 if you tell me the nth digit in the 5 sequence, I can tell you the nth digit in the 6 sequence using the following mapping:
 
0 -> 9
1 -> 8
2 -> 7
3 -> 6
4 -> 5
5 -> 4
6 -> 3
7 -> 2
8 -> 1
9 -> 0
--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 16:11, 3 January 2022 (UTC)
: Yes, the n.th digits sum up to 9 in [[Steady_Squares#Some_Examples]] for 80 digits without the last digit --[[User:Horst.h|Horst.h]] ([[User talk:Horst.h|talk]]) 16:41, 3 January 2022 (UTC)
<br>
: For each digit of the 5-series and 6-series (for the same number of digits), the first through the next-to-last digits (when present) sum up to 9, the final (ones) digit sums to 11.
: Also,
: for single digit, (10^1): 5 + 6 = 11
: for double digits, (10^2): 25 + 76 = 101
: for triple digits, (10^3): 625 + 376 = 1001
: ...pattern continues...
: So the 6-series (for any number of digits) can be obtained by subtracting the 5 series result (for that number of digits) from 10^(number of digits), then adding 1.
: For four digits (and a few others) the leading digit of the 5-series is a zero, so the 6-series result is 10001 - 0625 = 9376.
: When the first digit of the 5-series result is 9 (such as 90625), the corresponding 6-series result is a repeat of the previous number of digits (such as 9376), since the leading digit of the 6-series is zero.
--[[User:Enter your username|Enter your username]] ([[User talk:Enter your username|talk]]) 05:39, 5 January 2022 (UTC)