cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A050376 #213 Mar 12 2025 09:38:27
%S A050376 2,3,4,5,7,9,11,13,16,17,19,23,25,29,31,37,41,43,47,49,53,59,61,67,71,
%T A050376 73,79,81,83,89,97,101,103,107,109,113,121,127,131,137,139,149,151,
%U A050376 157,163,167,169,173,179,181,191,193,197,199,211,223,227,229,233,239,241
%N A050376 "Fermi-Dirac primes": numbers of the form p^(2^k) where p is prime and k >= 0.
%C A050376 Every number n is a product of a unique subset of these numbers. This is sometimes called the Fermi-Dirac factorization of n (see A182979). Proof: In the prime factorization n = Product_{j>=1} p(j)^e(j) expand every exponent e(j) as binary number and pick the terms of this sequence corresponding to the positions of the ones in binary (it is clear that both n and n^2 have the same number of factors in this sequence, and that each factor appears with exponent 1 or 0).
%C A050376 Or, a(1) = 2; for n>1, a(n) = smallest number which cannot be obtained as the product of previous terms. This is evident from the unique factorization theorem and the fact that every number can be expressed as the sum of powers of 2. - _Amarnath Murthy_, Jan 09 2002
%C A050376 Except for the first term, same as A084400. - _David Wasserman_, Dec 22 2004
%C A050376 The least number having 2^n divisors (=A037992(n)) is the product of the first n terms of this sequence according to Ramanujan.
%C A050376 According to the Bose-Einstein distribution of particles, an unlimited number of particles may occupy the same state. On the other hand, according to the Fermi-Dirac distribution, no two particles can occupy the same state (by the Pauli exclusion principle). Unique factorizations of the positive integers by primes (A000040) and over terms of A050376 one can compare with two these distributions in physics of particles. In the correspondence with this, the factorizations over primes one can call "Bose-Einstein factorizations", while the factorizations over distinct terms of A050376 one can call "Fermi-Dirac factorizations". - _Vladimir Shevelev_, Apr 16 2010
%C A050376 The numbers of the form p^(2^k), where p is prime and k >= 0, might thus be called the "Fermi-Dirac primes", while the classic primes might be called the "Bose-Einstein primes". - _Daniel Forgues_, Feb 11 2011
%C A050376 In the theory of infinitary divisors, the most natural name of the terms is "infinitary primes" or "i-primes". Indeed, n is in the sequence, if and only if it has only two infinitary divisors. Since 1 and n are always infinitary divisors of n>1, an i-prime has no other infinitary divisors. - _Vladimir Shevelev_, Feb 28 2011
%C A050376 {a(n)} is the minimal set including all primes and closed with respect to squaring. In connection with this, note that n and n^2 have the same number of factors in their Fermi-Dirac representations. - _Vladimir Shevelev_, Mar 16 2012
%C A050376 In connection with this sequence, call an integer compact if the factors in its Fermi-Dirac factorization are pairwise coprime. The density of such integers equals (6/Pi^2)*Product_{prime p} (1+(Sum_{i>=1} p^(-(2^i-1))/(p+1))) = 0.872497... It is interesting that there exist only 7 compact factorials listed in A169661. - _Vladimir Shevelev_, Mar 17 2012
%C A050376 The first k terms of the sequence solve the following optimization problem:
%C A050376 Let x_1, x_2,..., x_k be integers with the restrictions: 2<=x_1<x_2<...<x_k, A064547(Product{i=1..k} x_i) >= k.  Let the goal function be Product_{i=1..k} x_i. Then the minimal value of the goal function is Product_{i=1..k} a(i). - _Vladimir Shevelev_, Apr 01 2012
%C A050376 From _Joerg Arndt_, Mar 11 2013: (Start)
%C A050376 Similarly to the first comment, for the sequence "Numbers of the form p^(3^k) or p^(2*3^k) where p is prime and k >= 0" one obtains a factorization into distinct factors by using the ternary expansion of the exponents (here n and n^3 have the same number of such factors).
%C A050376 The generalization to base r would use "Numbers of the form p^(r^k), p^(2*r^k), p^(3*r^k), ..., p^((r-1)*r^k) where p is prime and k >= 0" (here n and n^r have the same number of (distinct) factors).  (End)
%C A050376 The first appearance of this sequence as a multiplicative basis in number theory with some new notions, formulas and theorems may have been in my 1981 paper (see the Abramovich reference). - _Vladimir Shevelev_, Apr 27 2014
%C A050376 Numbers n for which A064547(n) = 1. - _Antti Karttunen_, Feb 10 2016
%C A050376 Lexicographically earliest sequence of distinct nonnegative integers such that no term is a product of 2 or more distinct terms. Removing the distinctness requirement, the sequence becomes A000040 (the prime numbers); and the equivalent sequence where the product is of 2 distinct terms is A026416 (without its initial term, 1). - _Peter Munn_, Mar 05 2019
%C A050376 The sequence was independently developed as a multiplicative number system in 1985-1986 (and first published in 1995, see the Uhlmann reference) using a proof method involving representations of positive integers as sums of powers of 2. This approach offers an arguably simpler and more flexible means for analyzing the sequence. - _Jeffrey K. Uhlmann_, Nov 09 2022
%D A050376 V. S. Abramovich, On an analog of the Euler function, Proceeding of the North-Caucasus Center of the Academy of Sciences of the USSR (Rostov na Donu) (1981) No. 2, 13-17 (Russian; MR0632989(83a:10003)).
%D A050376 S. Ramanujan, Highly Composite Numbers, Collected Papers of Srinivasa Ramanujan, p. 125, Ed. G. H. Hardy et al., AMS Chelsea 2000.
%D A050376 V. S. Shevelev, Multiplicative functions in the Fermi-Dirac arithmetic, Izvestia Vuzov of the North-Caucasus region, Nature sciences 4 (1996), 28-43 (in Russian; MR 2000f: 11097, pp. 3912-3913).
%D A050376 J. K. Uhlmann, Dynamic map building and localization: new theoretical foundations, Doctoral Dissertation, University of Oxford, Appendix 16, 1995.
%H A050376 T. D. Noe and Charles R Greathouse IV, <a href="/A050376/b050376.txt">Table of n, a(n) for n = 1..10000</a>
%H A050376 Steven R. Finch, <a href="/A007947/a007947.pdf">Unitarism and Infinitarism</a>, February 25, 2004. [Cached copy, with permission of the author]
%H A050376 Simon Litsyn and Vladimir Shevelev, <a href="https://www.emis.de/journals/INTEGERS/papers/h33/h33.Abstract.html">On factorization of integers with restrictions on the exponent</a>, INTEGERS: Electronic Journal of Combinatorial Number Theory, 7 (2007), #A33, 1-36.
%H A050376 OEIS Wiki, <a href="/wiki/%22Fermi-Dirac_representation%22_of_n">"Fermi-Dirac representation" of n</a>.
%H A050376 Vladimir Shevelev, <a href="http://dx.doi.org/10.4064/aa126-3-1">Compact integers and factorials</a>, Acta Arith. 126 (2007), no.3, 195-236.
%H A050376 J. K. Uhlmann, <a href="https://web.archive.org/web/20221103143720/http://vigir.missouri.edu/Papers/JeffUhlmann/Dissertation-p243.pdf">Appendix 16</a>, Doctoral Dissertation, University of Oxford, page 243, 1995.
%F A050376 From _Vladimir Shevelev_, Mar 16 2012: (Start)
%F A050376 Product_{i>=1} a(i)^k_i = n!, where k_i = floor(n/a(i)) - floor(n/a(i)^2) + floor(n/a(i)^3) - floor(n/a(i)^4) + ...
%F A050376 Denote by A(x) the number of terms not exceeding x.
%F A050376 Then A(x) = pi(x) + pi(x^(1/2)) + pi(x^(1/4)) + pi(x^(1/8)) + ...
%F A050376 Conversely, pi(x) = A(x) - A(sqrt(x)). For example, pi(37) = A(37) - A(6) = 16-4 = 12. (End)
%F A050376 A209229(A100995(a(n))) = 1. - _Reinhard Zumkeller_, Mar 19 2013
%F A050376 From _Vladimir Shevelev_, Aug 31 2013: (Start)
%F A050376 A Fermi-Dirac analog of Euler product: Zeta(s) = Product_{k>=1} (1+a(k)^(-s)), for s > 1.
%F A050376 In particular, Product_{k>=1} (1+a(k)^(-2)) = Pi^2/6. (End)
%F A050376 a(n) = A268385(A268392(n)). [By their definitions.] - _Antti Karttunen_, Feb 10 2016
%F A050376 A000040 union A001248 union A030514 union A179645 union A030635 union .... - _R. J. Mathar_, May 26 2017
%e A050376 Prime powers which are not terms of this sequence:
%e A050376   8 = 2^3 = 2^(1+2), 27 = 3^3 = 3^(1+2), 32 = 2^5 = 2^(1+4),
%e A050376   64 = 2^6 = 2^(2+4), 125 = 5^3 = 5^(1+2), 128 = 2^7 = 2^(1+2+4)
%e A050376 "Fermi-Dirac factorizations":
%e A050376   6 = 2*3, 8 = 2*4, 24 = 2*3*4, 27 = 3*9, 32 = 2*16, 64 = 4*16,
%e A050376   108 = 3*4*9, 120 = 2*3*4*5, 121 = 121, 125 = 5*25, 128 = 2*4*16.
%p A050376 isA050376 := proc(n)
%p A050376     local f,e;
%p A050376     f := ifactors(n)[2] ;
%p A050376     if nops(f) = 1 then
%p A050376         e := op(2,op(1,f)) ;
%p A050376         if isA000079(e) then
%p A050376             true;
%p A050376         else
%p A050376             false;
%p A050376         end if;
%p A050376     else
%p A050376         false;
%p A050376     end if;
%p A050376 end proc:
%p A050376 A050376 := proc(n)
%p A050376     option remember ;
%p A050376     local a;
%p A050376     if n = 1 then
%p A050376         2 ;
%p A050376     else
%p A050376         for a from procname(n-1)+1 do
%p A050376             if isA050376(a) then
%p A050376                 return a;
%p A050376             end if;
%p A050376         end do:
%p A050376     end if;
%p A050376 end proc: # _R. J. Mathar_, May 26 2017
%t A050376 nn = 300; t = {}; k = 1; While[lim = nn^(1/k); lim > 2,  t = Join[t, Prime[Range[PrimePi[lim]]]^k]; k = 2 k]; t = Union[t] (* _T. D. Noe_, Apr 05 2012 *)
%o A050376 (PARI) {a(n)= local(m, c, k, p); if(n<=1, 2*(n==1), n--; c=0; m=2; while( c<n, m++; if( isprime(m) || ( (k=ispower(m, , &p))&&isprime(p)&& (k==2^valuation(k, 2)) ), c++)); m)} \\ _Michael Somos_, Apr 15 2005; edited by _Michel Marcus_, Aug 07 2021
%o A050376 (PARI) lst(lim)=my(v=primes(primepi(lim)),t); forprime(p=2,sqrt(lim),t=p; while((t=t^2)<=lim,v=concat(v,t))); vecsort(v) \\ _Charles R Greathouse IV_, Apr 10 2012
%o A050376 (PARI) is_A050376(n)=2^#binary(n=isprimepower(n))==n*2 \\ _M. F. Hasler_, Apr 08 2015
%o A050376 (PARI) ispow2(n)=n && n>>valuation(n,2)==1
%o A050376 is(n)=ispow2(isprimepower(n)) \\ _Charles R Greathouse IV_, Sep 18 2015
%o A050376 (PARI) isok(n)={my(e=isprimepower(n)); e && !bitand(e,e-1)} \\ _Andrew Howroyd_, Oct 16 2024
%o A050376 (Haskell)
%o A050376 a050376 n = a050376_list !! (n-1)
%o A050376 a050376_list = filter ((== 1) . a209229 . a100995) [1..]
%o A050376 -- _Reinhard Zumkeller_, Mar 19 2013
%o A050376 (Scheme)
%o A050376 (define A050376 (MATCHING-POS 1 1 (lambda (n) (= 1 (A064547 n)))))
%o A050376 ;; Requires also my IntSeq-library. - _Antti Karttunen_, Feb 09 2016
%o A050376 (Python)
%o A050376 from sympy import isprime, perfect_power
%o A050376 def ok(n):
%o A050376   if isprime(n): return True
%o A050376   answer = perfect_power(n)
%o A050376   if not answer: return False
%o A050376   b, e = answer
%o A050376   if not isprime(b): return False
%o A050376   while e%2 == 0: e //= 2
%o A050376   return e == 1
%o A050376 def aupto(limit):
%o A050376   alst, m = [], 1
%o A050376   for m in range(1, limit+1):
%o A050376     if ok(m): alst.append(m)
%o A050376   return alst
%o A050376 print(aupto(241)) # _Michael S. Branicky_, Feb 03 2021
%o A050376 (Python)
%o A050376 from sympy import primepi, integer_nthroot
%o A050376 def A050376(n):
%o A050376     def bisection(f,kmin=0,kmax=1):
%o A050376         while f(kmax) > kmax: kmax <<= 1
%o A050376         kmin = kmax >> 1
%o A050376         while kmax-kmin > 1:
%o A050376             kmid = kmax+kmin>>1
%o A050376             if f(kmid) <= kmid:
%o A050376                 kmax = kmid
%o A050376             else:
%o A050376                 kmin = kmid
%o A050376         return kmax
%o A050376     def f(x): return n+x-sum(primepi(integer_nthroot(x,1<<i)[0]) for i in range(x.bit_length().bit_length()))
%o A050376     return bisection(f,n,n) # _Chai Wah Wu_, Feb 18-19 2025
%Y A050376 Cf. A000040 (primes, is a subsequence), A026416, A026477, A037992 (partial products), A050377-A050380, A052330, A064547, A066724, A084400, A176699, A182979.
%Y A050376 Cf. A268388 (complement without 1).
%Y A050376 Cf. A124010, subsequence of A000028, A000961, A213925, A223490.
%Y A050376 Cf. A228520, A186945 (Fermi-Dirac analog of Ramanujan primes, A104272, and Labos primes, A080359).
%Y A050376 Cf. also A268385, A268391, A268392.
%K A050376 nonn,easy,nice
%O A050376 1,1
%A A050376 _Christian G. Bower_, Nov 15 1999
%E A050376 Edited by _Charles R Greathouse IV_, Mar 17 2010
%E A050376 More examples from _Daniel Forgues_, Feb 09 2011