A new recursive generation of the Fermi-Dirac numbers (OEIS A050376)

25 views
Skip to first unread message

Davide Rotondo

unread,
Jul 31, 2026, 9:10:24 PM (5 days ago) Jul 31
to SeqFan

During a computational experiment I observed a surprising pattern.

I defined a very simple algorithm:

Start with f(1)=1.

At each step, find the smallest integer k greater than or equal to 2 such that f(n)+k is NOT divisible by k.

Then compute:

f(n+1)=f(n)×k

The first values obtained are:

1, 3, 6, 24, 120, 840, 7560, 83160, 1081080, ...

The values of k are:

3, 2, 4, 5, 7, 9, 11, 13, 16, 17, 19, ...

Surprisingly, these values coincide with OEIS sequence A050376:

"Fermi-Dirac primes: numbers of the form p^(2^k), where p is prime and k ≥ 0."

In other words, they are numbers obtained by raising a prime number to an exponent that is a power of 2.

The first terms are:

2, 3, 4, 5, 7, 9, 11, 13, 16, 17, 19, 23, 25, 29, 31, 37, ...

My observation does not introduce a new sequence, but suggests a possible new recursive rule for generating these numbers.

The interesting point is that the algorithm does not need to know the prime numbers in advance: it reconstructs them automatically by choosing each time the smallest factor that does not divide the current value.

This reveals a hidden structure: starting from 1, the procedure progressively rebuilds the powers of 2 appearing in the exponents of prime factors.

According to OEIS, these numbers are interesting because of their connections with number theory and physics. The name "Fermi-Dirac" comes from Fermi-Dirac statistics, used to describe particles such as electrons and the distribution of energy states.

They also appear in studies involving cyclic groups, factorization problems and computational number theory.

What do you think?

Davide

Gareth McCaughan

unread,
Jul 31, 2026, 9:56:21 PM (5 days ago) Jul 31
to seq...@googlegroups.com
On 01/08/2026 02:10, Davide Rotondo wrote:

Start with f(1)=1.

At each step, find the smallest integer k greater than or equal to 2 such that f(n)+k is NOT divisible by k.

That's the same as "f(n) is not divisible by k", of course.

Then compute:

f(n+1)=f(n)×k

k is always a prime power, because if k = uv where u,v are coprime and uv doesn't divide f(n) then necessarily either u or v doesn't divide f(n). (Because if u,v are coprime and both divide f(n) then so does their product.)

And now I claim, by induction, that the exponent of any prime in the factorization of f(n) is (a power of 2 minus 1), and therefore that when we pick a power of p the exponent is always the next power of 2.

Furthermore, when we identify a k and multiply by it, the _only_ p^2^r value that our number newly becomes a multiple of is k. So this process will pick out all the numbers of the form p^2^k in increasing order.

The first values obtained are:

1, 3, 6, 24, 120, 840, 7560, 83160, 1081080, ...

No they aren't. The first k you pick will be 2, not 3. So you get 1, 2, 6, 24, etc.

The values of k are:

3, 2, 4, 5, 7, 9, 11, 13, 16, 17, 19, ...

Surprisingly, these values coincide with OEIS sequence A050376:

"Fermi-Dirac primes: numbers of the form p^(2^k), where p is prime and k ≥ 0."

Not so surprisingly :-) -- see above.

The interesting point is that the algorithm does not need to know the prime numbers in advance: it reconstructs them automatically by choosing each time the smallest factor that does not divide the current value.

I don't think it should be a very big surprise that something picking "the smallest number such that <some multiplicative condition>" produces something to do with prime numbers. It's not so obvious that the particular thing to do with prime numbers this one produces is "primes raised to power-of-2 exponents" but it was always going to be _something_ fairly simple involving primes.

(A few basically-random examples. If we ask for f(n)+1 not to be divisible by k instead of f(n), we get k=3 every time. If we ask for f(n)^2 not to be divisible by k, it looks as if we get the primes in increasing order _except_ that 8 is also in the list. If we ask for f(n) not to be divisible by k^2, I think we get all the prime powers but some of them more than once; I haven't attempted to figure out the details. If we ask for f(n)+k not to be divisible by k^2, I think we get (2,3,4,2,2,2,2,2,...). But: always something fairly simple involving prime numbers.)

I agree that it's pretty, though.

-- 
g

Tomasz Ordowski

unread,
Aug 1, 2026, 2:48:53 AM (5 days ago) Aug 1
to seq...@googlegroups.com
See also A037992.
Nothing new under the sun! 

--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/171d95e9-e77a-41ef-9605-49a9c5642fd4%40pobox.com.
Reply all
Reply to author
Forward
0 new messages