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-7 of 7 results.

A302785 Index of the largest Fermi-Dirac factor of n, a(1) = 0 by convention: a(n) = A302778(A223491(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Crossrefs

A left inverse of A050376.
Cf. A052331, A223491, A240535, A302778, A302786, A302788, A302789 (ordinal transform).
Cf. also A061395.

Programs

  • PARI
    up_to = 65537;
    v050376 = vector(up_to);
    A050376(n) = v050376[n];
    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));
    A302785(n) = if(1==n,0, my(e); fordiv(n, d, if(ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(e, return(e), print("v050376 too short!"); return(1/0)))));

Formula

a(n) = A302778(A223491(n)).
For n > 1, A050376(a(n)) = A223491(n).
For n >= 1, a(A050376(n)) = n.

A064547 Sum of binary digits (or count of 1-bits) in the exponents of the prime factorization of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 2, 2, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 3, 2, 3, 2, 2, 1, 3, 1, 2, 2, 2, 2, 3, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 1, 3, 1, 3, 3
Offset: 1

Views

Author

Wouter Meeussen, Oct 09 2001

Keywords

Comments

This sequence is different from A058061 for n containing 6th, 8th, ..., k-th powers in its prime decomposition, where k runs through the integers missing from A064548.
For n > 1, n is a product of a(n) distinct members of A050376. - Matthew Vandermast, Jul 13 2004
For n > 1: a(n) = length of n-th row in A213925. - Reinhard Zumkeller, Mar 20 2013
Number of Fermi-Dirac factors of n. - Peter Munn, Dec 27 2019

Examples

			For n = 54, n = 2^1 * 3^3 with exponents (1) and (11) in binary, so a(54) = A000120(1) + A000120(3) = 1 + 2 = 3.
		

Crossrefs

Cf. A000028 (positions of odd terms), A000379 (of even terms).
Cf. A050376 (positions of ones), A268388 (terms larger than ones).
Row lengths of A213925.
A000120, A007814, A028234, A037445, A052331, A064989, A067029, A156552, A223491, A286574 are used in formulas defining this sequence.
Cf. A005117, A058061 (to which A064548 relates), A138302.
Cf. other sequences counting factors of n: A001221, A001222.
Cf. other sequences where a(n) depends only on the prime signature of n: A181819, A267116, A268387.
A003961, A007913, A008833, A059895, A059896, A059897, A225546 are used to express relationship between terms of this sequence.

Programs

  • Haskell
    a064547 1 = 0
    a064547 n = length $ a213925_row n  -- Reinhard Zumkeller, Mar 20 2013
    
  • Maple
    expts:=proc(n) local t1,t2,t3,t4,i; if n=1 then RETURN([0]); fi; if isprime(n) then RETURN([1]); fi; t1:=ifactor(n); if nops(factorset(n))=1 then RETURN([op(2,t1)]); fi; t2:=nops(t1); t3:=[]; for i from 1 to t2 do t4:=op(i,t1); if nops(t4) = 1 then t3:=[op(t3),1]; else t3:=[op(t3),op(2,t4)]; fi; od; RETURN(t3); end;
    A000120 := proc(n) local w,m,i; w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end:
    LamMos:= proc(n) local t1,t2,t3,i; t1:=expts(n); add( A000120(t1[i]),i=1..nops(t1)); end; # N. J. A. Sloane, Dec 20 2007
    # alternative Maple program:
    A064547:= proc(n) local F;
    F:= ifactors(n)[2];
    add(convert(convert(f[2],base,2),`+`),f=F)
    end proc:
    map(A064547,[$1..100]); # Robert Israel, May 17 2016
  • Mathematica
    Table[Plus@@(DigitCount[Last/@FactorInteger[k], 2, 1]), {k, 105}]
  • PARI
    a(n) = {my(f = factor(n)[,2]); sum(k=1, #f, hammingweight(f[k]));} \\ Michel Marcus, Feb 10 2016
    
  • Python
    from sympy import factorint
    def wt(n): return bin(n).count("1")
    def a(n):
        f=factorint(n)
        return sum([wt(f[i]) for i in f]) # Indranil Ghosh, May 30 2017
  • Scheme
    ;; uses memoizing-macro definec
    (definec (A064547 n) (cond ((= 1 n) 0) (else (+ (A000120 (A067029 n)) (A064547 (A028234 n))))))
    ;; Antti Karttunen, Feb 09 2016
    
  • Scheme
    ;; uses memoizing-macro definec
    (definec (A064547 n) (if (= 1 n) 0 (+ (A000120 (A007814 n)) (A064547 (A064989 n)))))
    ;; Antti Karttunen, Feb 09 2016
    

Formula

a(m*n) <= a(m)*a(n). - Reinhard Zumkeller, Mar 20 2013
From Antti Karttunen, Feb 09 2016: (Start)
a(1) = 0, and for n > 1, a(n) = A000120(A067029(n)) + a(A028234(n)).
a(1) = 0, and for n > 1, a(n) = A000120(A007814(n)) + a(A064989(n)).
(End)
a(n) = log_2(A037445(n)). - Vladimir Shevelev, May 13 2016
a(n) = A286574(A156552(n)). - Antti Karttunen, May 28 2017
Additive with a(p^e) = A000120(e). - Jianing Song, Jul 28 2018
a(n) = A000120(A052331(n)). - Peter Munn, Aug 26 2019
From Peter Munn, Dec 18 2019: (Start)
a(A000379(n)) mod 2 = 0.
a(A000028(n)) mod 2 = 1.
A001221(n) <= a(n) <= A001222(n).
A001221(n) < a(n) => a(n) < A001222(n).
a(n) = A001222(n) if and only if n is in A005117.
a(n) = A001221(n) if and only if n is in A138302.
a(n^2) = a(n).
a(A003961(n)) = a(n).
a(A225546(n)) = a(n).
a(n) = a(A007913(n)) + a(A008833(n)).
a(A050376(n)) = 1.
a(A059897(n,k)) + 2 * a(A059895(n,k)) = a(n) + a(k).
a(A059896(n,k)) + a(A059895(n,k)) = a(n) + a(k).
Alternative definition: a(1) = 0; a(n * m) = a(n) + 1 for m = A050376(k) > A223491(n).
(End)
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = Sum_{p prime} f(1/p) = 0.13605447049622836522... (A382294), where f(x) = -x + Sum_{k>=0} x^(2^k)/(1+x^(2^k)). - Amiram Eldar, Sep 28 2023
a(n) << log n/log log n. - Charles R Greathouse IV, Nov 29 2024

A213925 Triangle read by rows: n-th row contains Fermi-Dirac representation of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Mar 20 2013

Keywords

Comments

Unique factorization of n into distinct prime powers of form p^(2^k), cf. A050376.

Examples

			First rows:
.     1:    1
.     2:    2
.     3:    3
.     4:    4
.     5:    5
.     6:    2  3
.     7:    7
.     8:    2  4                   8 = 2^2^0 * 2^2^1
.     9:    9
.    10:    2  5
.......
.   990:    2   5  9  11
.   991:  991
.   992:    2  16 31             992 = 2^2^0 * 2^2^2 * 31^2^0
.   993:    3 331
.   994:    2   7 71
.   995:    5 199
.   996:    3   4 83
.   997:  997
.   998:    2 499
.   999:    3   9 37             999 = 3^2^0 * 3^2^1 * 37^2^0
.  1000:    2   4  5  25        1000 = 2^2^0 * 2^2^1 * 5^2^0 * 5^2^1 .
		

Crossrefs

Cf. A050376.
For n > 1: A064547 (row lengths), A181894 (row sums), A223490, A223491.

Programs

  • Haskell
    a213925 n k = a213925_row n !! (k-1)
    a213925_row 1 = [1]
    a213925_row n = reverse $ fd n (reverse $ takeWhile (<= n) a050376_list)
       where fd 1 _      = []
             fd x (q:qs) = if m == 0 then q : fd x' qs else fd x qs
                           where (x',m) = divMod x q
    a213925_tabf = map a213925_row [1..]
    
  • Maple
    T:= n-> `if`(n=1, [1], sort([seq((l-> seq(`if`(l[j]=1, i[1]^(2^(j-1)), [][]),
                 j=1..nops(l)))(convert(i[2], base, 2)), i=ifactors(n)[2])]))[]:
    seq(T(n), n=1..60);  # Alois P. Heinz, Feb 20 2018
  • Mathematica
    nmax = 50; FDPrimes = Reap[k = 1; While[lim = nmax^(1/k); lim > 2, Sow[Prime[Range[PrimePi[lim]]]^k]; k = 2 k]][[2, 1]] // Flatten // Union;
    f[1] = 1; f[n_] := Reap[m = n; Do[If[m == 1, Break[], If[Divisible[m, p], m = m/p; Sow[p]]], {p, Reverse[FDPrimes]}]][[2, 1]] // Reverse;
    Array[f, nmax] // Flatten (* Jean-François Alcover, Feb 05 2019 *)
  • PARI
    row(n) = if(n == 1, [1], my(f = factor(n), p = f[, 1], e = f[, 2], r = [], b); for(i = 1, #p, b = binary(e[i]); for(j = 0, #b-1, if(b[#b-j], r = concat(r, p[i]^(2^j))))); r); \\ Amiram Eldar, May 02 2025

Formula

Product_{k=1..A064547(n)} T(n,k) = n.

Extensions

Example corrected (row 992) by Reinhard Zumkeller, Mar 11 2015

A223490 Smallest Fermi-Dirac factor of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Mar 20 2013

Keywords

Comments

Note that this is not equal to the smallest Fermi-Dirac prime (A050376) dividing n, which is always A020639(n). - Antti Karttunen, Apr 15 2018

Crossrefs

Cf. A223491, A050376, A028233, A000040 (subsequence).
Cf. also A020639.

Programs

  • Haskell
    a223490 = head . a213925_row
    
  • Mathematica
    f[p_, e_] := p^(2^IntegerExponent[e, 2]); a[n_] := Min @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 26 2020 *)
  • PARI
    up_to = 65537;
    v050376 = vector(up_to);
    A050376(n) = v050376[n];
    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);
    A223490(n) = if(1==n,n,A050376(A001511(A052331(n)))); \\ Antti Karttunen, Apr 15 2018

Formula

a(n) = A213925(n,1).
A209229(A100995(a(n))) = 1; A010055(a(n)) = 1.
From Antti Karttunen, Apr 15 2018: (Start)
a(1) = 1; and for n > 1, a(n) = A050376(A302786(n)).
a(n) = n / A302792(n).
a(n) = A302023(A020639(A302024(n))).
(End)

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];

A302776 a(1) = 1; for n>1, a(n) = n/(largest Fermi-Dirac factor of n).

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, 6, 1, 2, 3, 4, 1, 6, 1, 2, 3, 2, 5, 4, 1, 2, 3, 8, 1, 6, 1, 4, 5, 2, 1, 3, 1, 2, 3, 4, 1, 6, 5, 8, 3, 2, 1, 12, 1, 2, 7, 4, 5, 6, 1, 4, 3, 10, 1, 8, 1, 2, 3, 4, 7, 6, 1, 5, 1, 2, 1, 12, 5, 2, 3, 8, 1, 10, 7, 4, 3, 2, 5, 6, 1, 2, 9, 4, 1, 6, 1, 8, 15
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Comments

For n > 1, a(n) = the smallest positive number d such that n/d is a "Fermi-Dirac prime", a term of A050376.

Crossrefs

Cf. A084400 (gives the positions of 1's).
Cf. also A052126, A284600.

Programs

  • Mathematica
    f[p_, e_] := p^(2^Floor[Log2[e]]); a[n_] := n / Max @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 26 2020 *)
  • PARI
    A209229(n) = (n && !bitand(n,n-1));
    A302777(n) = A209229(isprimepower(n));
    A302776(n) = if(1==n,n,fordiv(n, d, if(A302777(n/d), return(d))));

Formula

a(n) = n / A223491(n).
a(n) = A302023(A052126(A302024(n))).

A346088 Smallest divisor d of n for which A002034(d) = A002034(n), where A002034(n) is the smallest positive integer k such that k! is a multiple 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, 27, 7, 29, 5, 31, 32, 11, 17, 7, 9, 37, 19, 13, 5, 41, 7, 43, 11, 9, 23, 47, 16, 49, 25, 17, 13, 53, 27, 11, 7, 19, 29, 59, 5, 61, 31, 7, 32, 13, 11, 67, 17, 23, 7, 71, 9, 73, 37, 25, 19, 11, 13, 79, 16, 27, 41, 83, 7, 17, 43, 29, 11, 89
Offset: 1

Views

Author

Antti Karttunen, Jul 05 2021

Keywords

Examples

			36 has 9 divisors: 1, 2, 3, 4, 6, 9, 12, 18, 36. When A002034 is applied to them, one obtains values [1, 2, 3, 4, 3, 6, 4, 6, 6], thus there are three divisors that obtain the maximal value 6 obtained at 36 itself, of which divisor 9 is the smallest, and therefore a(36) = 9.
		

Crossrefs

Cf. also A344758.
Differs from A223491 for the first time at n=27, where a(27) = 27, while A223491(27) = 9.

Programs

  • PARI
    A002034(n) = if(1==n,n,my(s=factor(n)[, 1], k=s[#s], f=Mod(k!, n)); while(f, f*=k++); (k)); \\ After code in A002034.
    A346088(n) = { my(x=A002034(n)); fordiv(n,d,if(A002034(d)==x, return(d))); };

Formula

a(n) = n / A346089(n).
Showing 1-7 of 7 results.