A072411
LCM of exponents in prime factorization of n, a(1) = 1.
Original entry on oeis.org
1, 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, 2, 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, 6, 1, 1, 2, 2, 1, 1, 1, 4, 4, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 5, 1, 2, 2, 2, 1, 1, 1, 3, 1, 1, 1, 6, 1, 1, 1, 4, 1, 1, 1, 2, 2, 1, 1, 3
Offset: 1
n = 288 = 2*2*2*2*2*3*3; lcm(5,2) = 10; Product(5,2) = 10, max(5,2) = 5;
n = 180 = 2*2*3*3*5; lcm(2,2,1) = 2; Product(2,2,1) = 4; max(2,2,1) = 2; it deviates both from maximum of exponents (A051903, for the first time at n=72), and product of exponents (A005361, for the first time at n=36).
For n = 36 = 2*2*3*3 = 2^2 * 3^2 we have a(36) = lcm(2,2) = 2.
For n = 72 = 2*2*2*3*3 = 2^3 * 3^2 we have a(72) = lcm(2,3) = 6.
For n = 144 = 2^4 * 3^2 we have a(144) = lcm(2,4) = 4.
For n = 360 = 2^3 * 3^2 * 5^1 we have a(360) = lcm(1,2,3) = 6.
Differs from
A290107 for the first time at n=144.
After the initial term, differs from
A157754 for the first time at n=360.
-
Table[LCM @@ Last /@ FactorInteger[n], {n, 2, 100}] (* Ray Chandler, Jan 24 2006 *)
-
a(n) = lcm(factor(n)[,2]); \\ Michel Marcus, Mar 25 2017
-
from sympy import lcm, factorint
def a(n):
l=[]
f=factorint(n)
for i in f: l+=[f[i],]
return lcm(l)
print([a(n) for n in range(1, 151)]) # Indranil Ghosh, Mar 25 2017
a(1) = 1 prepended and the data section filled up to 120 terms by
Antti Karttunen, Aug 09 2016
A112526
Characteristic function for powerful numbers.
Original entry on oeis.org
1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
Offset: 1
a(72) = 1 because 72 = 2^3*3^2 has all exponents > 1.
Differs from characteristic function of perfect powers
A075802 at Achilles numbers
A052486.
-
a112526 1 = 1
a112526 n = fromEnum $ (> 1) $ minimum $ a124010_row n
-- Reinhard Zumkeller, Jun 03 2015, Sep 16 2011
-
cfpn[n_]:=If[n==1||Min[Transpose[FactorInteger[n]][[2]]]>1,1,0]; Array[ cfpn,120] (* Harvey P. Dale, Jul 17 2012 *)
-
for(n=1, 100, print1(direuler(p=2, n, (1+X^3)/(1-X^2))[n], ", ")) \\ Vaclav Kotesovec, Jul 15 2022
-
a(n) = ispowerful(n); \\ Amiram Eldar, Jul 02 2025
-
from sympy import factorint
def A112526(n): return int(all(e>1 for e in factorint(n).values())) # Chai Wah Wu, Sep 15 2024
A008479
Number of numbers <= n with same prime factors as n.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 4, 1, 3, 1, 2, 1, 1, 1, 4, 2, 1, 3, 2, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 6, 2, 4, 1, 2, 1, 7, 1, 3, 1, 1, 1, 2, 1, 1, 2, 6, 1, 1, 1, 2, 1, 1, 1, 8, 1, 1, 3, 2, 1, 1, 1, 5, 4, 1, 1, 2, 1, 1, 1, 3, 1, 3, 1, 2, 1, 1, 1, 9
Offset: 1
- T. D. Noe, Table of n, a(n) for n = 1..10000
- Paul Erdős and T. Motzkin, Problem 5735, Amer. Math. Monthly, 78 (1971), 680-681. (Incorrect solution!)
- H. N. Shapiro, Problem 5735, Amer. Math. Monthly, 97 (1990), 937.
-
N:= 100: # to get a(1)..a(N)
V:= Vector(N):
V[1]:= 1:
for n from 2 to N do
if V[n] = 0 then
S:= {n};
for p in numtheory:-factorset(n) do
S := S union {seq(seq(s*p^k,k=1..floor(log[p](N/s))),s=S)};
od:
S:= sort(convert(S,list));
for k from 1 to nops(S) do V[S[k]]:= k od:
fi
od:
convert(V,list); # Robert Israel, May 20 2016
-
PkTbl=Prepend[ Array[ Times @@ First[ Transpose[ FactorInteger[ # ] ] ]&, 100, 2 ], 1 ];1+Array[ Count[ Take[ PkTbl, #-1 ], PkTbl[ [ # ] ] ]&, Length[ PkTbl ] ]
Count[#, k_ /; k == Last@ #] & /@ Function[s, Take[s, #] & /@ Range@ Length@ s]@ Array[Map[First, FactorInteger@ #] &, 120] (* or *)
Table[Sum[(Floor[n^k/k] - Floor[(n^k - 1)/k]) (Floor[k^n/n] - Floor[(k^n - 1)/n]), {k, n}], {n, 120}] (* Michael De Vlieger, May 20 2016 *)
-
a(n)=my(f=factor(n)[,1], s); forvec(v=vector(#f, i, [1, logint(n, f[i])]), if(prod(i=1, #f, f[i]^v[i])<=n, s++)); s \\ Charles R Greathouse IV, Oct 19 2017
-
(define (A008479 n) (if (not (zero? (A008683 n))) 1 (+ 1 (A008479 (A285328 n))))) ;; Antti Karttunen, Apr 17 2017
A307958
Coreful perfect numbers: numbers k such that csigma(k) = 2*k, where csigma(k) is the sum of the coreful divisors of k (A057723).
Original entry on oeis.org
36, 180, 252, 392, 396, 468, 612, 684, 828, 1044, 1116, 1176, 1260, 1332, 1476, 1548, 1692, 1908, 1960, 1980, 2124, 2196, 2340, 2412, 2556, 2628, 2772, 2844, 2988, 3060, 3204, 3276, 3420, 3492, 3636, 3708, 3852, 3924, 4068, 4140, 4284, 4312, 4572, 4716, 4788
Offset: 1
36 is in the sequence since its coreful divisors are 6, 12, 18, 36, whose sum is 72 = 2 * 36.
-
f[p_,e_] := (p^(e+1)-1)/(p-1)-1; a[1]=1; a[n_] := Times @@ (f @@@ FactorInteger[n]); s={}; Do[If[a[n] == 2n, AppendTo[s,n]], {n, 1, 10^6}]; s
-
rad(n) = factorback(factorint(n)[, 1]); \\ A007947
s(n) = rad(n)*sigma(n/rad(n)); \\ A057723
isok(n) = s(n) == 2*n; \\ Michel Marcus, May 14 2019
A227349
Product of lengths of runs of 1-bits in binary representation of n.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 3, 2, 2, 2, 4, 3, 3, 4, 5, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 3, 4, 2, 2, 2, 4, 2, 2, 4, 6, 3, 3, 3, 6, 4, 4, 5, 6, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 3, 2, 2, 2, 4, 3, 3, 4, 5, 2, 2, 2, 4, 2, 2, 4, 6, 2, 2, 2, 4, 4, 4, 6, 8, 3, 3, 3, 6, 3, 3, 6, 9, 4
Offset: 0
a(0) = 1, as zero has no runs of 1's, and an empty product is 1.
a(1) = 1, as 1 is "1" in binary, and the length of that only 1-run is 1.
a(2) = 1, as 2 is "10" in binary, and again there is only one run of 1-bits, of length 1.
a(3) = 2, as 3 is "11" in binary, and there is one run of two 1-bits.
a(55) = 6, as 55 is "110111" in binary, and 2 * 3 = 6.
a(119) = 9, as 119 is "1110111" in binary, and 3 * 3 = 9.
From _Omar E. Pol_, Feb 10 2015: (Start)
Written as an irregular triangle in which row lengths is A011782:
1;
1;
1,2;
1,1,2,3;
1,1,1,2,2,2,3,4;
1,1,1,2,1,1,2,3,2,2,2,4,3,3,4,5;
1,1,1,2,1,1,2,3,1,1,1,2,2,2,3,4,2,2,2,4,2,2,4,6,3,3,3,6,4,4,5,6;
...
Right border gives A028310: 1 together with the positive integers. (End)
From _Omar E. Pol_, Mar 19 2015: (Start)
Also, the sequence can be written as an irregular tetrahedron T(s, r, k) as shown below:
1;
..
1;
..
1;
2;
....
1,1;
2;
3;
........
1,1,1,2;
2,2;
3;
4;
................
1,1,1,2,1,1,2,3;
2,2,2,4;
3,3;
4;
5;
................................
1,1,1,2,1,1,2,3,1,1,1,2,2,2,3,4;
2,2,2,4,2,2,4,6;
3,3,3,6;
4,4;
5;
6;
...
Apart from the initial 1, we have that T(s, r, k) = T(s+1, r, k). (End)
Cf.
A000120 (sum of lengths of runs of 1-bits),
A167489,
A227350,
A227193,
A278222,
A245562,
A284562,
A284569,
A283972,
A284582,
A284583.
Differs from similar
A284580 for the first time at n=119, where a(119) = 9, while
A284580(119) = 5.
-
a:= proc(n) local i, m, r; m, r:= n, 1;
while m>0 do
while irem(m, 2, 'h')=0 do m:=h od;
for i from 0 while irem(m, 2, 'h')=1 do m:=h od;
r:= r*i
od; r
end:
seq(a(n), n=0..100); # Alois P. Heinz, Jul 11 2013
ans:=[];
for n from 0 to 100 do lis:=[]; t1:=convert(n, base, 2); L1:=nops(t1); out1:=1; c:=0;
for i from 1 to L1 do
if out1 = 1 and t1[i] = 1 then out1:=0; c:=c+1;
elif out1 = 0 and t1[i] = 1 then c:=c+1;
elif out1 = 1 and t1[i] = 0 then c:=c;
elif out1 = 0 and t1[i] = 0 then lis:=[c, op(lis)]; out1:=1; c:=0;
fi;
if i = L1 and c>0 then lis:=[c, op(lis)]; fi;
od:
a:=mul(i, i in lis);
ans:=[op(ans), a];
od:
ans; # N. J. A. Sloane, Sep 05 2014
-
onBitRunLenProd[n_] := Times @@ Length /@ Select[Split @ IntegerDigits[n, 2], #[[1]] == 1 & ]; Array[onBitRunLenProd, 100, 0] (* Jean-François Alcover, Mar 02 2016 *)
-
from operator import mul
from functools import reduce
from re import split
def A227349(n):
return reduce(mul, (len(d) for d in split('0+',bin(n)[2:]) if d)) if n > 0 else 1 # Chai Wah Wu, Sep 07 2014
-
# uses[RLT from A246660]
A227349_list = lambda len: RLT(lambda n: n, len)
A227349_list(88) # Peter Luschny, Sep 07 2014
-
(define (A227349 n) (apply * (bisect (reverse (binexp->runcount1list n)) (- 1 (modulo n 2)))))
(define (bisect lista parity) (let loop ((lista lista) (i 0) (z (list))) (cond ((null? lista) (reverse! z)) ((eq? i parity) (loop (cdr lista) (modulo (1+ i) 2) (cons (car lista) z))) (else (loop (cdr lista) (modulo (1+ i) 2) z)))))
(define (binexp->runcount1list n) (if (zero? n) (list) (let loop ((n n) (rc (list)) (count 0) (prev-bit (modulo n 2))) (if (zero? n) (cons count rc) (if (eq? (modulo n 2) prev-bit) (loop (floor->exact (/ n 2)) rc (1+ count) (modulo n 2)) (loop (floor->exact (/ n 2)) (cons count rc) 1 (modulo n 2)))))))
A091050
Number of divisors of n that are perfect powers.
Original entry on oeis.org
1, 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, 4, 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, 5, 1, 1, 2, 2, 1, 1, 1, 4, 4, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 5, 1, 2, 2, 4, 1, 1
Offset: 1
Divisors of n=108: {1,2,3,4,6,9,12,18,27,36,54,108},
a(108) = #{1^2, 2^2, 3^2, 3^3, 6^2} = 5.
-
a091050 = sum . map a075802 . a027750_row
-- Reinhard Zumkeller, Dec 13 2012
-
ppQ[n_] := GCD @@ Last /@ FactorInteger@ n > 1; ppQ[1] = True; f[n_] := Length@ Select[ Divisors@ n, ppQ]; Array[f, 105] (* Robert G. Wilson v, Dec 12 2012 *)
-
a(n) = 1+ sumdiv(n, d, ispower(d)>1); \\ Michel Marcus, Sep 21 2014
-
a(n)={my(f=factor(n)[,2]); 1 + if(#f, sum(k=2, vecmax(f), moebius(k)*(1 - prod(i=1, #f, 1 + f[i]\k))))} \\ Andrew Howroyd, Aug 30 2020
A000026
Mosaic numbers or multiplicative projection of n: if n = Product (p_j^k_j) then a(n) = Product (p_j * k_j).
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 7, 6, 6, 10, 11, 12, 13, 14, 15, 8, 17, 12, 19, 20, 21, 22, 23, 18, 10, 26, 9, 28, 29, 30, 31, 10, 33, 34, 35, 24, 37, 38, 39, 30, 41, 42, 43, 44, 30, 46, 47, 24, 14, 20, 51, 52, 53, 18, 55, 42, 57, 58, 59, 60, 61, 62, 42, 12, 65, 66, 67, 68, 69, 70, 71, 36
Offset: 1
24 = 2^3*3^1, a(24) = 2*3*3*1 = 18.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- T. D. Noe, Table of n, a(n) for n = 1..10000
- R. A. Gillman, The Average Size of a Certain Arithmetic Function, A6660 solution, Amer. Math. Monthly, 100 (1993), pp. 296-298.
- B. Gordon and M. M. Robertson, Two theorems on mosaics, Canad. J. Math., 17 (1965), 1010-1014.
- A. A. Mullin, Some related number-theoretic functions, Research Problem 4, Bull. Amer. Math. Soc., 69 (1963), 446-447.
- Daniel Tsai, A recurring pattern in natural numbers of a certain property, Integers (2021) Vol. 21, Article #A32.
-
a000026 n = f a000040_list n 1 (0^(n-1)) 1 where
f _ 1 q e y = y * e * q
f ps'@(p:ps) x q e y
| m == 0 = f ps' x' p (e+1) y
| e > 0 = f ps x q 0 (y * e * q)
| x < p * p = f ps' 1 x 1 y
| otherwise = f ps x 1 0 y
where (x', m) = divMod x p
a000026_list = map a000026 [1..]
-- Reinhard Zumkeller, Aug 27 2011
-
A000026 := proc(n) local e,j; e := ifactors(n)[2]:
mul(e[j][1]*e[j][2], j=1..nops(e)) end:
seq(A000026(n), n=1..80); # Peter Luschny, Jan 17 2011
-
Array[ Times@@Flatten[ FactorInteger[ # ] ]&, 100 ]
-
a(n)=local(f); if(n<1,0,f=factor(n); prod(k=1,matsize(f)[1],f[k,1]*f[k,2]))
-
a(n)=my(f=factor(n)); factorback(f[,1])*factorback(f[,2]) \\ Charles R Greathouse IV, Apr 04 2016
-
from math import prod
from sympy import factorint
def a(n): f = factorint(n); return prod(p*f[p] for p in f)
print([a(n) for n in range(1, 73)]) # Michael S. Branicky, May 27 2021
Example, program, definition, comments and more terms added by
Olivier Gérard (02/99).
A212172
Row n of table represents second signature of n: list of exponents >= 2 in canonical prime factorization of n, in nonincreasing order, or 0 if no such exponent exists.
Original entry on oeis.org
0, 0, 0, 2, 0, 0, 0, 3, 2, 0, 0, 2, 0, 0, 0, 4, 0, 2, 0, 2, 0, 0, 0, 3, 2, 0, 3, 2, 0, 0, 0, 5, 0, 0, 0, 2, 2, 0, 0, 0, 3, 0, 0, 0, 2, 2, 0, 0, 4, 2, 2, 0, 2, 0, 3, 0, 3, 0, 0, 0, 2, 0, 0, 2, 6, 0, 0, 0, 2, 0, 0, 0, 3, 2, 0, 0, 2, 2, 0, 0, 0, 4, 4, 0, 0, 2, 0, 0
Offset: 1
First rows of table read: 0; 0; 0; 2; 0; 0; 0; 3; 2; 0; 0; 2;...
12 = 2^2*3 has positive exponents 2 and 1 in its canonical prime factorization (1s are often left implicit as exponents). Since only exponents that are 2 or greater appear in a number's second signature, 12's second signature is {2}.
30 = 2*3*5 has no exponents greater than 1 in its prime factorization. The multiset of its exponents >= 2 is { } (the empty multiset), represented in the table with a 0.
72 = 2^3*3^2 has positive exponents 3 and 2 in its prime factorization, as does 108 = 2^2*3^3. Rows 72 and 108 both read {3,2}.
Functions determined by exponents >=2 in the prime factorization of n:
Multiplicative:
A000688,
A005361,
A008966,
A038538,
A046951,
A049419,
A050361,
A050377,
A056624,
A061704,
A063775,
A162510,
A162511,
A212181.
Sequences that contain all integers of a specific second signature:
A005117 (second signature { }),
A060687 ({2}),
A048109 ({3}).
-
&cat[IsEmpty(e)select [0]else Reverse(Sort(e))where e is[pe[2]:pe in Factorisation(n)|pe[2]gt 1]:n in[1..102]]; // Jason Kimberley, Jun 13 2012
-
row[n_] := Select[ FactorInteger[n][[All, 2]], # >= 2 &] /. {} -> 0 /. {k__} -> Sequence[k]; Table[row[n], {n, 1, 100}] (* Jean-François Alcover, Apr 16 2013 *)
A085629
Let b(n) equal the product of the exponents in the prime factorization of n. Then a(n) gives the least k such that b(k) = n.
Original entry on oeis.org
1, 4, 8, 16, 32, 64, 128, 144, 216, 288, 2048, 432, 8192, 1152, 864, 1296, 131072, 1728, 524288, 2592, 3456, 18432, 8388608, 5184, 7776, 73728, 13824, 10368, 536870912, 15552, 2147483648, 20736, 55296, 1179648, 31104, 41472, 137438953472, 4718592
Offset: 1
-
f[n_, i_] := f[n, i] = Block[{d, b, p, x}, p = Prime[i]; b = p^n; d = Divisors[n]; For[j = Length[d], j > 1, j--, x = d[[j]]; b = Min[b, p^x*f[n/x, i + 1]]]; b]; f[1, 1] = 1; Array[ f[#, 1] &, 42] (* Robert G. Wilson v, Jul 17 2014, after David Wasserman's PARI program below *)
-
f(n, i) = local(d, best, p, x); p = prime(i); best = p^n; d = divisors(n); for (j = 2, length(d) - 1, x = d[j]; best = min(best, p^x*f(n/x, i + 1))); best; a(n) = f(n, 1) \\ David Wasserman, Feb 07 2005
A355432
a(n) = number of k < n such that rad(k) = rad(n) and k does not divide n, where rad(k) = A007947(k).
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 4, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1
a(1) = 18, since 18/6 >= 3. We note that rad(12) = rad(18) = 6, yet 12 does not divide 18.
a(2) = 24, since 24/6 >= 3. rad(18) = rad(24) = 6 and 24 mod 18 = 6.
a(3) = 36, since 36/6 >= 3. rad(24) = rad(36) = 6 and 36 mod 24 = 12.
a(6) = 54, since 54/6 >= 3. m in {12, 24, 36, 48} are such that rad(m) = rad(54) = 6, but none divides 54, etc.
- Michael De Vlieger, Table of n, a(n) for n = 1..16384
- Michael De Vlieger, Plot (k, n) at (x, -y), k = 1..n, n = 1..54, showing k in A126706 in dark blue, n in A360768 in dark red, and for n and nondivisor k such that rad(k) = rad(n), we highlight in large black dots. This sequence counts the number of black dots in row n.
- Michael De Vlieger, Condensation of the above plot, showing k = 1..n and only n in A360768 and n <= 54.
Cf.
A005361,
A007947,
A008479,
A010846,
A013929,
A020639,
A024619,
A027750,
A126706,
A162306,
A243822,
A272618,
A360589,
A360768.
-
rad[n_] := rad[n] = Times @@ FactorInteger[n][[All, 1]]; Table[Which[PrimePowerQ[n], 0, SquareFreeQ[n], 0, True, r = rad[n]; Count[Select[Range[n], Nor[PrimePowerQ[#], SquareFreeQ[#]] &], _?(And[rad[#] == r, Mod[n, #] != 0] &)]], {n, 120}]
-
rad(n) = factorback(factorint(n)[, 1]); \\ A007947
a(n) = my(rn=rad(n)); sum(k=1, n-1, if (n % k, rad(k)==rn)); \\ Michel Marcus, Feb 23 2023
Comments