A244974
Sum of numbers m <= n whose set of prime divisors is a subset of the set of prime divisors of n.
Original entry on oeis.org
1, 3, 4, 7, 6, 16, 8, 15, 13, 30, 12, 45, 14, 36, 33, 31, 18, 79, 20, 66, 41, 64, 24, 103, 31, 70, 40, 80, 30, 235, 32, 63, 84, 114, 73, 198, 38, 120, 92, 163, 42, 310, 44, 140, 130, 132, 48, 246, 57, 213, 108, 154, 54, 300, 97, 217, 116, 150, 60, 600, 62, 156, 180, 127, 109, 540, 68, 246
Offset: 1
For n = 4, A162306(4) = {1, 2, 4} and a(4) = 7.
For n = 5, A162306(5) = {1, 5} and a(5) = 6.
For n = 6, A162306(6) = {1, 2, 3, 4, 6} and a(6) = 16.
a(n) = sum of terms of n-th row of triangle
A162306(n,k).
-
Table[Total@ Union[{1}, Function[d, Select[Range@ n, Union[d, First /@ FactorInteger@ #] == d &]][First /@ FactorInteger@ n]], {n, 68}] (* or *)
Table[Sum[k (Floor[n^k/k] - Floor[(n^k - 1)/k]), {k, n}], {n, 68}] (* Michael De Vlieger, May 26 2016 *)
-
a(n) = {summ = 0; spn = factor(n)[,1]~; for (m=1, n, spm = factor(m)[,1]~; if (setintersect(spm, spn) == spm, summ += m);); summ;} \\ Michel Marcus, Jul 17 2014
A376248
Irregular triangle where row n lists m such that rad(m) | n and bigomega(m) <= bigomega(n), where rad = A007947 and bigomega = A001222.
Original entry on oeis.org
1, 1, 2, 1, 3, 1, 2, 4, 1, 5, 1, 2, 3, 4, 6, 9, 1, 7, 1, 2, 4, 8, 1, 3, 9, 1, 2, 4, 5, 10, 25, 1, 11, 1, 2, 3, 4, 6, 8, 9, 12, 18, 27, 1, 13, 1, 2, 4, 7, 14, 49, 1, 3, 5, 9, 15, 25, 1, 2, 4, 8, 16, 1, 17, 1, 2, 3, 4, 6, 8, 9, 12, 18, 27, 1, 19, 1, 2, 4, 5, 8, 10, 20, 25, 50, 125
Offset: 1
Triangle begins:
n row n of this sequence:
-------------------------------------------
1: 1;
2: 1, 2;
3: 1, 3;
4: 1, 2 4;
5: 1, 5;
6: 1, 2, 3, 4, 6, 9;
7: 1, 7;
8: 1, 2, 4, 8;
9: 1, 3, 9;
10: 1, 2, 4, 5, 10, 25;
11: 1, 11;
12: 1, 2, 3, 4, 6, 8, 9, 12, 18, 27;
...
Row n = 10 of this sequence, presented according to 2^k, k = 0..bigomega(n) by columns, 5^i, i = 0..bigomega(n) by rows, showing terms m > n with an asterisk. The remaining m and the parenthetic 8 are in row 10 of A162306:
1 2 4 (8)
5 10
25*
Row n = 12 of this sequence, presented according to 2^k, k = 0..bigomega(n) by columns, 3^i, i = 0..bigomega(n) by rows, showing terms m > n with an asterisk. The remaining m are in row 12 of A162306:
1 2 4 8
3 6 12
9 18*
27*
-
Table[Clear[p]; MapIndexed[Set[p[First[#2]], #1] &, FactorInteger[n][[All, 1]]]; k = PrimeOmega[n]; w = PrimeNu[n]; Union@ Map[Times @@ MapIndexed[p[First[#2]]^#1 &, #] &, Select[Tuples[Range[0, k], w], Total[#] <= k &] ], {n, 120}]
A138109
Positive integers k whose smallest prime factor is greater than the cube root of k and strictly less than the square root of k.
Original entry on oeis.org
6, 15, 21, 35, 55, 65, 77, 85, 91, 95, 115, 119, 133, 143, 161, 187, 203, 209, 217, 221, 247, 253, 259, 287, 299, 301, 319, 323, 329, 341, 377, 391, 403, 407, 437, 451, 473, 481, 493, 517, 527, 533, 551, 559, 583, 589, 611, 629, 649, 667, 671, 689, 697, 703
Offset: 1
6 is a term because the smallest prime factor of 6 is 2 and 6^(1/3) = 1.817... < 2 < 2.449... = sqrt(6).
From _Michael De Vlieger_, Apr 27 2024: (Start):
Table of p*q where p = prime(n) and q = prime(n+k):
n\k 1 2 3 4 5 6 7 8 9 10 11
-------------------------------------------------------------------
1: 6;
2: 15, 21;
3: 35, 55, 65, 85, 95, 115;
4: 77, 91, 119, 133, 161, 203, 217, 259, 287, 301, 329;
... (End)
-
a138109 n = a138109_list !! (n-1)
a138109_list = filter f [1..] where
f x = p ^ 2 < x && x < p ^ 3 where p = a020639 x
-- Reinhard Zumkeller, Dec 17 2014
-
s = {}; Do[f = FactorInteger[i]; test = f[[1]][[1]]; If [test < N[i^(1/2)] && test > N[i^(1/3)], s = Union[s, {i}]], {i, 2, 2000}]; Print[s]
Select[Range[1000],Surd[#,3]Harvey P. Dale, May 10 2015 *)
-
is(n)=my(f=factor(n)); f[,2]==[1,1]~ && f[1,1]^3 > n \\ Charles R Greathouse IV, Mar 28 2017
-
list(lim)=if(lim<6, return([])); my(v=List([6])); forprime(p=3,sqrtint(1+lim\=1)-1, forprime(q=p+2, min(p^2-2,lim\p), listput(v,p*q))); Set(v) \\ Charles R Greathouse IV, Mar 28 2017
-
from math import isqrt
from sympy import primepi, primerange
def A138109(n):
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
kmin = kmax >> 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return int(n+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(min(x//p,p**2)) for p in primerange(s+1)))
return bisection(f,n,n) # Chai Wah Wu, Mar 05 2025
A361373
Number of prime powers p^m <= n such that p | n.
Original entry on oeis.org
0, 1, 1, 2, 1, 3, 1, 3, 2, 4, 1, 5, 1, 4, 3, 4, 1, 6, 1, 5, 3, 5, 1, 6, 2, 5, 3, 5, 1, 9, 1, 5, 4, 6, 3, 8, 1, 6, 4, 7, 1, 9, 1, 6, 5, 6, 1, 8, 2, 7, 4, 6, 1, 8, 3, 7, 4, 6, 1, 10, 1, 6, 5, 6, 3, 10, 1, 7, 4, 10, 1, 9, 1, 7, 5, 7, 3, 10, 1, 8, 4, 7, 1, 12, 3, 7
Offset: 1
Let S = {k <= n : rad(k) | n} = row n of A162306
a(1) = 0 since S = {1} has 0 prime powers.
a(2) = 1 since S = {1, [2]} has 1 prime power.
a(4) = 2 since S = {1, [2, 4]} has 2 prime powers.
a(6) = 3 since S = {1, [2, 3, 4], 6} has 3 prime powers.
a(10) = 4 since S = {1, [2, 4, 5, 8], 10} has 4 prime powers.
a(12) = 5 since S = {1, [2, 3, 4], 6, [8, 9], 12} has 5 prime powers, etc.
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Diagram illustrating a(1440) = 20. Terms are arranged according to prime decomposition and sorted vertically. This sequence counts primes (red) and perfect prime powers (gold).
Cf.
A000005,
A000040,
A007947,
A010846,
A020639,
A126706,
A138109,
A138511,
A162306,
A246655,
A246547.
-
a := n -> add(ilog[p](n), p in NumberTheory:-PrimeFactors(n)):
seq(a(n), n = 1..92); # Peter Luschny, Jun 20 2024
-
{0}~Join~Table[Total@ Map[Floor@ Log[#, n] &, FactorInteger[n][[All, 1]]], {n, 2, 120}]
-
a(n) = if (n==1, 0, my(f=factor(n)[,1]); sum(k=1, #f, logint(n, f[k]))); \\ Michel Marcus, Jun 20 2024
-
from sympy import integer_log, primefactors
def A361373(n): return sum(integer_log(n,p)[0] for p in primefactors(n)) # Chai Wah Wu, Sep 20 2024
A363061
Number of k <= P(n) such that rad(k) | P(n), where rad(n) = A007947(n) and P(n) = A002110(n).
Original entry on oeis.org
1, 2, 5, 18, 68, 283, 1161, 4843, 19985, 83074, 349670, 1456458, 6107257, 25547835, 106115655, 440396113, 1833079809, 7642924612, 31705433101, 131711607956, 546283729493, 2257462298234, 9339325821411, 38593708318690, 159600066415313, 661371515924516, 2736805917843710
Offset: 0
a(0) = 1 since P(0) = 1 and 1 | 1.
a(1) = 2 since P(1) = 2 and both 1 | 2 and 2 | 2.
a(2) = 5 since P(2) = 6 and rad(m) | 6 for m = {1, 2, 3, 4, 6}.
a(3) = 18 since P(3) = 30 and rad(m) | 30 for m = {1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30}, etc.
Regarding a(3), we see that there are 18 terms in the tensor product of prime power ranges of 2, 3, and 5 that do not exceed 30:
5^0X | 2^0 2^1 2^2 2^3 2^4 5^1X | 2^0 2^1 2^2 5^2X | 2^0
-------------------------- ------------------ ----------
3^0 | 1 2 4 8 16 3^0 | 5 10 20 3^0 | 25
3^1 | 3 6 12 24 3^1 | 15 30
3^2 | 9 18
3^3 | 27
Hence, a(3) = 18. This approach proves handy for larger n.
-
f[1] = 1; f[n_] := Function[w,
ToExpression@ StringJoin["Block[{n = ", ToString@ n,
", k = 0}, Flatten@ Table[k++, ",
Most@ Flatten@ Map[{#, ", "} &, #], "]; k]"] &@
MapIndexed[
Function[p, StringJoin["{", ToString@ Last@ p, ", 0, Log[",
ToString@ First@ p, ", n/(",
ToString@ InputForm[Times @@ Map[Power @@ # &, Take[w, First@ #2 - 1]]],
")]}"] ]@ w[[First@ #2]] &, w]]@
Map[{#, ToExpression["p" <> ToString@ PrimePi@ #]} &,
FactorInteger[n][[All, 1]]];
Map[f, FoldList[Times, 1, Prime@ Range@ 9] ]
A010848
Number of numbers k <= n such that at least one prime factor of n is not a prime factor of k.
Original entry on oeis.org
0, 1, 2, 2, 4, 5, 6, 4, 6, 9, 10, 10, 12, 13, 14, 8, 16, 15, 18, 18, 20, 21, 22, 20, 20, 25, 18, 26, 28, 29, 30, 16, 32, 33, 34, 30, 36, 37, 38, 36, 40, 41, 42, 42, 42, 45, 46, 40, 42, 45, 50, 50, 52, 45, 54, 52, 56, 57, 58, 58, 60, 61, 60, 32, 64, 65, 66, 66, 68, 69, 70, 60
Offset: 1
-
f:= n -> n - n/convert(numtheory:-factorset(n),`*`):
map(f, [$1..100]); # Robert Israel, Apr 10 2018
Original entry on oeis.org
-1, -2, -2, -3, -2, -3, -2, -4, -3, -2, -2, -4, -2, -2, -3, -5, -2, -2, -2, -4, -3, -1, -2, -5, -3, -1, -4, -4, -2, 2, -2, -6, -2, 0, -3, -4, -2, 0, -2, -5, -2, 3, -2, -3, -4, 0, -2, -5, -3, 0, -2, -3, -2, 0, -3, -5, -2, 0, -2, 2, -2, 0, -4, -7, -3, 6, -2, -2
Offset: 1
a(6) = -3 since 6 has 4 divisors, and 4 | 6^2; A243822(6) = 1 and A000005(6) = 4; 1 - 4 = -3. Alternatively, A010846(6) = 5; 5 - 2*4 = -3.
a(30) = 2 since 30 has 8 divisors and the numbers {4, 8, 9, 12, 16, 18, 20, 24, 25, 27} divide 30^e with e > 1; A243822(30) = 10 and A000005(30) = 8; 10 - 8 = 2. Alternatively, A010846(30) = 18; 18 - 2*8 = 2.
Some values of a(n) and related sequences:
n a(n) A010846(n) A243822(n) A000005(n) A272618(n)
----------------------------------------------------
1 -1 1 0 1 0
2 -2 2 0 2 0
3 -2 2 0 2 0
4 -3 3 0 3 0
5 -2 2 0 2 0
6 -3 5 1 4 {4}
7 -2 2 0 2 0
8 -4 4 0 4 0
9 -3 3 0 3 0
10 -2 6 2 4 {4,8}
11 -2 2 0 2 0
12 -4 8 2 6 {8,9}
...
30 2 18 10 8 {4,8,9,12,16,18,20,24,25,27}
...
34 0 8 4 4 {4,8,16,32}
...
Cf.
A000005,
A002110,
A010846,
A243822,
A272618,
A272619,
A299991,
A299992,
A300155,
A300156,
A300157.
-
Table[Count[Range[n], _?(PowerMod[n, Floor@ Log2@ n, #] == 0 &)] - 2 DivisorSigma[0, n], {n, 68}]
Original entry on oeis.org
30, 42, 60, 66, 70, 74, 78, 82, 84, 86, 90, 94, 98, 102, 106, 110, 114, 118, 120, 122, 126, 130, 132, 134, 138, 140, 142, 146, 150, 154, 156, 158, 162, 165, 166, 168, 170, 174, 178, 180, 182, 186, 190, 194, 195, 198, 202, 204, 206, 210, 214, 218, 220, 222, 226
Offset: 1
30 is the first term since it is the smallest number for which A243822(n) > A000005(n), alternatively, for which A010846(n) > 2*A000005(n).
-
Select[Range@ 226, Function[n, Count[Range[n], _?(PowerMod[n, Floor@ Log2@ n, #] == 0 &)] > 2 DivisorSigma[0, n]]]
Original entry on oeis.org
0, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 4, 1, 3, 3, 1, 1, 3, 1, 4, 3, 3, 1, 4, 1, 3, 1, 4, 1, 7, 1, 1, 3, 3, 3, 4, 1, 3, 3, 5, 1, 7, 1, 4, 4, 3, 1, 4, 1, 2, 3, 4, 1, 1, 3, 5, 3, 3, 1, 10, 1, 3, 4, 1, 3, 7, 1, 4, 3, 7, 1, 4, 1, 3, 3, 4, 3, 7, 1, 5, 1, 3, 1, 10, 3, 3, 3
Offset: 1
Table of a(n), b(n) = A000005(n), and c(n) = A008479(n) for n <= 12:
n b(n) c(n) a(n)
------------------
1 1 1 0
2 2 1 1
3 2 1 1
4 3 2 1
5 2 1 1
6 4 1 3
7 2 1 1
8 4 3 1
9 3 2 1
10 4 1 3
11 2 1 1
12 6 2 4
a(12) = 4 since 12 has 6 divisors {1, 2, 3, 4, 6, 12}, and row 12 of A369609 has 2 terms {6, 12}.
a(18) = 3 since 18 has 6 divisors {1, 2, 3, 6, 9, 18}, and row 18 of A369609 has 3 terms {6, 12, 18}.
a(50) = 2 since 50 has 6 divisors {1, 2, 5, 10, 25, 50}, and row 50 of A369609 has 4 terms {10, 20, 40, 50}
a(162) = -2 since 162 has 10 divisors {1,2,3,6,9,18,27,54,81,162} but row 162 of A369609 has 12 terms {6,12,18,24,36,48,54,72,96,108,144,162}.
a(500) = 0 since 500 has as many divisors {1,2,4,5,10,20,25,50,100,125,250,500} as terms in row 500 of A369609 {10,20,40,50,80,100,160,200,250,320,400,500}.
Cf.
A000005,
A003557,
A008479,
A095960,
A119288,
A162306,
A183093,
A303554,
A355432,
A360767,
A369609.
-
rad[x_] := rad[x] = Times @@ FactorInteger[x][[All, 1]]; Table[r = rad[n]; DivisorSigma[0, n] - Count[Range[n/r], _?(Divisible[r, rad[#]] &)], {n, 120}]
-
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++)); numdiv(n) - s; \\ after A008479 \\ Michel Marcus, Jun 03 2024
A376567
a(n) = binomial(bigomega(n) + omega(n), omega(n)), where bigomega = A001222 and omega = A001221.
Original entry on oeis.org
1, 2, 2, 3, 2, 6, 2, 4, 3, 6, 2, 10, 2, 6, 6, 5, 2, 10, 2, 10, 6, 6, 2, 15, 3, 6, 4, 10, 2, 20, 2, 6, 6, 6, 6, 15, 2, 6, 6, 15, 2, 20, 2, 10, 10, 6, 2, 21, 3, 10, 6, 10, 2, 15, 6, 15, 6, 6, 2, 35, 2, 6, 10, 7, 6, 20, 2, 10, 6, 20, 2, 21, 2, 6, 10, 10, 6, 20, 2
Offset: 1
-
with(NumberTheory):
a := n -> binomial(Omega(n) + Omega(n, distinct), Omega(n, distinct)):
seq(a(n), n = 1..79); # Peter Luschny, Oct 25 2024
-
Array[Binomial[#2 + #1, #1] & @@ {PrimeNu[#], PrimeOmega[#]} &, 120]
Comments