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.

Showing 1-5 of 5 results.

A052331 Inverse of A052330; A binary encoding of Fermi-Dirac factorization of n, shown in decimal.

Original entry on oeis.org

0, 1, 2, 4, 8, 3, 16, 5, 32, 9, 64, 6, 128, 17, 10, 256, 512, 33, 1024, 12, 18, 65, 2048, 7, 4096, 129, 34, 20, 8192, 11, 16384, 257, 66, 513, 24, 36, 32768, 1025, 130, 13, 65536, 19, 131072, 68, 40, 2049, 262144, 258, 524288, 4097, 514, 132, 1048576, 35
Offset: 1

Views

Author

Christian G. Bower, Dec 15 1999

Keywords

Comments

Every number can be represented uniquely as a product of numbers of the form p^(2^k), sequence A050376. This sequence is a binary representation of this factorization, with a(p^(2^k)) = 2^(i-1), where i is the index (A302778) of p^(2^k) in A050376. Additive with a(p^e) = sum a(p^(2^e_k)) where e = sum(2^e_k) is the binary representation of e and a(p^(2^k)) is as described above. - Franklin T. Adams-Watters, Oct 25 2005 - Index offset corrected by Antti Karttunen, Apr 17 2018

Examples

			n = 84 has Fermi-Dirac factorization A050376(5) * A050376(3) * A050376(2) = 7*4*3. Thus a(84) = 2^(5-1) + 2^(3-1) + 2^(2-1) = 16 + 4 + 2 = 22 ("10110" in binary = A182979(84)). - _Antti Karttunen_, Apr 17 2018
		

Crossrefs

Cf. A182979 (same sequence shown in binary).
One less than A064358.
Cf. also A156552.

Programs

  • PARI
    A052331=a(n)={for(i=1,#n=factor(n)~,n[2,i]>1||next; m=binary(n[2,i]); n=concat(n,Mat(vector(#m-1,j,[n[1,i]^2^(#m-j),m[j]]~)));n[2,i]%=2); n||return(0); m=vecsort(n[1,]); forprime(p=1,m[#m],my(j=0);while(p^2^j>1} \\ M. F. Hasler, Apr 08 2015
    
  • PARI
    up_to_e = 8192;
    v050376 = vector(up_to_e);
    ispow2(n) = (n && !bitand(n,n-1));
    i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to_e,break));
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); }; \\ Antti Karttunen, Apr 12 2018

Formula

a(1)=0; a(n*A050376(k)) = a(n) + 2^k for a(n) < 2^k, k=0, 1, ... - Thomas Ordowski, Mar 23 2005
From Antti Karttunen, Apr 13 2018: (Start)
a(1) = 0; for n > 1, a(n) = A000079(A302785(n)-1) + a(A302776(n)).
For n > 1, a(n) = A000079(A302786(n)-1) * A302787(n).
a(n) = A064358(n)-1.
A000120(a(n)) = A064547(n).
A069010(a(n)) = A302790(n).
(End)

A223491 Largest Fermi-Dirac factor of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 3, 7, 4, 9, 5, 11, 4, 13, 7, 5, 16, 17, 9, 19, 5, 7, 11, 23, 4, 25, 13, 9, 7, 29, 5, 31, 16, 11, 17, 7, 9, 37, 19, 13, 5, 41, 7, 43, 11, 9, 23, 47, 16, 49, 25, 17, 13, 53, 9, 11, 7, 19, 29, 59, 5, 61, 31, 9, 16, 13, 11, 67, 17, 23, 7, 71, 9
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 20 2013

Keywords

Comments

Greatest Fermi-Dirac factor of n: Largest divisor of n of the form p^(2^k), for some prime p and k >= 0, with a(1) = 1. Thus for n > 1, the largest term of A050376 that divides n. - Antti Karttunen, Apr 13 2018

Crossrefs

Cf. A223490, A050376, A034699, A000040 (subsequence), A302776, A302785, A302789 (ordinal transform).
Cf. also A006530, A034699.

Programs

  • Haskell
    a223491 = last . a213925_row
    
  • Mathematica
    f[p_, e_] := p^(2^Floor[Log2[e]]); a[n_] := Max @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 26 2020 *)
  • PARI
    ispow2(n) = (n && !bitand(n,n-1));
    A223491(n) = if(1==n,n,fordiv(n, d, if(ispow2(isprimepower(n/d)), return(n/d)))); \\ Antti Karttunen, Apr 13 2018

Formula

a(n) = A213925(n,A064547(n)).
A209229(A100995(a(n))) = 1; A010055(a(n)) = 1.
From Antti Karttunen, Apr 13 2018: (Start)
a(1) = 1; for n > 1, a(n) = A050376(A302785(n)).
a(n) = n/A302776(n).
(End)

A302786 Index of the smallest Fermi-Dirac factor of n, a(1) = 0 by convention: a(n) = A302778(A223490(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 1, 5, 1, 6, 1, 7, 2, 8, 1, 2, 9, 10, 1, 11, 3, 2, 1, 12, 1, 13, 1, 2, 3, 14, 1, 15, 1, 2, 1, 4, 3, 16, 1, 2, 1, 17, 1, 18, 3, 4, 1, 19, 2, 20, 1, 2, 3, 21, 1, 4, 1, 2, 1, 22, 2, 23, 1, 5, 3, 4, 1, 24, 3, 2, 1, 25, 1, 26, 1, 2, 3, 5, 1, 27, 4, 28, 1, 29, 2, 4, 1, 2, 1, 30, 1, 5, 3, 2, 1, 4, 1, 31, 1, 6, 3, 32, 1, 33, 1, 2
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Crossrefs

A left inverse of A050376.
Cf. A001511, A052331, A223490, A302778, A302785, A302787, A302788 (ordinal transform), A302789.
Cf. also A055396.

Programs

  • Mathematica
    nn = 105; t = {}; k = 1;
    While[lim = nn^(1/k); lim > 2,
         t = Join[t, Prime[Range[PrimePi[lim]]]^k]; k = 2 k];
    A050376 = Union[t];
    A223490[n_] := Table[{p, e} = pe; p^(2^IntegerExponent[e, 2]), {pe, FactorInteger[n]}] // Min;
    a[n_] := If[n == 1, 0, FirstPosition[A050376, A223490[n]][[1]]];
    Array[a, nn] (* Jean-François Alcover, Jan 08 2022, after T. D. Noe in A050376 *)
  • PARI
    up_to = 65537;
    v050376 = vector(up_to);
    ispow2(n) = (n && !bitand(n,n-1));
    i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to,break));
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A001511(n) = 1+valuation(n,2);
    A302786(n) = if(1==n,0,A001511(A052331(n)));

Formula

a(n) = A302778(A223490(n)).
a(1) = 0; for n > 1, a(n) = A001511(A052331(n)).
For n >= 1, a(A050376(n)) = n.
For n > 1, A050376(a(n)) = A223490(n).

A302778 Number of "Fermi-Dirac primes" (A050376) <= n.

Original entry on oeis.org

0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 13, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 22, 22, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25, 26, 26, 26, 26, 26, 26, 27, 27, 28, 28, 29, 29, 29, 29, 29, 29, 30
Offset: 1

Views

Author

Antti Karttunen, Apr 16 2018

Keywords

Crossrefs

Partial sums of A302777. A left inverse of A050376.
Differs from A203967 for the first time at n=64, where a(64) = 23, while A203967(64) = 24.
Cf. also A000720, A025528.

Programs

  • Mathematica
    s[n_] := Boole[n > 1 && Length[(f = FactorInteger[n])] == 1 && (e = f[[;; , 2]]) == 2^IntegerExponent[e, 2]]; Accumulate @ Array[s, 100] (* Amiram Eldar, Nov 27 2020 *)
  • PARI
    A209229(n) = (n && !bitand(n,n-1));
    A302777(n) = A209229(isprimepower(n));
    s=0; for(n=1,105,s+=A302777(n); print1(s,", "));
    
  • Python
    from sympy import primepi, integer_nthroot
    def A302778(n): return sum(primepi(integer_nthroot(n,1<Chai Wah Wu, Feb 18-19 2025

Formula

a(1) = 0; for n > 1, a(n) = A302777(n) + a(n-1).
For all n >= 1, a(A050376(n)) = n.

A302789 Number of times the largest Fermi-Dirac factor of n is the largest Fermi-Dirac factor for numbers <= n; a(1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 3, 1, 1, 2, 1, 4, 3, 2, 1, 4, 1, 2, 3, 4, 1, 5, 1, 2, 3, 2, 5, 4, 1, 2, 3, 6, 1, 6, 1, 4, 5, 2, 1, 3, 1, 2, 3, 4, 1, 6, 5, 7, 3, 2, 1, 7, 1, 2, 7, 4, 5, 6, 1, 4, 3, 8, 1, 8, 1, 2, 3, 4, 7, 6, 1, 5, 1, 2, 1, 9, 5, 2, 3, 8, 1, 9, 7, 4, 3, 2, 5, 6, 1, 2, 9, 4, 1, 6, 1, 8, 10
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Comments

Ordinal transform of A223491, or equally, of A302785.

Crossrefs

Cf. A084400 (gives the positions of 1's).
Cf. also A078899.

Programs

  • Mathematica
    f[n_] := Max@Table[{p, e} = pe; p^(2^(Length[IntegerDigits[e, 2]]-1)), {pe, FactorInteger[n]}];
    b[_] = 1;
    a[n_] := a[n] = With[{t = f[n]}, b[t]++];
    Array[a, 105] (* Jean-François Alcover, Dec 18 2021 *)
  • PARI
    up_to = 65537;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    ispow2(n) = (n && !bitand(n, n-1));
    A223491(n) = if(1==n,n,fordiv(n, d, if(ispow2(isprimepower(n/d)), return(n/d))));
    v302789 = ordinal_transform(vector(up_to,n,A223491(n)));
    A302789(n) = v302789[n];
Showing 1-5 of 5 results.