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-10 of 21 results. Next

A027748 Irregular triangle in which first row is 1, n-th row (n > 1) lists distinct prime factors of n.

Original entry on oeis.org

1, 2, 3, 2, 5, 2, 3, 7, 2, 3, 2, 5, 11, 2, 3, 13, 2, 7, 3, 5, 2, 17, 2, 3, 19, 2, 5, 3, 7, 2, 11, 23, 2, 3, 5, 2, 13, 3, 2, 7, 29, 2, 3, 5, 31, 2, 3, 11, 2, 17, 5, 7, 2, 3, 37, 2, 19, 3, 13, 2, 5, 41, 2, 3, 7, 43, 2, 11, 3, 5, 2, 23, 47, 2, 3, 7, 2, 5, 3, 17, 2, 13, 53, 2, 3, 5, 11, 2, 7, 3, 19, 2, 29, 59, 2, 3, 5, 61, 2, 31
Offset: 1

Views

Author

Keywords

Comments

Number of terms in n-th row is A001221(n) for n > 1.
From Reinhard Zumkeller, Aug 27 2011: (Start)
A008472(n) = Sum_{k=1..A001221(n)} T(n,k), n>1;
A007947(n) = Product_{k=1..A001221(n)} T(n,k);
A006530(n) = Max_{k=1..A001221(n)} T(n,k).
A020639(n) = Min_{k=1..A001221(n)} T(n,k).
(End)
Subsequence of A027750 that lists the divisors of n. - Michel Marcus, Oct 17 2015

Examples

			Triangle begins:
   1;
   2;
   3;
   2;
   5;
   2, 3;
   7;
   2;
   3;
   2, 5;
  11;
   2, 3;
  13;
   2, 7;
  ...
		

Crossrefs

Cf. A000027, A001221, A001222 (with repetition), A027746, A141809, A141810.
a(A013939(A000040(n))+1) = A000040(n).
A284411 gives column medians.

Programs

  • Haskell
    import Data.List (unfoldr)
    a027748 n k = a027748_tabl !! (n-1) !! (k-1)
    a027748_tabl = map a027748_row [1..]
    a027748_row 1 = [1]
    a027748_row n = unfoldr fact n where
       fact 1 = Nothing
       fact x = Just (p, until ((> 0) . (`mod` p)) (`div` p) x)
                where p = a020639 x  -- smallest prime factor of x
    -- Reinhard Zumkeller, Aug 27 2011
    
  • Maple
    with(numtheory): [ seq(factorset(n), n=1..100) ];
  • Mathematica
    Flatten[ Table[ FactorInteger[n][[All, 1]], {n, 1, 62}]](* Jean-François Alcover, Oct 10 2011 *)
  • PARI
    print1(1);for(n=2,20,f=factor(n)[,1];for(i=1,#f,print1(", "f[i]))) \\ Charles R Greathouse IV, Mar 20 2013
    
  • Python
    from sympy import primefactors
    for n in range(2, 101):
        print([i for i in primefactors(n)]) # Indranil Ghosh, Mar 31 2017

Extensions

More terms from Scott Lindhurst (ScottL(AT)alumni.princeton.edu)

A008475 If n = Product (p_j^k_j) then a(n) = Sum (p_j^k_j) (a(1) = 0 by convention).

Original entry on oeis.org

0, 2, 3, 4, 5, 5, 7, 8, 9, 7, 11, 7, 13, 9, 8, 16, 17, 11, 19, 9, 10, 13, 23, 11, 25, 15, 27, 11, 29, 10, 31, 32, 14, 19, 12, 13, 37, 21, 16, 13, 41, 12, 43, 15, 14, 25, 47, 19, 49, 27, 20, 17, 53, 29, 16, 15, 22, 31, 59, 12, 61, 33, 16, 64, 18, 16, 67, 21, 26, 14, 71, 17, 73
Offset: 1

Views

Author

Keywords

Comments

For n>1, a(n) is the minimal number m such that the symmetric group S_m has an element of order n. - Ahmed Fares (ahmedfares(AT)my-deja.com), Jun 26 2001
If gcd(u,w) = 1, then a(u*w) = a(u) + a(w); behaves like logarithm; compare A001414 or A056239. - Labos Elemer, Mar 31 2003

Examples

			a(180) = a(2^2 * 3^2 * 5) = 2^2 + 3^2 + 5 = 18.
		

References

  • F. J. Budden, The Fascination of Groups, Cambridge, 1972; pp. 322, 573.
  • József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Chapter IV, p. 147.
  • T. Z. Xuan, On some sums of large additive number theoretic functions (in Chinese), Journal of Beijing normal university, No. 2 (1984), pp. 11-18.

Crossrefs

Programs

  • Haskell
    a008475 1 = 0
    a008475 n = sum $ a141809_row n
    -- Reinhard Zumkeller, Jan 29 2013, Oct 10 2011
    
  • Maple
    A008475 := proc(n) local e,j; e := ifactors(n)[2]:
    add(e[j][1]^e[j][2], j=1..nops(e)) end:
    seq(A008475(n), n=1..60); # Peter Luschny, Jan 17 2010
  • Mathematica
    f[n_] := Plus @@ Power @@@ FactorInteger@ n; f[1] = 0; Array[f, 73]
  • PARI
    for(n=1,100,print1(sum(i=1,omega(n), component(component(factor(n),1),i)^component(component(factor(n),2),i)),","))
    
  • PARI
    a(n)=local(t);if(n<1,0,t=factor(n);sum(k=1,matsize(t)[1],t[k,1]^t[k,2])) /* Michael Somos, Oct 20 2004 */
    
  • PARI
    A008475(n) = { my(f=factor(n)); vecsum(vector(#f~,i,f[i,1]^f[i,2])); }; \\ Antti Karttunen, Nov 17 2017
    
  • Python
    from sympy import factorint
    def a(n):
        f=factorint(n)
        return 0 if n==1 else sum([i**f[i] for i in f]) # Indranil Ghosh, May 20 2017

Formula

Additive with a(p^e) = p^e.
a(A000961(n)) = A000961(n); a(A005117(n)) = A001414(A005117(n)).
a(n) = Sum_{k=1..A001221(n)} A027748(n,k) ^ A124010(n,k) for n>1. - Reinhard Zumkeller, Oct 10 2011
a(n) = Sum_{k=1..A001221(n)} A141809(n,k) for n > 1. - Reinhard Zumkeller, Jan 29 2013
Sum_{k=1..n} a(k) ~ (Pi^2/12)* n^2/log(n) + O(n^2/log(n)^2) (Xuan, 1984). - Amiram Eldar, Mar 04 2021

A115627 Irregular triangle read by rows: T(n,k) = multiplicity of prime(k) as a divisor of n!.

Original entry on oeis.org

1, 1, 1, 3, 1, 3, 1, 1, 4, 2, 1, 4, 2, 1, 1, 7, 2, 1, 1, 7, 4, 1, 1, 8, 4, 2, 1, 8, 4, 2, 1, 1, 10, 5, 2, 1, 1, 10, 5, 2, 1, 1, 1, 11, 5, 2, 2, 1, 1, 11, 6, 3, 2, 1, 1, 15, 6, 3, 2, 1, 1, 15, 6, 3, 2, 1, 1, 1, 16, 8, 3, 2, 1, 1, 1, 16, 8, 3, 2, 1, 1, 1, 1
Offset: 2

Views

Author

Keywords

Comments

The factorization of n! is n! = 2^T(n,1)*3^T(n,2)*...*p_(pi(n))^T(n,pi(n)) where p_k = k-th prime, pi(n) = A000720(n).
Nonzero terms of A085604; T(n,k) = A085604(n,k), k = 1..A000720(n). - Reinhard Zumkeller, Nov 01 2013
For n=2, 3, 4 and 5, all terms of the n-th row are odd. Are there other such rows? - Michel Marcus, Nov 11 2018
From Gus Wiseman, May 15 2019: (Start)
Differences between successive rows are A067255, so row n is the sum of the first n row-vectors of A067255 (padded with zeros on the right so that all n row-vectors have length A000720(n)). For example, the first 10 rows of A067255 are
{}
1
0 1
2 0
0 0 1
1 1 0
0 0 0 1
3 0 0 0
0 2 0 0
1 0 1 0
with column sums (8,4,2,1), which is row 10.
(End)
For all prime p > 7, 3*p > 2*nextprime(p), so for any n > 21 there will always be a prime p dividing n! with exponent 2 and there are no further rows with all entries odd. - Charlie Neder, Jun 03 2019

Examples

			From _Gus Wiseman_, May 09 2019: (Start)
Triangle begins:
   1
   1  1
   3  1
   3  1  1
   4  2  1
   4  2  1  1
   7  2  1  1
   7  4  1  1
   8  4  2  1
   8  4  2  1  1
  10  5  2  1  1
  10  5  2  1  1  1
  11  5  2  2  1  1
  11  6  3  2  1  1
  15  6  3  2  1  1
  15  6  3  2  1  1  1
  16  8  3  2  1  1  1
  16  8  3  2  1  1  1  1
  18  8  4  2  1  1  1  1
(End)
m such that 5^m||101!: floor(log(101)/log(5)) = 2 terms. floor(101/5) = 20. floor(20/5) = 4. So m = u_1 + u_2 = 20 + 4 = 24. - _David A. Corneth_, Jun 22 2014
		

Crossrefs

Row lengths are A000720.
Row-sums are A022559.
Row-products are A135291.
Row maxima are A011371.

Programs

  • Haskell
    a115627 n k = a115627_tabf !! (n-2) !! (k-1)
    a115627_row = map a100995 . a141809_row . a000142
    a115627_tabf = map a115627_row [2..]
    -- Reinhard Zumkeller, Nov 01 2013
    
  • Maple
    A115627 := proc(n,k) local d,p; p := ithprime(k) ; n-add(d,d=convert(n,base,p)) ; %/(p-1) ; end proc: # R. J. Mathar, Oct 29 2010
  • Mathematica
    Flatten[Table[Transpose[FactorInteger[n!]][[2]], {n, 2, 20}]] (* T. D. Noe, Apr 10 2012 *)
    T[n_, k_] := Module[{p, jm}, p = Prime[k]; jm = Floor[Log[p, n]]; Sum[Floor[n/p^j], {j, 1, jm}]]; Table[Table[T[n, k], {k, 1, PrimePi[n]}], {n, 2, 20}] // Flatten (* Jean-François Alcover, Feb 23 2015 *)
  • PARI
    a(n)=my(i=2);while(n-primepi(i)>1,n-=primepi(i);i++);p=prime(n-1);sum(j=1,log(i)\log(p),i\=p) \\ David A. Corneth, Jun 21 2014

Formula

T(n,k) = Sum_{i=1..inf} floor(n/(p_k)^i). (Although stated as an infinite sum, only finitely many terms are nonzero.)
T(n,k) = Sum_{i=1..floor(log(n)/log(p_k))} floor(u_i) where u_0 = n and u_(i+1) = floor((u_i)/p_k). - David A. Corneth, Jun 22 2014

A053585 If n = p_1^e_1 * ... * p_k^e_k, p_1 < ... < p_k primes, then a(n) = p_k^e_k.

Original entry on oeis.org

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

Views

Author

Frederick Magata (frederick.magata(AT)uni-muenster.de), Jan 19 2000

Keywords

Comments

Let p be the largest prime dividing n, a(n) is the largest power of p dividing n.

Examples

			a(42)=7 because 42=2*3*7, a(144)=9 because 144=16*9=2^4*3^2.
		

Crossrefs

Programs

  • Haskell
    a053585 = last . a141809_row  -- Reinhard Zumkeller, Jan 29 2013
    
  • Maple
    a:= n-> `if`(n=1, 1, (i->i[1]^i[2])(sort(ifactors(n)[2])[-1])):
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 03 2023
  • Mathematica
    Table[Power @@ Last @ FactorInteger @ n, {n, 79}] (* Jean-François Alcover, Apr 01 2011 *)
  • PARI
    a(n)=if(n>1,my(f=factor(n)); f[#f~,1]^f[#f~,2],1) \\ Charles R Greathouse IV, Nov 10 2015
    
  • Python
    from sympy import factorint, primefactors
    def a(n):
        if n==1: return 1
        p = primefactors(n)[-1]
        return p**factorint(n)[p] # Indranil Ghosh, May 19 2017

Formula

a(n) = A006530(n)^A071178(n). - Reinhard Zumkeller, Aug 27 2011
a(n) = A141809(n,A001221(n)). - Reinhard Zumkeller, Jan 29 2013

Extensions

More terms from Andrew Gacek (andrew(AT)dgi.net), Apr 20 2000

A028233 If n = p_1^e_1 * ... * p_k^e_k, p_1 < ... < p_k primes, then a(n) = p_1^e_1, with a(1) = 1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Highest power of smallest prime dividing n. - Reinhard Zumkeller, Apr 09 2015

Examples

			From _Muniru A Asiru_, Jan 27 2018: (Start)
If n=10, then a(10) = 2 since 10 = 2^1*5^1.
If n=16, then a(16) = 16 since 16 = 2^4.
If n=29, then a(29) = 29 since 29 = 29^1.
(End)
		

Crossrefs

Programs

  • GAP
    List(List(List(List([1..10^3], Factors), Collected), i -> i[1]), j -> j[1]^j[2]); # Muniru A Asiru, Jan 27 2018
  • Haskell
    a028233 = head . a141809_row
    -- Reinhard Zumkeller, Jun 04 2012, Aug 17 2011
    
  • Maple
    A028233 := proc(n)
        local spf,pf;
        if n = 1 then
            return 1 ;
        end if;
        spf := A020639(n) ;
        for pf in ifactors(n)[2] do
            if pf[1] = spf then
                return pf[1]^pf[2] ;
            end if;
        end do:
    end proc: # R. J. Mathar, Jul 09 2016
    # second Maple program:
    a:= n-> `if`(n=1, 1, (i->i[1]^i[2])(sort(ifactors(n)[2])[1])):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jan 29 2018
  • Mathematica
    a[n_] := Power @@ First[ FactorInteger[n]]; Table[a[n], {n, 1, 86}] (* Jean-François Alcover, Dec 01 2011 *)
  • PARI
    a(n)=if(n>1,n=factor(n);n[1,1]^n[1,2],1) \\ Charles R Greathouse IV, Apr 26 2012
    
  • Python
    from sympy import factorint
    def a(n):
        f = factorint(n)
        return 1 if n==1 else min(f)**f[min(f)] # Indranil Ghosh, May 12 2017
    
  • Scheme
    ;; Naive implementation of A020639 is given under that entry. All of these functions could be also defined with definec to make them faster on the later calls. See http://oeis.org/wiki/Memoization#Scheme
    (define (A028233 n) (if (< n 2) n (let ((lpf (A020639 n))) (let loop ((m lpf) (n (/ n lpf))) (cond ((not (zero? (modulo n lpf))) m) (else (loop (* m lpf) (/ n lpf)))))))) ;; Antti Karttunen, May 29 2017
    

Formula

a(n) = A020639(n)^A067029(n). - Reinhard Zumkeller, May 13 2006
a(n) = A141809(n,1). - Reinhard Zumkeller, Jun 04 2012
a(n) = n / A028234(n). - Antti Karttunen, May 29 2017

Extensions

Name edited to include a(1) = 1 by Franklin T. Adams-Watters, Jan 27 2018

A034684 If n = p_1^e_1 * ... * p_k^e_k, p_1 < ... < p_k primes, then a(n) = min { p_i^e_i }.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(1) = 1; for n > 1, smallest unitary divisor of n that is larger than 1.

Crossrefs

Programs

Formula

a(n) = min{A141809(n,k): k=1..A001221(n)}. - Reinhard Zumkeller, Jan 29 2013
a(n) = n/A052125(n). - Amiram Eldar, Sep 16 2024

A287352 Irregular triangle T(n,k) = A112798(n,1) followed by first differences of A112798(n).

Original entry on oeis.org

0, 1, 2, 1, 0, 3, 1, 1, 4, 1, 0, 0, 2, 0, 1, 2, 5, 1, 0, 1, 6, 1, 3, 2, 1, 1, 0, 0, 0, 7, 1, 1, 0, 8, 1, 0, 2, 2, 2, 1, 4, 9, 1, 0, 0, 1, 3, 0, 1, 5, 2, 0, 0, 1, 0, 3, 10, 1, 1, 1, 11, 1, 0, 0, 0, 0, 2, 3, 1, 6, 3, 1, 1, 0, 1, 0, 12, 1, 7, 2, 4, 1, 0, 0, 2, 13
Offset: 1

Views

Author

Michael De Vlieger, May 23 2017

Keywords

Comments

Irregular triangle T(n,k) = first differences of indices of prime divisors p of n.
Row lengths = (big) Omega(n) = A001222(n).
Row sums = A061395(n).
Row maxima = A286469(n).
We can concatenate the rows 1 <= n <= 28 as none of the values of k in this range exceed 9: {0, 1, 2, 10, 3, 11, 4, 100, 20, 12, 5, 101, 6, 13, 21, 1000, 7, 110, 8, 102, 22, 14, 9, 1001, 30, 15, 200, 103}; a(29) = {10}, which would require a digit greater than 9.
a(1) = 0 by convention.
a(0) is not defined (i.e., null set). a(n) is defined for positive nonzero n.
a(p) = A000720(p) for p prime.
a(p^e) = A000720(p) followed by (e - 1) zeros.
a(Product(p^e)) is the concatenation of the a(p^e) of the unitary prime power divisors p^e of n, sorted by the prime p (i.e. the function a(n) mapped across the terms of row n of A141809).
a(A002110(n)) = an array of n 1s.
T(n,k) could be used to furnish A054841(n). We read data in row n of T(n,k). If T(n,1) = 0, then write 0. If T(n,1) > 0, then increment the k-th place from the right. For k > 1, increment the k-th place to the right of the last-incremented place.
T(n,k) can be used to render n in decimal. If T(n,1) = 0, then write 1. If T(n,1) > 0, then multiply 1 by A000720(T(n,1)). For k > 1, multiply the previous product by pi(x) = A000720(x) of the running total of T(n,k) for each k.
Ignoring zeros in row n > 1 and decoding the remaining values of T(n,k) as immediately above yields the squarefree kernel of n = A007947(n).
Leading zeros of a(n) are trimmed, but as in decimal notation numbers that include leading zeros symbolize the same n as without them. Zeros that precede nonzero values merely multiply implicit 1 by itself until we encounter nonzero values. Thus, {0,0,2} = 1*1*pi(2) = 3, as {2} = pi(2) = 3. Because of this no row n > 1 has 0 for k = 1 of T(n,k).
Interpreting n written in binary as a row of a(n) yields A057335(n).

Examples

			a(1) = {0} by convention.
a(2) = {pi(2)} = {1}.
a(4) = {pi(2), pi(2) - pi(2)}, = {1, 0} since 4 = 2 * 2.
a(6) = {pi(2), pi(3) - pi(2)} = {1, 1} since 6 = 2 * 3.
a(12) = {pi(2), pi(2) - pi(2), pi(3) - pi(2) - pi(2)} = {1, 0, 1}, since 12 = 2 * 2 * 3.
The triangle starts:
   1:  0;
   2:  1;
   3:  2;
   4:  1, 0;
   5:  3;
   6:  1, 1;
   7:  4;
   8:  1, 0, 0;
   9:  2, 0;
  10:  1, 2;
  11:  5;
  12:  1, 0, 1;
  13:  6;
  14:  1, 3;
  15:  2, 1;
  16:  1, 0, 0, 0;
  17:  7;
  18:  1, 1, 0;
  19:  8;
  20:  1, 0, 2;
       ...
		

Crossrefs

Programs

  • Mathematica
    Table[Prepend[Differences@ #, First@ #] & Flatten[FactorInteger[n] /. {p_, e_} /; p > 0 :> ConstantArray[PrimePi@ p, e]], {n, 41}] // Flatten (* Michael De Vlieger, May 23 2017 *)

Formula

T(n,1) = A117798(n,1); T(n,k) = A117798(n,k) - A117798(n, k - 1) for 2 <= k <= A001222(n).

A375136 Number of maximal strictly increasing runs in the weakly increasing prime factors of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 3, 2, 1, 3, 2, 1, 1, 1, 5, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 4, 2, 2, 1, 2, 1, 3, 1, 3, 1, 1, 1, 2, 1, 1, 2, 6, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 2, 2, 1, 1, 1, 4, 4, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Aug 04 2024

Keywords

Comments

For n > 1, this is one more than the number of adjacent equal terms in the multiset of prime factors of n.

Examples

			The prime factors of 540 are {2,2,3,3,3,5}, with maximal strictly increasing runs ({2},{2,3},{3},{3,5}), so a(540) = 4.
		

Crossrefs

For compositions we have A124768, row-lengths of A374683, sum A374684.
For sum of prime indices we have A374706.
Row-lengths of A375128.
A112798 lists prime indices:
- distinct A001221
- length A001222
- leader A055396
- sum A056239
- reverse A296150

Programs

  • Mathematica
    Table[Length[Split[Flatten[ConstantArray@@@FactorInteger[n]],Less]],{n,100}]

Formula

For n > 1, a(n) = A046660(n) + 1 = A001222(n) - A001221(n) + 1.

A028236 If n = Product (p_j^k_j), a(n) = numerator of Sum 1/p_j^k_j.

Original entry on oeis.org

1, 1, 1, 1, 1, 5, 1, 1, 1, 7, 1, 7, 1, 9, 8, 1, 1, 11, 1, 9, 10, 13, 1, 11, 1, 15, 1, 11, 1, 31, 1, 1, 14, 19, 12, 13, 1, 21, 16, 13, 1, 41, 1, 15, 14, 25, 1, 19, 1, 27, 20, 17, 1, 29, 16, 15, 22, 31, 1, 47, 1, 33, 16, 1, 18, 61, 1, 21, 26, 59, 1, 17, 1, 39, 28, 23, 18, 71, 1, 21, 1, 43
Offset: 1

Views

Author

Keywords

Examples

			Fractions begin with 1, 1/2, 1/3, 1/4, 1/5, 5/6, 1/7, 1/8, 1/9, 7/10, 1/11, 7/12, ...
		

Crossrefs

Denominator is n (A000027).

Programs

  • Haskell
    a028236 n = sum $ map (div n) $ a141809_row n
    -- Reinhard Zumkeller, Nov 10 2013
  • Magma
    a028236:=func< k | k eq 1 select 1 else Numerator(&+[ f[i, 1]^-f[i,2]: i in [1..#f] ]) where f is Factorization(k) >; [ a028236(n):n in [1..82] ]; // Klaus Brockhaus, Nov 06 2010
    
  • Mathematica
    a[n_] := n * Total[1/Power @@@ FactorInteger[n]]; Array[a, 100] (* Amiram Eldar, Sep 29 2023 *)

Formula

Fraction is additive with a(p^e) = 1/p^e.
a(n) = Sum_{k=1..A001221(n)} n/A141809(n,k). - Reinhard Zumkeller, Nov 10 2013
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/k = Sum_{p prime} 1/(p*(p+1)) = 0.330229... (A179119). - Amiram Eldar, Sep 29 2023

Extensions

More terms from Erich Friedman

A080737 a(1) = a(2) = 0; for n > 2, the least dimension of a lattice possessing a symmetry of order n.

Original entry on oeis.org

0, 0, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4, 12, 6, 6, 8, 16, 6, 18, 6, 8, 10, 22, 6, 20, 12, 18, 8, 28, 6, 30, 16, 12, 16, 10, 8, 36, 18, 14, 8, 40, 8, 42, 12, 10, 22, 46, 10, 42, 20, 18, 14, 52, 18, 14, 10, 20, 28, 58, 8, 60, 30, 12, 32, 16, 12, 66, 18, 24, 10, 70, 10, 72, 36, 22, 20, 16, 14
Offset: 1

Views

Author

N. J. A. Sloane, Mar 08 2003

Keywords

Crossrefs

See A152455 for another version.

Programs

  • Haskell
    a080737 n = a080737_list !! (n-1)
    a080737_list = 0 : (map f [2..]) where
    f n | mod n 4 == 2 = a080737 $ div n 2
    | otherwise = a067240 n
    -- Reinhard Zumkeller, Jun 13 2012, Jun 11 2012
  • Mathematica
    a[1] = a[2] = 0; a[p_?PrimeQ] := a[p] = p-1; a[n_] := a[n] = If[Length[fi = FactorInteger[n]] == 1, EulerPhi[n], Total[a /@ (fi[[All, 1]]^fi[[All, 2]])]]; Table[a[n], {n, 1, 78}] (* Jean-François Alcover, Jun 20 2012 *)
  • PARI
    for(n=1,78,k=0; if(n>1,f=factor(n); k=sum(j=1,matsize(f)[1],eulerphi(f[j,1]^f[j,2])); if(f[1,1]==2&&f[1,2]==1,k--)); print1(k,",")) \\ Klaus Brockhaus, Mar 10 2003
    

Formula

For n > 2, a(2^r) = 2^(r-1) with r>1, a(p^r) = phi(p^r) with p > 2 prime, r >= 1, where phi is Euler's function A000010; in general if a(Product p_i^e_i) = Sum a(p_i^e_i).

Extensions

More terms from Klaus Brockhaus, Mar 10 2003
Showing 1-10 of 21 results. Next