A297174
An auxiliary sequence for computing A300250. See comments and examples.
Original entry on oeis.org
0, 1, 1, 5, 1, 19, 1, 69, 5, 19, 1, 2123, 1, 19, 19, 4165, 1, 2131, 1, 2125, 19, 19, 1, 4228171, 5, 19, 69, 2125, 1, 526631, 1, 2101317, 19, 19, 19, 268706123, 1, 19, 19, 4228237, 1, 526643, 1, 2125, 2123, 19, 1, 550026380363, 5, 2131, 19, 2125, 1, 4229203, 19, 4228237, 19, 19, 1, 8798249190555, 1, 19, 2123, 17181970501, 19, 526643, 1, 2125
Offset: 1
a(1) = 0 by convention (as 1 has no prime divisors).
a(p) = 1 for any prime p.
For any n > 1, the least significant 1-bit is at rightmost position (bit-0), signifying the smallest prime factor of n, which is always the least divisor > 1.
For n = 4 = 2*2, the next divisor of 4 after 2 is 4, for which A101296(4) = 3, thus the second least significant 1-bit comes 3-1 = 2 positions left of the rightmost 1, thus a(4) = 2^0 + 2^(3-1) = 1+4 = 5.
For n = 6 with divisors d = 2, 3 and 6 larger than one, for which A101296(d)-1 gives 1, 1 and 3, thus a(6) = 2^(1-1) + 2^(1-1+1) + 2^(1-1+1+3) = 2^0 + 2^1 + 2^4 = 19.
For n = 12 with divisors d = 2, 3, 2*2, 2*3, 2*2*3 larger than one, A101296(d)-1 gives 1, 1, 2, 3 and 5 thus a(12) = 2^0 + 2^(0+1) + 2^(0+1+2) + 2^(0+1+2+3) + 2^(0+1+2+3+5) = 2123.
For n = 18 with divisors d = 2, 3, 2*3, 3*3, 2*3*3 larger than one, A101296(d)-1 gives 1, 1, 3, 2, and 5 thus a(18) = 2^0 + 2^(0+1) + 2^(0+1+3) + 2^(0+1+3+2) + 2^(0+1+3+2+5) = 2131.
Cf.
A101296,
A300250 (restricted growth sequence transform of this sequence).
-
up_to = 4096;
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523.
v101296 = rgs_transform(vector(up_to, n, A046523(n)));
A101296(n) = v101296[n];
A297174(n) = { my(s=0,i=-1); fordiv(n, d, if(d>1, i += (A101296(d)-1); s += 2^i)); (s); };
A305800
Filter sequence for a(prime) = constant sequences.
Original entry on oeis.org
1, 2, 2, 3, 2, 4, 2, 5, 6, 7, 2, 8, 2, 9, 10, 11, 2, 12, 2, 13, 14, 15, 2, 16, 17, 18, 19, 20, 2, 21, 2, 22, 23, 24, 25, 26, 2, 27, 28, 29, 2, 30, 2, 31, 32, 33, 2, 34, 35, 36, 37, 38, 2, 39, 40, 41, 42, 43, 2, 44, 2, 45, 46, 47, 48, 49, 2, 50, 51, 52, 2, 53, 2, 54, 55, 56, 57, 58, 2, 59, 60, 61, 2, 62, 63, 64, 65, 66, 2, 67, 68, 69, 70, 71, 72, 73, 2, 74, 75, 76, 2, 77, 2, 78, 79, 80, 2, 81, 2, 82, 83, 84, 2, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96
Offset: 1
Differs from
A296073 for the first time at n=125, as a(125) = 96, while
A296073(125) = 33.
-
Join[{1},Table[If[PrimeQ[n],2,1+n-PrimePi[n]],{n,2,150}]] (* Harvey P. Dale, Jul 12 2019 *)
-
A305800(n) = if(1==n,n,if(isprime(n),2,1+n-primepi(n)));
A077462
Prime factor configuration patterns.
Original entry on oeis.org
0, 1, 2, 2, 3, 2, 4, 2, 5, 3, 4, 2, 6, 2, 4, 4, 7, 2, 8, 2, 6, 4, 4, 2, 9, 3, 4, 5, 6, 2, 10, 2, 11, 4, 4, 4, 12, 2, 4, 4, 9, 2, 10, 2, 6, 6, 4, 2, 13, 3, 8, 4, 6, 2, 14, 4, 9, 4, 4, 2, 15, 2, 4, 6, 16, 4, 10, 2, 6, 4, 10, 2, 17, 2, 4, 8, 6, 4, 10, 2, 13, 7, 4
Offset: 0
12 = 2^2*3^1 has exponents {2,1}, and is the first number with that pattern, so its value is one more than the largest previous value; a(12) = 6. Contrast that with 18 = 2^1*3^2 having exponents {1,2}, which is different from {2,1}, so a(18) is not equal to a(12). - _Franklin T. Adams-Watters_, Aug 01 2012
-
fList = {{0}}; Join[{0, 1}, Table[e = Transpose[FactorInteger[n]][[2]]; pos = Position[fList, e]; If[pos == {}, AppendTo[fList, e]; Length[fList], pos[[1, 1]]], {n, 2, 100}]] (* T. D. Noe, Aug 01 2012 *)
-
a(n)=local(vn); if(n<1,return(0)); vn=factor(n)[,2]; for(i=1,n,if(vn==factor(i)[,2],return(#Set(vector(i,j,factor(j)[,2])))))
-
up_to = 100000;
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
A071364(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = prime(i)); factorback(f); }; \\ From A071364
v077462 = rgs_transform(vector(up_to,n,A071364(n)));
A077462(n) = if(!n,n,v077462[n]); \\ Antti Karttunen, Jun 13 2018
A290110
a(n) = the discovery rank of the factorization pattern of the sequence of divisors of n.
Original entry on oeis.org
1, 2, 2, 3, 2, 4, 2, 5, 3, 4, 2, 6, 2, 4, 4, 7, 2, 8, 2, 9, 4, 4, 2, 10, 3, 4, 5, 9, 2, 11, 2, 12, 4, 4, 4, 13, 2, 4, 4, 14, 2, 15, 2, 9, 6, 4, 2, 16, 3, 8, 4, 9, 2, 17, 4, 14, 4, 4, 2, 18, 2, 4, 6, 19, 4, 15, 2, 9, 4, 11, 2, 20, 2, 4, 8, 9, 4, 15, 2, 21, 7, 4, 2, 22, 4, 4, 4, 23, 2, 24, 4, 9, 4, 4, 4, 25, 2, 8, 9, 26, 2, 15, 2, 23, 11
Offset: 1
The divisors of 17 are {1, 17}. They follow the pattern {1, p} which is pattern number 2 in discovery order. a(17)=2.
The divisors of 28 are {1, 2, 4, 7, 14, 28}. They follow the pattern {1, p, p^2, q, p*q, p^2*q}, which is pattern number 9 in discovery order. a(28)=9.
From _Michael De Vlieger_ and _Antti Karttunen_, Mar 07 & 08 2018: (Start)
Divisors of 462 = 2*3*7*11 (p=2, q=3, r=7, s=11) are 1, 2, 3, 6, 7, 11, 14, 21, 22, 33, 42, 66, 77, 154, 231, 462, thus the factorization patterns in the order of increasing divisors are: 1, p, q, pq, r, s, pr, qr, ps, qs, pqr, pqs, rs, prs, qrs and pqrs.
Divisors of 546 = 2*3*7*13 (p=2, q=3, r=7, s=13) are 1, 2, 3, 6, 7, 13, 14, 21, 26, 39, 42, 78, 91, 182, 273, 546, thus the factorization patterns are 1, p, q, pq, r, s, pr, qr, ps, qs, pqr, pqs, rs, prs, qrs and pqrs, that is, identical with those of 462, thus a(546) = a(462).
Divisors of 858 = 2*3*11*13 (p=2, q=3, r=11, s=13) are 1, 2, 3, 6, 11, 13, 22, 26, 33, 39, 66, 78, 143, 286, 429, 858, thus the factorization patterns are 1, p, q, pq, r, s, pr, ps, qr, qs, pqr, pqs, rs, prs, qrs and pqrs. At the 8th divisor (26), we see that pattern ps is different from pattern qr of the 8th divisor of 546 (21), thus a(858) is not equal to a(546).
(End)
-
FactorizationPattern[n_] := Module[
{pn, fd, f1, f2, d},
pn = First /@ FactorInteger[n];
fd = FactorInteger[ReplacePart[Divisors[n], 1 -> {}]];
f1 = (ReplacePart[#,
1 -> FromCharacterCode[
111 + First[Position[pn, First[#]]]]]) &;
f2 = (f1 /@ #) &;
fd = f2 /@ fd;
f1 = (Power[First[#], Last[#]]) &;
For[i = 1, i <= Length[fd], i++,
d = fd[[i]];
For[j = 1, j <= Length[d], j++,d[[j]] = f1[d[[j]]];];
d = Product[x, {x, d}];
fd[[i]] = d;
];
fd
]
ListFactorizationPatternIndices[n_] := Module[
{mem, k, i, p, a},
mem = Association[];
a = {}; k = 0;
For[i = 1, i \[LessSlantEqual] n, i++,
p = FactorizationPattern[i];
If[KeyExistsQ[mem, p],,
k++;
mem = Append[mem, p -> k]
];
a = Append[a, mem[p]]
];
a
]
ListFactorizationPatternIndices[80]
(* or *)
f[n_] := If[n==1, 1, Block[{p = First /@ FactorInteger@n, z,x}, z= Table[p[[i]] -> x[i], {i, Length@p}]; Times @@ (((#[[1]] /. z)^#[[2]]) & /@ FactorInteger@ #) & /@ Divisors[n]]]; A = <||>; Table[k = f[n]; If[ KeyExistsQ[A, k], A[k], t = 1 + Length@A; A[k] = t], {n, 80}] (* Giovanni Resta, Jul 20 2017 *)
A355445
Numbers of the form p^2 * q where p and q are primes with p^2 < q.
Original entry on oeis.org
20, 28, 44, 52, 68, 76, 92, 99, 116, 117, 124, 148, 153, 164, 171, 172, 188, 207, 212, 236, 244, 261, 268, 279, 284, 292, 316, 332, 333, 356, 369, 387, 388, 404, 412, 423, 428, 436, 452, 477, 508, 524, 531, 548, 549, 556, 596, 603, 604, 628, 639, 652, 657, 668, 692, 711, 716, 724, 725, 747, 764, 772, 775, 788, 796
Offset: 1
20 = 2^2 * 5 is included because 2 < 5, and of the divisors of 20, [1, 2, 4, 5, 10, 20], the third one (4) is a square of prime as 2^2 < 5.
-
Select[Range[800], (f = FactorInteger[#])[[;; , 2]] == {2, 1} && f[[1, 1]]^2 < f[[2, 1]] &] (* Amiram Eldar, Jul 07 2022 *)
-
A355443(n) = ((numdiv(n) == (3+bigomega(n))) && issquare(divisors(n)[3]));
isA355445(n) = A355443(n);
A300716
a(1) = 0; for n > 1, a(n) = Product_{d|n, 1A101296(d)-1).
Original entry on oeis.org
0, 1, 1, 2, 1, 4, 1, 6, 2, 4, 1, 60, 1, 4, 4, 42, 1, 60, 1, 60, 4, 4, 1, 4620, 2, 4, 6, 60, 1, 1000, 1, 546, 4, 4, 4, 21780, 1, 4, 4, 4620, 1, 1000, 1, 60, 60, 4, 1, 1021020, 2, 60, 4, 60, 1, 4620, 4, 4620, 4, 4, 1, 6897000, 1, 4, 60, 12558, 4, 1000, 1, 60, 4, 1000, 1, 75162780, 1, 4, 60, 60, 4, 1000, 1, 1021020, 42, 4, 1
Offset: 1
For n = 12, whose proper divisors > 1 are 2, 3, 4, 6, their prime signature ranks from A101296 are: 2, 2, 3, 4. We subtract one from each, to form product prime(1)*prime(1)*prime(2)*prime(3) = 2*2*3*5 = 60, which is thus value of a(12).
-
Block[{nn = 83, s}, s = Map[#1 -> #2 & @@ # &, Transpose@ {Values@ #, Keys@ #}] &@ PositionIndex@ Table[Times @@ MapIndexed[Prime[First@#2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]] - Boole[n == 1], {n, nn}]; Table[If[n == 1, 0, Times @@ Map[Prime[FirstPosition[Keys@ s, #][[1]] - 1] &, Most@ Rest@ Divisors@ n]], {n, nn}]] (* Michael De Vlieger, Mar 13 2018 *)
-
up_to = 8192;
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
v101296 = rgs_transform(vector(up_to, n, A046523(n)));
A101296(n) = v101296[n];
A300716(n) = { my(m=1); if(1==n, 0, fordiv(n,d,if((d>1)&(dA101296(d)-1))); (m)); };
for(n=1,up_to,write("b300716.txt", n, " ", A300716(n)));
A355446
Numbers of the form p^2 * q where p and q are primes with p < q < p^2.
Original entry on oeis.org
12, 45, 63, 175, 275, 325, 425, 475, 539, 575, 637, 833, 931, 1127, 1421, 1519, 1573, 1813, 2009, 2057, 2107, 2299, 2303, 2783, 2873, 3211, 3509, 3751, 3887, 4477, 4901, 4961, 5203, 5239, 5491, 5687, 6253, 6413, 6647, 6929, 7139, 7267, 7381, 7943, 8107, 8303, 8381, 8591, 8833, 8957, 8959, 9559, 9971, 10043, 10309, 10469
Offset: 1
12 = 2^2 * 3 is included because 2 < 3, and of the divisors of 12, [1, 2, 3, 4, 6, 12], the fourth one (4) is a square of prime as 2^2 > 3.
-
Select[Range[10^4], (f = FactorInteger[#])[[;; , 2]] == {2, 1} && f[[1, 1]]^2 > f[[2, 1]] &] (* Amiram Eldar, Jul 07 2022 *)
-
A355444(n) = ((numdiv(n) == (3+bigomega(n))) && issquare(divisors(n)[4]));
isA355446(n) = A355444(n);
Showing 1-7 of 7 results.
Comments