Sunday, March 30, 2025

Counting Critters: Who’s Got the Numbers Game on Lock?



Ever wonder if animals can count? I mean, not like they’re sitting there with a pencil stub and a ledger, tallying up their groceries, but do they get numbers? Turns out, some of them do—and they’re better at it than I am when I’m half-asleep trying to split a restaurant bill. Nature’s got a few math whizzes, and I’ve been digging into which ones stand out. Spoiler: it’s not just the usual suspects.

Take chimpanzees. These furry cousins of ours are basically showing off at this point. I read about studies—fancy ones, like from Kyoto University—where chimps zip through number tasks faster than humans. They can eyeball sets of dots up to 9 and pick the bigger one without breaking a sweat. Imagine them in the wild, sizing up rival groups or eyeballing a fruit haul. Makes me wonder if they’d judge my banana stash—three’s enough, right? Probably not.

Then there’s crows. I’ve always liked their vibe—those sleek, black tricksters perched on telephone wires like they’re plotting something. Turns out, they’re counting too. Scientists say they can handle numbers up to 4 or 5, and some even grok the idea of zero. Zero! I barely got that in grade school. Next time I see one hopping around, I’ll picture it mentally tallying acorns. “Three’s a party, four’s a feast,” it might caw to itself.

Dolphins, though—those sea geniuses—they’ve got a knack for it too. They’ll pick the bigger pile of fishy treats in lab tests, no problem, up to about 5. I can see why: swimming in pods, keeping track of friends or foes, numbers matter. Makes me think of the time I tried counting waves at the beach and lost track at, what, 7? Dolphins would’ve smirked.

And bees! Tiny, buzzing bees! I couldn’t believe this one—research says they count up to 4 and even do basic math. Add one, subtract one, all to find the best flowers. Their waggle dance is like a GPS with a side of algebra. Next time I’m lost in the weeds (literally or otherwise), I’ll wish I had a bee’s brain.

Elephants round out the list. Big, lumbering, and apparently good with headcounts. They can tell 5 rumbles from 10 when listening to calls—handy for spotting trouble or rallying the herd. I once saw an elephant at the zoo, trunk swinging, and now I’m retroactively impressed. It wasn’t just staring at me; it was probably counting my bad hair day.

So who’s the champ? Hard to say. Chimps and crows flex the abstract stuff, bees punch above their weight, and elephants keep it practical. Me, I’m just glad I don’t have to compete. I’d be the guy fumbling with “how many coffee cups is too many?” (Answer: there’s no limit.) Nature’s got its own calculators, and I’m here for it. Which one’s your favorite?

(Post and graphic produced by https://grok.com/chat)

References:

https://www.elephanttrust.org/research (Amboseli project overview; search for cognitive or acoustic studies.)

https://www.science.org/doi/10.1126/sciadv.aav0961 (Direct link to the paper "Numerical ordering of zero in honey bees.")


https://www.ox.ac.uk/news/science-blog/2018/02/crows-can-count-zero (Oxford University news article summarizing the study by Nieder et al.)


Sunday, March 16, 2025

Saint Patrick - Another Prime Day

(Image: By Internet Archive Book Images -  https://archive.org/stream/irelandscrownoft00ryan/irelandscrownoft00ryan#page/n61/mode/1up, No restrictions, https://commons.wikimedia.org/w/index.php?curid=41964622)

A recent post about Julius Caesar introduced the concept of Caesar Primes. Caesar's birthday is the 13th of July (7th month), and 137 is prime. As we celebrate Saint Patrick's Day, March 17, we observe that 317 and 173 are primes. Perhaps this suggests a sequence of primes similar to the Caesar Primes. Other pairs of primes formed by two primes include: {37, 73}, {113, 311}, {313,331},{337,733}, {359,593}...

Wednesday, March 12, 2025

Julius Caesar and Caesar Primes

 

(Image: https://commons.wikimedia.org/wiki/File:Retrato_de_Julio_C%C3%A9sar_(26724093101).jpg)


March 15 is also known as the Ides of March, when Julius Caesar was assassinated in 44 BCE. Caesar was born on July 12 or 13, 100 BCE (records vary on the date of July 12 or July 13). For the purpose of this post, July 13 is consistent with the numbers known as Caesar Primes. One such number is 137 - the concatenation of two primes, 13 and 7 (with Caesar's birthday being the 13th day of the 7th month).

The list of Caesar Primes is found in the On-Line Encyclopedia of Integer Sequences (OEIS) as sequence: https://oeis.org/A133187.

I wrote a Mathematica program to produce this sequence:

lim=2700;plim=Max[FromDigits[Rest[IntegerDigits[lim]]],FromDigits[Drop[IntegerDigits[lim],-1]]];f2p[{p_,q_}]:=FromDigits[Join[IntegerDigits[q],IntegerDigits[p]]];p=Prime[Range[PrimePi[plim]]];p2=Subsets[p,{2}];Union[Select[f2p/@p2,PrimeQ[#]&&#<=lim&]]

The first 46 Caesar Primes are: 53,  73, 113, 137, 173, 193, 197, 233, 293, 313, 317, 373, 433, 593, 613, 617, 673, 677, 733, 797, 977, 1013, 1033, 1093, 1097, 1277, 1373, 1493, 1637, 1733, 1913, 1933, 1973, 1993, 1997, 2113, 2237, 2273, 2293, 2297, 2311, 2333, 2393, 2417, 2633, 2693.

Thursday, March 6, 2025

Sublime Numbers

 

(Image: Grok)

The numbers 12 and 6086555670238378989670371734243169622657830773351885970528324860512791691264 are the two entries in the OEIS sequence: A081357, Sublime Numbers. 

In number theory, a sublime number is a positive integer which has a perfect number of positive factors (including itself), and whose positive factors add up to another perfect number.

The first entry, 12, has a perfect number of positive factors (6): 1, 2, 3, 4, 6, and 12, and the sum of these is again a perfect number: 1 + 2 + 3 + 4 + 6 + 12 = 28.

The second entry, above, is the product: (2126)(261 − 1)(231 − 1)(219 − 1)(27 − 1)(25 − 1)(23 − 1). 

Tuesday, February 25, 2025

A381149 Contribution to the OEIS

 A381149

a(1) = 2, a(2) = 3; thereafter, a(n) = a(n-1) + sum of prior prime terms.
+40
0
2, 3, 8, 13, 31, 80, 129, 178, 227, 503, 1282, 2061, 2840, 3619, 4398, 5177, 5956, 6735, 7514, 8293, 17365, 26437, 61946, 97455, 132964, 168473, 203982, 239491, 275000, 310509, 346018, 381527, 798563, 1215599, 1632635, 2049671, 2466707, 5350450, 8234193, 11117936
OFFSET
1,1
LINKS
EXAMPLE
For n=5, a(5) = a(4) + sum of prior primes = 13 + (2 + 3 + 13) = 31, so that 13 is counted twice.
MATHEMATICA
Nest[Append[#, #[[-1]]+Total[Select[#, PrimeQ]]]&, {2, 3}, 38]
PROG
(Python)
from sympy import isprime
from itertools import count, islice
def agen(): # generator of terms
yield from [2, 3]
primesum, an = 5, 3
while True:
an += primesum
if isprime(an): primesum += an
yield an
print(list(islice(agen(), 40))) # Michael S. Branicky, Feb 19 2025
CROSSREFS
KEYWORD
nonn,new
AUTHOR
James C. McMahon, Feb 15 2025
STATUS
approved

This sequence is similar to my other sequence submitted at the same time, A381150. However, I think A381150 is more interesting because of the terms that repeat and also how it cycles between positive and negative terms. Link to prior post: https://jamesmacmath.blogspot.com/2025/02/a-sequence-with-competing-sums-of-prior.html

Thursday, February 20, 2025

A381150 Contribution to the OEIS

   


Recently proposed for the On-Line Encyclopedia of Integer Sequences (OEIS) is the sequence:

a(1) = 2, a(2) = 3; thereafter, a(n) = a(n-1) + (sum of prior prime terms or whose negatives are prime) - (sum of prior composite terms or whose negatives are composite).

   The sequence starts: 2, 3, 8, 5, 7, 16, 9, -7, -30, -23, -39, -16, 23, 85, 62, -23, -131... and continues to cycle through negative and positive integers. Although the sequence is not periodic, it does repeat terms. For example, the  term 347 (or its negative) occurs nine times in the first 48 terms. The 418th (or its negative) occurs 71 times in a span of 211 terms.

    My colleague, Michael De Vlieger, produced the graphic showing the sequence's progression shown above.

    If approved, the sequence will become A381150. Currently, it is still in draft form: https://oeis.org/A381150.

    Update: The sequence was published 2/25/2025.


A381150
a(0) = 1, a(1) = 2, a(2) = 3; thereafter, a(n) = a(n-1) + (sum of prior prime terms or whose negatives are prime) - (sum of prior composite terms or whose negatives are composite).
0
1, 2, 3, 8, 5, 7, 16, 9, -7, -30, -23, -39, -16, 23, 85, 62, -23, -131, -370, -239, -347, -802, -455, 347, 1496, 1149, -347, -2190, -1843, 347, 2884, 2537, -347, -3578, -3231, 347, 4272, 3925, -347, -4966, -4619, 347, 5660, 5313, -347, -6354, -6007, -11667, -5660

OFFSET
0,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10003 (a(n) for n = 1..1000 from James C. McMahon)
Michael De Vlieger, Scatterplot of m*log_10(m*a(n)), n = 1..2^10, where m = 1 of a(n) > 0 (shown in green) and m = -1 if a(n) < 0 (shown in red).
Michael De Vlieger, Scatterplot of m*log_10(m*a(n)), n = 1..2^16, where m = 1 of a(n) > 0 (shown in green) and m = -1 if a(n) < 0 (shown in red).
EXAMPLE
For n=5, a(5) = 5 + (2 + 3 + 5) - 8 = 7.
For n=9, a(9) = -7 + (2 + 3 + 5 + 7 -7) - (8 + 16 + 9) = -7 + 10 - 33 = -30
MAPLE
b:= proc(n) option remember; `if`(n<1, 0, b(n-1)+(t->
`if`(isprime(abs(t)), t, `if`(abs(t)>1, -t, 0)))(a(n)))
end:
a:= proc(n) option remember; `if`(n<3, n+1, a(n-1)+b(n-1)) end:
seq(a(n), n=0..48); # Alois P. Heinz, Feb 15 2025
MATHEMATICA
Nest[Append[#, #[[-1]]+Total[Select[#, PrimeQ]]-Total[Select[#, CompositeQ]]]&, {1, 2, 3}, 46]
KEYWORD
sign,new
AUTHOR
James C. McMahon, Feb 15 2025
STATUS
approved






Monday, February 17, 2025

Using Excel Solver to Find the Solution to a Geometry Puzzle

The Monday Puzzle in the Guardian by Alex Bellos had a good problem to illustrate the use of Excel Solver. The link to the article is: https://www.theguardian.com/science/2025/feb/17/did-you-solve-it-the-simple-geometry-problem-that-fools-almost-everyone.

Restated, the problem is to divide an 11 x 11 square into five rectangles so that the ten side lengths are the whole numbers from 1 to 10? 

Below is the 11 x 11 square with five rectangles and the ten sides labeled A through J. 


To use Excel Solver to find a solution, ten cells of the spreadsheet will be designated as the decision variables. In the attached spreadsheet, these are simply the cells A1 through J1. Solver will change their values until a solution is found. 

In rows 3 through 8 are 6 constraints:
A+D=11
C+F=11
E+H=11
G+B=11
H+J+D=11
B+I+F=11

Also in Solver, additional constraints are entered:
All values, A through J, are => 1 and <= 10.
All values, A through J, are integers.
All values, A through J, are different.

With these constraints entered, click the Solve button, and one of the solutions is displayed:

A=6, B=3, C=10, D=5, E=9, F=1, G=8, H=2, I=7, J=4






Saturday, February 1, 2025

Project Euler - Part 2


Five years ago I started the Project Euler Challenge. At the time, I was learning Python and used the challenge as a way to develop my programming skill. 


Over the last two years, I've been learning Mathematica: On-line version. I decided to revisit my Project Euler project and found that I was able to complete several more of the problems using Mathematica. There are a total of 929 posted problems; I've only solved 50, so I have a long way to go.






Thursday, January 23, 2025

A380198 Contribution to the OEIS

Difference between pi(2^n) and the integer nearest to 2^n / log(2^n).
0
-2, -1, 0, 0, 2, 3, 5, 8, 15, 24, 40, 72, 119, 212, 360, 633, 1128, 1989, 3580, 6386, 11537, 20897, 37980, 69354, 127336, 234054, 431877, 799754, 1484440, 2763961, 5156791, 9644970, 18080775, 33959344, 63902732, 120474951, 227515953, 430345298, 815241632
OFFSET
1,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..92
FORMULA
a(n) = - A053622(2^n).
a(n) = A007053(n) - A050499(2^n).
EXAMPLE
n 2^n pi(2^n) round(2^n/log(2^n) a(n)
------------------------------------------------
1 2 1 3 -2
2 4 2 3 -1
3 8 4 4 0
4 16 6 6 0
MATHEMATICA
Table[PrimePi[2^n]-Round[2^n/Log[2^n]], {n, 39}]
KEYWORD
sign,new
AUTHOR
James C. McMahon, Jan 16 2025
STATUS
approved

Friday, January 17, 2025

Very Large and Easy-to-Remember Prime Numbers


There was a recent article about asking people to name a prime number. One answer was given as 2^31-1; however, the responder was asked to recite the digits. He couldn't remember the digits of 2^31-1, which are 2,147,483,647. His friend, Neil  Sloane, offered another large prime: 12,345,678,910,987,654,321. It is easy to remember because one just needs to count from 1 to 10 and then back down to 1. The original story is recounted in this Scientific American article:  These Prime Numbers Are So Memorable That People Hunt for Them.

The number cited above is found in the OEIS sequence A350153.  

Other related sequences are:

A048847, Primes formed by concatenation of first k odd numbers.

A173426, a(n) is obtained by starting with 1, sequentially concatenating all decimal numbers up to n, and then, starting from n-1, sequentially concatenating all decimal numbers down to 1.

A260343, Numbers n such that the base-n number formed by concatenating the base-n numbers 1 2 ... n-1 n n-1 ... 2 1 is prime.

A323532, Numbers k such that the decimal concatenation of the numbers from 1 up to k followed by digit reversals of the numbers from (k-1) down to 1 is a prime.

Saturday, January 11, 2025

A377723 Contribution to the OEIS

 A377723

Numbers whose number of prime factors (counted with repetition) is greater than or equal to its smallest prime factor.
0
4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 27, 28, 30, 32, 34, 36, 38, 40, 42, 44, 45, 46, 48, 50, 52, 54, 56, 58, 60, 62, 63, 64, 66, 68, 70, 72, 74, 75, 76, 78, 80, 81, 82, 84, 86, 88, 90, 92, 94, 96, 98, 99, 100, 102, 104, 105, 106, 108, 110, 112, 114, 116
OFFSET
1,1
COMMENTS
Numbers k such that A001222(k) >= A020639(k).
Complement of A091377.
A091371(a(n)) < 1: A001222(a(n)) => A020639(a(n)).
LINKS
EXAMPLE
4 is a term because bigomega(4) = spf(4) = 2.
12 is a term because bigomega(12) = 3 > spf(12) = 2.
3 is not a term because bigomega(3) = 1 < spf(3) = 3.
MATHEMATICA
Select[Range[116], PrimeOmega[#]>=FactorInteger[#][[1, 1]]&]
KEYWORD
nonn,new
AUTHOR
James C. McMahon, Dec 28 2024
STATUS
approved

An Open Message to the Blog's Fans in Singapore

(Image:  Free 12 singapore icons - Iconfinder ) This past week, more views of this blog were made from Singapore than other country. To ackn...

Popular in last 30 days