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

A286564 Triangular table A286563 reversed.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 20 2017

Keywords

Comments

See A286563.

Examples

			The first fifteen rows of this triangular table:
  1,
  1, 1,
  1, 0, 1,
  1, 0, 2, 1,
  1, 0, 0, 0, 1,
  1, 0, 0, 1, 1, 1,
  1, 0, 0, 0, 0, 0, 1,
  1, 0, 0, 0, 1, 0, 3, 1,
  1, 0, 0, 0, 0, 0, 2, 0, 1,
  1, 0, 0, 0, 0, 1, 0, 0, 1, 1,
  1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
  1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 1,
  1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
  1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1,
  1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1
		

Crossrefs

Cf. A169594 (row sums).

Programs

  • Mathematica
    Table[If[k == 1, 1, IntegerExponent[n, k]], {n, 15}, {k, n, 1, -1}] // Flatten (* Michael De Vlieger, May 20 2017 *)
  • Python
    def T(n, k):
        i=1
        if k==1: return 1
        while n%(k**i)==0:
            i+=1
        return i-1
    for n in range(1, 21): print([T(n, k) for k in range(1, n + 1)] [::-1]) # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286564 n) (A286561bi (A002024 n) (A004736 n))) ;; For A286561bi see A286561.
    

A046660 Excess of n = number of prime divisors (with multiplicity) - number of prime divisors (without multiplicity).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24 = 2^3 * 3 and 375 = 3 * 5^3 both have prime signature (3, 1).
a(n) = 0 for squarefree n.
A162511(n) = (-1)^a(n). - Reinhard Zumkeller, Jul 08 2009
a(n) = the number of divisors of n that are each a composite power of a prime. - Leroy Quet, Dec 02 2009
a(A005117(n)) = 0; a(A060687(n)) = 1; a(A195086(n)) = 2; a(A195087(n)) = 3; a(A195088(n)) = 4; a(A195089(n)) = 5; a(A195090(n)) = 6; a(A195091(n)) = 7; a(A195092(n)) = 8; a(A195093(n)) = 9; a(A195069(n)) = 10. - Reinhard Zumkeller, Nov 29 2015

References

  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, pp. 51-52.

Crossrefs

Programs

  • Haskell
    import Math.NumberTheory.Primes.Factorisation (factorise)
    a046660 n = sum es - length es where es = snd $ unzip $ factorise n
    -- Reinhard Zumkeller, Nov 28 2015, Jan 09 2013
    
  • Maple
    with(numtheory); A046660 := n -> bigomega(n)-nops(factorset(n)):
    seq(A046660(k), k=1..100); # Wesley Ivan Hurt, Oct 27 2013
    # Or:
    with(NumberTheory): A046660 := n -> NumberOfPrimeFactors(n) - NumberOfPrimeFactors(n, 'distinct'):  # Peter Luschny, Jul 14 2023
  • Mathematica
    Table[PrimeOmega[n] - PrimeNu[n], {n, 50}] (* or *) muf[n_] := Module[{fi = FactorInteger[n]}, Total[Transpose[fi][[2]]] - Length[fi]]; Array[muf, 50] (* Harvey P. Dale, Sep 07 2011. The second program is several times faster than the first program for generating large numbers of terms. *)
  • PARI
    a(n)=bigomega(n)-omega(n) \\ Charles R Greathouse IV, Nov 14 2012
    
  • PARI
    a(n)=my(f=factor(n)[,2]); vecsum(f)-#f \\ Charles R Greathouse IV, Aug 01 2016
    
  • Python
    from sympy import factorint
    def A046660(n): return sum(e-1 for e in factorint(n).values()) # Chai Wah Wu, Jul 18 2023

Formula

a(n) = Omega(n) - omega(n) = A001222(n) - A001221(n).
Additive with a(p^e) = e - 1.
a(n) = Sum_{k = 1..A001221(n)} (A124010(n,k) - 1). - Reinhard Zumkeller, Jan 09 2013
G.f.: Sum_{p prime, k>=2} x^(p^k)/(1 - x^(p^k)). - Ilya Gutkovskiy, Jan 06 2017
Asymptotic mean: lim_{m->oo} (1/m) Sum_{k=1..m} a(k) = Sum_{p prime} 1/(p*(p-1)) = 0.773156... (A136141). - Amiram Eldar, Jul 28 2020
a(n) = Sum_{p|n} A286563(n/p,p), where p is prime. - Ridouane Oudra, Sep 13 2023
a(n) = A275812(n) - A056170(n). - Amiram Eldar, Jan 09 2024
a(n) = A001222(A003557(n)). - Peter Munn, Feb 06 2024

Extensions

More terms from David W. Wilson

A286561 Square array A(n,k): A(n,1) = 1, and for k > 1, A(n,k) = the highest exponent e such that k^e divides n, read by descending antidiagonals as A(1,1), A(1,2), A(2,1), etc.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 20 2017

Keywords

Examples

			The top left 18 X 18 corner of the array:
  n \k 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18
     .-----------------------------------------------------
   1 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   2 | 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   3 | 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   4 | 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   5 | 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   6 | 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   7 | 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   8 | 1, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   9 | 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
  10 | 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
  11 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
  12 | 1, 2, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
  13 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
  14 | 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
  15 | 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
  16 | 1, 4, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0
  17 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0
  18 | 1, 1, 2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1
  ---------------------------------------------------------
A(18,2) = 1, because 2^1 divides 18, but 2^2 does not. A(18,3) = 2, because 3^2 divides 18 (but 3^3 does not). A(18,4) = 0, because 4^0 (= 1) divides 18, but 4^1 does not. A(18,18) = 1, because 18^1 divides 18, but 18^2 does not.
A(2,18) = 0, because 18^0 divides 2, but 18^1 does not.
		

Crossrefs

Cf. A286562 (transpose), A286563 (lower triangular region), A286564 (lower triangular region reversed).
Cf. A169594 (row sums), also A168512, A178638, A186643.
Cf. also array A286156.

Programs

  • Mathematica
    Table[Function[m, If[k == 1, 1, IntegerExponent[m, k]]][n - k + 1], {n, 15}, {k, n}] // TableForm (* Michael De Vlieger, May 20 2017 *)
  • PARI
    A286561(n,k) = if(1==k, 1, valuation(n, k)); \\ Antti Karttunen, May 27 2017
    
  • Python
    def a(n, k):
        i=1
        if k==1: return 1
        while n%(k**i)==0:
            i+=1
        return i-1
    for n in range(1, 21): print([a(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286561 n) (A286561bi (A002260 n) (A004736 n)))
    (define (A286561bi row col) (if (= 1 col) 1 (let loop ((i 1)) (if (not (zero? (modulo row (expt col i)))) (- i 1) (loop (+ 1 i))))))
    

A169594 Number of divisors of n, counting divisor multiplicity in n.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 6, 4, 4, 2, 7, 2, 4, 4, 9, 2, 7, 2, 7, 4, 4, 2, 10, 4, 4, 6, 7, 2, 8, 2, 11, 4, 4, 4, 12, 2, 4, 4, 10, 2, 8, 2, 7, 7, 4, 2, 14, 4, 7, 4, 7, 2, 10, 4, 10, 4, 4, 2, 13, 2, 4, 7, 15, 4, 8, 2, 7, 4, 8, 2, 16, 2, 4, 7, 7, 4, 8, 2, 14, 9, 4, 2, 13, 4, 4, 4, 10, 2, 13, 4, 7, 4, 4, 4, 17, 2, 7
Offset: 1

Views

Author

Joseph L. Pe, Dec 02 2009

Keywords

Comments

The multiplicity of a divisor d > 1 in n is defined as the largest power i for which d^i divides n; and for d = 1 it is defined as 1.
a(n) is also the sum of the multiplicities of the divisors of n.
In other words, a(n) = 1 + sum of the highest exponents e_i for which each number k_i in range 2 .. n divide n, as {k_i}^{e_i} | n. For nondivisors of n this exponent e_i is 0, for n itself it is 1. - Antti Karttunen, May 20 2017
From Gus Wiseman, Mar 25 2021: (Start)
Also the number of strict chains of divisors ending with n and having constant (equal) first quotients. The case starting with 1 is A089723. For example, the a(1) = 1 through a(12) = 7 chains are:
1 2 3 4 5 6 7 8 9 10 11 12
1|2 1|3 1|4 1|5 1|6 1|7 1|8 1|9 1|10 1|11 1|12
2|4 2|6 2|8 3|9 2|10 2|12
1|2|4 3|6 4|8 1|3|9 5|10 3|12
2|4|8 4|12
1|2|4|8 6|12
3|6|12
(End)
a(n) depends only on the prime signature of n. - David A. Corneth, Mar 28 2021

Examples

			The divisors of 8 are 1, 2, 4, 8 of multiplicity 1, 3, 1, 1, respectively. So a(8) = 1 + 3 + 1 + 1 = 6.
		

Crossrefs

Cf. A168512.
Row sums of A286561, A286563 and A286564.
A001055 counts factorizations (strict: A045778, ordered: A074206).
A057567 counts chains of divisors with weakly increasing first quotients.
A067824 counts strict chains of divisors ending with n.
A253249 counts strict chains of divisors.
A334997 counts chains of divisors of n by length.
A342086 counts chains of divisors with strictly increasing first quotients.
A342496 counts partitions with equal first quotients (strict: A342515, ranking: A342522, ordered: A342495).
A342530 counts chains of divisors with distinct first quotients.
First differences of A078651.

Programs

  • Maple
    a := n -> ifelse(n < 2, 1, 1 + add(padic:-ordp(n, k), k = 2..n)):
    seq(a(n), n = 1..98);  # Peter Luschny, Apr 10 2025
  • Mathematica
    divmult[d_, n_] := Module[{output, i}, If[d == 1, output = 1, If[d == n, output = 1, i = 0; While[Mod[n, d^(i + 1)] == 0, i = i + 1]; output = i]]; output]; dmt0[n_] := Module[{divs, l}, divs = Divisors[n]; l = Length[divs]; Sum[divmult[divs[[i]], n], {i, 1, l}]]; Table[dmt0[i], {i, 1, 40}]
    Table[1 + DivisorSum[n, IntegerExponent[n, #] &, # > 1 &], {n, 98}] (* Michael De Vlieger, May 20 2017 *)
  • PARI
    A286561(n,k) = { my(i=1); if(1==k, 1, while(!(n%(k^i)), i = i+1); (i-1)); };
    A169594(n) = sumdiv(n,d,A286561(n,d)); \\ Antti Karttunen, May 20 2017
    
  • PARI
    a(n) = { if(n == 1, return(1)); my(f = factor(n), u = vecmax(f[, 2]), cf = f, res = numdiv(f) - u + 1); for(i = 2, u, cf[, 2] = f[, 2]\i; res+=numdiv(factorback(cf)) ); res } \\ David A. Corneth, Mar 29 2021
    
  • PARI
    A169594(n) = {my(s=0, k=2); while(k<=n, s+=valuation(n, k); k=k+1); s + 1} \\ Zhuorui He, Aug 28 2025
    
  • Python
    def a286561(n, k):
        i=1
        if k==1: return 1
        while n%(k**i)==0:
            i+=1
        return i-1
    def a(n): return sum([a286561(n, d) for d in divisors(n)]) # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A169594 n) (add (lambda (k) (A286561bi n k)) 1 n))
    ;; Implements sum_{i=lowlim..uplim} intfun(i)
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))
    ;; For A286561bi see A286561. - Antti Karttunen, May 20 2017
    

Formula

From Friedjof Tellkamp, Feb 29 2024: (Start)
a(n) = A309891(n) + 1.
G.f.: x/(1-x) + Sum_{k>=2, j>=1} x^(k^j)/(1-x^(k^j)).
Dirichlet g.f.: zeta(s) * (1 + Sum_{k>=1} (zeta(k*s) - 1)).
Sum_{n>=1} a(n)/n^2 = (7/24) * Pi^2. (End)

Extensions

Extended by Ray Chandler, Dec 08 2009

A161189 Set a(n) = k if n is in the set zeta(k) - 1 in the notation defined by William J. Keith in 2010.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Jun 06 2009

Keywords

Comments

The numbers 2, 3, and 4 occur with density 0.929... since (zeta(2) - 1) + (zeta(3) - 1) + (zeta(4) - 1) = (Pi^2/6 - 1) + 0.20205... + 0.0823... = 0.929...
From Kevin Ryde, Dec 05 2020: (Start)
a(n) can be calculated by writing n-1 in the following mixed-radix expansion,
.. m m ... m m m-1 ... 3 2 radix
.. !=m-1 m-1 ... m-1 0 !=0 ... !=0 !=0 digit of n-1
|-----j-----| a(n) = j+2
The least significant digit is radix 2, the next is radix 3, etc., until a 0 digit is found at radix m. Further higher digits are radix m. j is the number of consecutive m-1 digits immediately above the 0. That part of n-1 is floor((n-1)/m!) and is equal to floor(n/m!) since any carry when incrementing n-1 to n will not go past the 0 digit.
Those n in class k, i.e., a(n)=k, can be characterized by certain sets of remainders n mod m^(k-1)*m! for each m >= 2. The modulus covers digits up to and including !=m-1 for the given k. There are (m-1)! combinations of permitted digit values within the modulus, so density (m-1)!/(m^(k-1)*m!) = 1/m^k (and total Sum_{m>=2} 1/m^k = zeta(k)-1).
The smallest n with a(n)=k is n = 2^(k-1)-1. This is m=2 and n-1 = binary 011..110 where the number of 1's is j=k-2.
(End)

Examples

			Examples: A143028 gives a subset of terms within the natural number system that tend to density zeta(2) - 1 = Pi^2/6 - 1 = 0.644...: where A143028 = [1, 2, 4, 5, 6, 8, 9, 10, 12, ...]. Terms a(1), a(2), a(4), ... = 2.
Similarly, zeta(3) - 1 = 0.20205..., denoted by A143029: [3, 11, 14, 19, 27, 32, ...]; so terms a(3), a(11), a(14), ... = 3.
From _Kevin Ryde_, Dec 05 2020: (Start)
For n = 880644, the mixed-radix expansion of n-1 is
            m           lowest 0 digit gives m
  6 6  6 6  6 5 4 3 2   radix
  5 3  5 5  0 3 1 2 1   digit of n-1
      |---|             2 digits m-1, a(n)=2+2=4
(End)
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = n - 1, m = 2, r}, While[{k, r} = QuotientRemainder[k, m]; r != 0, m++]; IntegerExponent[k + 1, m] + 2]; Array[a, 30] (* Amiram Eldar, Feb 15 2021 after Kevin Ryde's PARI code *)
  • PARI
    a(n) = n--; my(m=2,r); while([n,r]=divrem(n,m); r!=0, m++); 2+valuation(n+1,m); \\ Kevin Ryde, Dec 05 2020

Formula

Given [Keith's array, section 4]; and A143028 through A143034, which partitions the set of natural numbers according to asymptotic density of zeta(k) - 1:
A2 = [1, 2, 4, 5, 6, 10, 12, ...] = A143028, density zeta(2) - 1 = 0.6449...
A3 = [3, 11, 14, 19, 27, 32, ...] = A143029, density zeta(3) - 1 = 0.2020...
A4 = [7, 23, 39, 50, 55, 71, ...] = A143030, density zeta(4) - 1 = 0.0823...
A5 = [15, 47, 79, 111, 143, ...] = A143031, density zeta(5) - 1 = ........ etc., where Sum_{k>=2} (zeta(k) - 1) = 1.0 or 100%; such that "2" will occur with a frequency zeta(2) - 1 = 0.644...; "3" will occur with the frequency zeta(3) - 1 = 0.20205...; and "k" will occur with the frequency zeta(k) - 1. Thus a(n) = the zeta(k) - 1 subset to which n belongs, according to the system discovered by Keith.
From Kevin Ryde, Dec 05 2020: (Start)
a(n) = j+2 where n = L + m!*(b[0]*m^0 + b[1]*m^1 + b[2]*m^2 + ...) where m=A339013(n), L in the range 0 < L < m!, each digit b[i] in the range 0 <= b[i] < m, and smallest j where b[j] != m-1. [Keith, section 3]
a(n) = 2 + A286563(1+floor(n/m!), m), where m=A339013(n) and A286563(q,m) is the m-adic valuation of q (including A286563(q,m)=0 when m>q).
(End)
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=2} k*(zeta(k)-1) = Pi^2/6 + 1. - Amiram Eldar, Feb 15 2021

A168512 Sum of divisors of n weighted by divisor multiplicity in n.

Original entry on oeis.org

1, 3, 4, 9, 6, 12, 8, 19, 16, 18, 12, 30, 14, 24, 24, 41, 18, 42, 20, 44, 32, 36, 24, 64, 36, 42, 46, 58, 30, 72, 32, 75, 48, 54, 48, 102, 38, 60, 56, 94, 42, 96, 44, 86, 81, 72, 48, 134, 64, 98, 72, 100, 54, 126, 72, 124, 80, 90, 60, 170, 62, 96, 107, 153, 84, 144, 68, 128, 96
Offset: 1

Views

Author

Joseph L. Pe, Nov 28 2009

Keywords

Comments

If d > 1 divides n, the multiplicity of d in n is the largest integer i such that d^i divides n; e.g. the multiplicity of 4 in 16 is 2. If d = 1 (degenerate case), then the multiplicity of d is defined as 1.

Examples

			The divisors of 16 are 1, 2, 4, 8, 16, which are of multiplicity 1, 4, 2, 1, 1, respectively, in 16. So a(16) = 1*1 + 4*2 + 2*4 + 1*8 + 1*16 = 41.
		

Crossrefs

Programs

  • Mathematica
    Table[1 + Total[Function[i, i*Select[Range[Log[i, n]], Divisible[n, i^#] &][[-1]]] /@ Rest@Divisors@n], {n, 69}] (* Ivan Neretin, Jul 26 2015 *)
    Table[1 + DivisorSum[n, # IntegerExponent[n, #] &, # > 1 &], {n, 69}] (* Michael De Vlieger, May 20 2017 *)
  • PARI
    A286561(n,k) = { my(i=1); if(1==k, 1, while(!(n%(k^i)), i = i+1); (i-1)); };
    A168512(n) = sumdiv(n,d,A286561(n,d)*d); \\ Antti Karttunen, May 20 2017

Formula

a(n) = Sum_{d|n} A286561(n,d)*d. - Antti Karttunen, May 20 2017

Extensions

Extended by Ray Chandler, Dec 08 2009

A286562 Transpose of square array A286561.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 20 2017

Keywords

Comments

See A286561 and A286563.

Examples

			The top left 16 X 16 corner of the array:
  n \ k
     \ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16
     .-----------------------------------------------
   1 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
   2 | 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4
   3 | 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0
   4 | 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2
   5 | 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0
   6 | 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
   7 | 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0
   8 | 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1
   9 | 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
  10 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
  11 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
  12 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
  13 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
  14 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0
  15 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0
  16 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
The array is read by descending antidiagonals.
		

Crossrefs

Programs

  • Python
    def a(n, k):
        i=1
        if k==1: return 1
        while n%(k**i)==0:
            i+=1
        return i-1
    for n in range(1, 21): print([a(k, n - k + 1) for k in range(1, n + 1)][::-1]) # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286562 n) (A286561bi (A004736 n) (A002260 n))) ;; For A286561bi see A286561.
    

A382882 Triangle read by rows: T(n, k) = k^ord(n, k) where ord(n, k) is the p-adic order if n and k >= 2, 1 if k = 1, and 0^n if k = 0.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Apr 07 2025

Keywords

Examples

			Triangle starts;
   [0] 0;
   [1] 1, 1;
   [2] 1, 1, 2;
   [3] 1, 1, 1, 3;
   [4] 1, 1, 4, 1, 4;
   [5] 1, 1, 1, 1, 1, 5;
   [6] 1, 1, 2, 3, 1, 1, 6;
   [7] 1, 1, 1, 1, 1, 1, 1, 7;
   [8] 1, 1, 8, 1, 4, 1, 1, 1, 8;
   [9] 1, 1, 1, 9, 1, 1, 1, 1, 1, 9;
  [10] 1, 1, 2, 1, 1, 5, 1, 1, 1, 1, 10;
		

Crossrefs

Cf. A364813 (row product), A381886, A286563.

Programs

  • Maple
    ord := proc(n, d) if d = 1 then 1 elif d = 0 then ifelse(n = 0, 1, 0) else padic:-ordp(n, d) fi end: Trow := n -> local k; seq(k^ord(n, k), k = 0..n): seq(Trow(n), n = 0..12);
  • Mathematica
    T[n_, 0] := If[n == 0, 0, 1]; T[n_, 1] := 1; T[n_, k_] := k^IntegerExponent[n, k];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // MatrixForm
Showing 1-8 of 8 results.