An Erdős–Nicolas number is a positive integer which is not perfect but is equal to the sum of its first k divisors (arranged in ascending order and including one) for some value of k greater than one.
Examples24 is an Erdős–Nicolas number because the sum of its first 6 divisors (1, 2, 3, 4, 6 and 8) is equal to 24 and it is not perfect because 12 is also a divisor.
6 is not an Erdős–Nicolas number because it is perfect (1 + 2 + 3 = 6).
48 is not an Erdős–Nicolas number because its divisors are: 1, 2, 3, 4, 6, 8, 12, 16, 24 and 48. The first seven of these add up to 36, but the first eight add up to 52 which is more than 48.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------the articles is by CalmoSoft
Hello Mahmoud et All.
Sorry, but the Quora website is paid, so not everyone can see it. The text quoted from the Quora website can be found between >>>,<<< signs in my previous post.
Greetings,
Gal Zsolt
CalmoSoft
Given the string: "abracadabra", replace programatically:
the first 'a' with 'A'
the second 'a' with 'B'
the fourth 'a' with 'C'
the fifth 'a' with 'D'
the first 'b' with 'E'
the second 'r' with 'F'
The answer should, of course, be : "AErBcadCbFD".
It is even possible to write that same English statement, without any change, in a Naturally() function and Softanza will understand it and run it.
--
---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ring-lang/cdbbc9fe-11f3-4742-b428-e4b29b2294ben%40googlegroups.com.
Q("abracadabra") {
ReplaceMany([
[ 1, 'a', :with = 'A' ],
[ 2, 'a', :with = 'B' ],
[ 4, 'a', :with = 'C' ],
[ 5, 'a', :with = 'D' ],
[ 1, 'b', :with = 'E' ],
[ 2, 'r', :with = 'F' ]
])
? Content()
#--> AErBcadCbFD
}
The main difference is that we no longer need to provide the replace() instructions in reverse order, which is an implementation detail the new function abstracts completely, to let the thinking process be fluid and natural.
PS: As indicated beneath the function title, I have included a citation to credit you.
All the best,
Mansour
To view this discussion visit https://groups.google.com/d/msgid/ring-lang/c1da0474-df91-4064-b613-7ce992fd1b3an%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ring-lang/bc2dd75c-8bbb-4750-910f-760399a9539dn%40googlegroups.com.
Hello Gal,
Our interactions helps me show the power of Softanza in real scenarios and further enhancing it.
Thank you a lot.
Best,
Mansour
To view this discussion visit https://groups.google.com/d/msgid/ring-lang/8aa35c24-39d6-464e-81f7-b6ea0a029165n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ring-lang/b83d526a-a74b-40da-a367-2a98ab2d8077n%40googlegroups.com.
puts Prime.each(5000).select{|p| 2.pow(p-1 ,p*p) == 1 }
? PrimesUnderQ(5000).WXT(' isWeiferich(@number) ')
To view this discussion visit https://groups.google.com/d/msgid/ring-lang/089dd2f4-3971-4c76-95bb-6e18e154232bn%40googlegroups.com.
maxLineLength = 80
tabSize = 4