Original entry on oeis.org
1, 2, 1, 6, 2, -2, 2, 14, 10, 5, 4, 10, 4, 8, 4, 30, 8, 22, 6, 17, 10, 14, 10, 16, 28, 12, 16, -2, 12, 16, 8, 62, 12, 20, 18, 84, 12, 26, 22, 32, 16, 24, 12, 38, 22, 24, 22, 50, 54, 76, 16, 28, 24, 36, 32, 56, 34, 38, 28, 48, 16, 38, 44, 126, 38, 40, 20, 46, 24, 64, 24, 118, 24, 50, 54, 42, 44, 48, 24, 82, 118, 56, 40, 88, 50, 48, 36, 86, 40
Offset: 1
Original entry on oeis.org
26, 84, 78, 168, 118, 146, 242, 182, 208, 276, 200, 398, 396, 322, 438, 344, 390, 412, 536, 628, 432, 338, 582, 472, 558, 840, 512, 824, 640, 726, 1022, 852, 914, 628, 744, 616, 1178, 1018, 858, 1140, 856, 760, 990, 936, 1490, 1014, 1564, 1482, 1104, 1096, 1196, 1138, 1008, 1550, 1556, 1180, 1474, 1158, 1508, 858, 2020
Offset: 1
-
up_to = 25000;
isA228058(n) = if(!(n%2)||(omega(n)<2),0,my(f=factor(n),y=0); for(i=1,#f~,if(1==(f[i,2]%4), if((1==y)||(1!=(f[i,1]%4)),return(0),y=1), if(f[i,2]%2, return(0)))); (y));
A228058list(up_to) = { my(v=vector(up_to), k=0, n=0); while(kA228058(n), k++; v[k] = n)); (v); };
v228058 = A228058list(up_to);
A228058(n) = v228058[n]; \\ Antti Karttunen, May 29 2019
A324213(n) = { my(s=sigma(n)); sum(i=0, s, (1==gcd(n-i, n-(s-i)))); };
A325819(n) = A324213(A228058(n));
A325980
Lexicographically earliest sequence such that a(i) = a(j) => A046523(i) = A046523(j) and A324213(i) = A324213(j) for all i, j.
Original entry on oeis.org
1, 2, 3, 4, 2, 5, 2, 6, 7, 8, 9, 10, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 14, 28, 23, 29, 30, 31, 26, 32, 33, 34, 35, 36, 26, 37, 15, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 35, 50, 53, 54, 50, 55, 56, 57, 38, 58, 45, 59, 45, 60, 61, 62, 63, 64, 45, 65, 66, 67, 68, 69, 60, 70, 71, 72, 68, 73, 49, 74, 75, 76, 71
Offset: 1
-
up_to = 65537;
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
A324213(n) = { my(s=sigma(n)); sum(i=0, s, (1==gcd(n-i, n-(s-i)))); };
v325980 = rgs_transform(vector(up_to,n,[A046523(n), A324213(n)]));
A325980(n) = v325980[n];
A228058
Odd numbers of the form p^(1+4k) * r^2, where p is prime of the form 1+4m, r > 1, and gcd(p,r) = 1. (Euler's criteria for odd perfect numbers).
Original entry on oeis.org
45, 117, 153, 245, 261, 325, 333, 369, 405, 425, 477, 549, 605, 637, 657, 725, 801, 833, 845, 873, 909, 925, 981, 1017, 1025, 1053, 1233, 1325, 1341, 1377, 1413, 1421, 1445, 1525, 1557, 1573, 1629, 1737, 1773, 1805, 1813, 1825, 2009, 2057, 2061, 2097, 2169
Offset: 1
- T. D. Noe, Table of n, a(n) for n = 1..10000
- Charles Greathouse and Eric W. Weisstein, MathWorld: Odd perfect number
- Oliver Knill, The oldest open problem in mathematics, Handout for NEU Math Circle, December 2, 2007
- P. P. Nielsen, Odd Perfect Numbers Have At Least Nine Distinct Prime Factors, arXiv:math/0602485 [math.NT], 2006.
- Wikipedia, Perfect number: Odd perfect numbers
- Index entries for sequences where any odd perfect numbers must occur
For various subsequences with additional conditions, see
A228059,
A325376,
A325380,
A325822,
A326137 (with omega(n)>=5),
A324898 (conjectured, subsequence if it does not contain any prime powers),
A354362,
A386425 (conjectured),
A386427 (nondeficient terms),
A386428 (powerful terms),
A386429 U
A351574.
Cf.
A027748,
A124010,
A005408,
A324647,
A325319,
A325320,
A325375,
A325377,
A325378,
A325379,
A325819,
A325823,
A325824.
-
import Data.List (partition)
a228058 n = a228058_list !! (n-1)
a228058_list = filter f [1, 3 ..] where
f x = length us == 1 && not (null vs) &&
fst (head us) `mod` 4 == 1 && snd (head us) `mod` 4 == 1
where (us,vs) = partition (odd . snd) $
zip (a027748_row x) (a124010_row x)
-- Reinhard Zumkeller, Aug 14 2013
-
nn = 100; n = 1; t = {}; While[Length[t] < nn, n = n + 2; {p, e} = Transpose[FactorInteger[n]]; od = Select[e, OddQ]; If[Length[e] > 1 && Length[od] == 1 && Mod[od[[1]], 4] == 1 && Mod[p[[Position[e, od[[1]]][[1,1]]]], 4] == 1, AppendTo[t, n]]]; t (* T. D. Noe, Aug 15 2013 *)
-
up_to = 1000;
isA228058(n) = if(!(n%2)||(omega(n)<2),0,my(f=factor(n),y=0); for(i=1,#f~,if(1==(f[i,2]%4), if((1==y)||(1!=(f[i,1]%4)),return(0),y=1), if(f[i,2]%2, return(0)))); (y));
A228058list(up_to) = { my(v=vector(up_to), k=0, n=0); while(kA228058(n), k++; v[k] = n)); (v); };
v228058 = A228058list(up_to);
A228058(n) = v228058[n]; \\ Antti Karttunen, Apr 22 2019
Note in parentheses added to the definition by
Antti Karttunen, Jun 03 2019
A325817
a(n) is the least k >= 0 such that n-k and n-(sigma(n)-k) are relatively prime.
Original entry on oeis.org
0, 0, 0, 0, 0, 5, 0, 0, 0, 1, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 27, 0, 1, 0, 0, 2, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 0, 0, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 2, 1, 0, 1, 2, 1, 0, 1, 2, 5, 0, 0, 2, 0, 0, 1, 0, 1, 2
Offset: 1
For n=15, gcd(15-0, 15-(24-0)) = 3, gcd(15-1, 15-(24-1)) = 2 and gcd(15-2, 15-(24-2)) = 1, thus a(15) = 2.
Cf.
A000203,
A000396,
A001065,
A009194,
A014567 (positions of zeros),
A324213,
A325818,
A325826,
A325962,
A325965,
A325967,
A325976.
-
lk[n_]:=Module[{k=0},While[!CoprimeQ[n-k,n-(DivisorSigma[1,n]-k)],k++];k]; Array[lk,110] (* Harvey P. Dale, Nov 24 2024 *)
-
A325817(n) = { my(s=sigma(n)); for(k=0, s, if(1==gcd(-n + k, (n-s)+k), return(k))); };
-
A325817(n) = { my(s=sigma(n)); for(i=0, s, if(1==gcd(n-i, n-(s-i)), return(i))); };
A325818
a(n) is the largest k <= sigma(n) such that n-k and n-(sigma(n)-k) are relatively prime.
Original entry on oeis.org
1, 3, 4, 7, 6, 7, 8, 15, 13, 17, 12, 27, 14, 23, 22, 31, 18, 38, 20, 41, 32, 35, 24, 59, 31, 39, 40, 29, 30, 71, 32, 63, 46, 53, 48, 91, 38, 59, 56, 89, 42, 95, 44, 83, 76, 69, 48, 123, 57, 93, 70, 95, 54, 119, 72, 119, 80, 89, 60, 167, 62, 95, 104, 127, 84, 143, 68, 125, 94, 143, 72, 194, 74, 113, 124, 137, 96
Offset: 1
-
A325818(n) = { my(s=sigma(n)); for(i=0, s, if(1==gcd(n-i, n-(s-i)), return(s-i))); };
A325826
a(n) is the largest k <= sigma(n)-n such that k and (2n-sigma(n)) [= A033879(n)] are relatively prime.
Original entry on oeis.org
0, 1, 1, 3, 1, 1, 1, 7, 4, 7, 1, 15, 1, 9, 7, 15, 1, 20, 1, 21, 11, 13, 1, 35, 6, 13, 13, 1, 1, 41, 1, 31, 13, 19, 13, 55, 1, 21, 17, 49, 1, 53, 1, 39, 31, 23, 1, 75, 8, 43, 19, 43, 1, 65, 17, 63, 23, 31, 1, 107, 1, 33, 41, 63, 19, 77, 1, 57, 25, 73, 1, 122, 1, 39, 49, 61, 19, 89, 1, 105, 40, 43, 1, 139, 23, 43, 31, 91, 1, 143, 19, 75
Offset: 1
Cf.
A000040,
A000203,
A000396,
A001065,
A033879,
A324213,
A325817,
A325818,
A325969,
A325970,
A325976.
-
A325826(n) = { my(s=sigma(n)); forstep(k=s-n, 0, -1, if(1==gcd((n+n-sigma(n)), k), return(k))); };
-
A325818(n) = { my(s=sigma(n)); for(i=0, s, if(1==gcd(n-i, n-(s-i)), return(s-i))); };
A325826(n) = (A325818(n) - n);
A325961
a(n) is the least k >= A061228(n)-1 such that n-k and n-(sigma(n)-k) are relatively prime, or 0 if no such k <= sigma(n) exists.
Original entry on oeis.org
1, 3, 0, 5, 0, 7, 0, 9, 11, 11, 0, 13, 0, 15, 20, 17, 0, 19, 0, 21, 24, 23, 0, 25, 29, 27, 30, 29, 0, 31, 0, 33, 38, 35, 40, 37, 0, 39, 42, 41, 0, 43, 0, 45, 50, 47, 0, 49, 55, 51, 58, 53, 0, 55, 60, 57, 60, 59, 0, 61, 0, 63, 66, 65, 70, 67, 0, 69, 74, 71, 0, 73, 0, 75, 78, 77, 84, 79, 0, 81, 83, 83, 0, 85, 90, 87, 92, 89, 0, 91, 100
Offset: 1
Cf.
A000203,
A000396,
A020639,
A061228,
A324213,
A325817,
A325818,
A325960,
A325962,
A325965,
A325966.
-
A020639(n) = if(1==n, n, factor(n)[1, 1]);
A325961(n) = { my(s=sigma(n)); for(i=(-1)+n+A020639(n), s, if(1==gcd(n-i, n-(s-i)), return(i))); (0); };
A325966
a(n) is the largest i <= sigma(n)-A020639(n) such that n-i and n-(sigma(n)-i) are relatively prime.
Original entry on oeis.org
0, 1, 0, 5, 0, 7, 0, 13, 10, 15, 0, 25, 0, 21, 20, 29, 0, 37, 0, 39, 28, 33, 0, 55, 26, 39, 36, 29, 0, 67, 0, 61, 44, 51, 42, 89, 0, 57, 52, 87, 0, 91, 0, 81, 74, 69, 0, 121, 50, 91, 68, 95, 0, 115, 66, 117, 76, 87, 0, 163, 0, 93, 100, 125, 78, 139, 0, 121, 92, 141, 0, 193, 0, 111, 120, 137, 88, 163, 0, 183, 118, 123, 0
Offset: 1
-
A020639(n) = if(1==n, n, factor(n)[1, 1]);
A325966(n) = { my(s=sigma(n)); forstep(i=s-A020639(n), 0, -1, if(1==gcd(n-i, n-(s-i)), return(i))); };
A325807
Number of ways to partition the divisors of n into complementary subsets x and y for which gcd(n-Sum(x), n-Sum(y)) = 1. (Here only distinct unordered pairs of such subsets are counted.)
Original entry on oeis.org
1, 2, 1, 4, 1, 1, 1, 8, 3, 4, 1, 16, 1, 4, 2, 16, 1, 16, 1, 16, 4, 4, 1, 40, 3, 3, 4, 1, 1, 40, 1, 32, 2, 4, 4, 244, 1, 4, 4, 48, 1, 40, 1, 16, 8, 3, 1, 220, 3, 27, 2, 10, 1, 32, 4, 64, 4, 4, 1, 672, 1, 4, 14, 64, 4, 40, 1, 13, 2, 64, 1, 1205, 1, 4, 16, 10, 4, 40, 1, 236, 15, 4, 1, 864, 4, 3, 2, 64, 1, 640, 2, 16, 4, 4, 2, 537, 1, 26, 8, 241, 1, 40, 1, 64, 40
Offset: 1
For n = 1, its divisor set [1] can be partitioned only to an empty set [] and set [1], with sums 0 and 1 respectively, and gcd(1-0,1-1) = gcd(1,0) = 1, thus this partitioning is included, and a(1) = 1.
For n = 3, its divisor set [1, 3] can be partitioned as [] and [1,3] (sums 0 and 4, thus gcd(3-0,3-4) = 1), [1] and [3] (sums 1 and 3, thus gcd(3-1,3-3) = 2), thus a(3) = 1, and similarly a(p) = 1 for any other odd prime p as well.
For n = 6, its divisor set [1, 2, 3, 6] can be partitioned in eight ways as:
[] and [1, 2, 3, 6] (sums 0 and 12, gcd(6-0, 6-12) = 6),
[1, 2] and [3, 6] (sums 3 and 9, gcd(6-3, 6-9) = 3),
[1, 3] and [2, 6] (sums 4 and 8, gcd(6-4, 6-8) = 2),
[2] and [1, 3, 6] (sums 2 and 10, gcd(6-2, 6-10) = 4),
[3] and [1, 2, 6] (sums 3 and 9, gcd(6-3, 6-9) = 3),
[6] and [1, 2, 3] (sums 6 and 6, gcd(6-6, 6-6) = 0),
[1] and [2, 3, 6] (sums 1 and 11, gcd(6-1, 6-11) = 5),
[1, 6] and [2, 3] (sums 7 and 5, gcd(6-7, 6-5) = 1),
with only the last partitioning satisfying the required condition, thus a(6) = 1.
For n = 10, its divisor set [1, 2, 5, 10] can be partitioned in eight ways as:
[] and [1, 2, 5, 10] (sums 0 and 18, gcd(10-0, 10-18) = 2),
[1, 2] and [5, 10] (sums 3 and 15, gcd(10-3, 10-15) = 1),
[1, 5] and [2, 10] (sums 6 and 12, gcd(10-6, 10-12) = 2),
[2] and [1, 5, 10] (sums 2 and 16, gcd(10-2, 10-16) = 2),
[5] and [1, 2, 10] (sums 5 and 13, gcd(10-5, 10-13) = 1),
[10] and [1, 2, 5] (sums 10 and 8, gcd(10-10, 10-8) = 2),
[1] and [2, 5, 10] (sums 1 and 17, gcd(10-1, 10-17) = 1),
[1, 10] and [2, 5] (sums 11 and 7, gcd(10-11, 10-7) = 1),
of which four satisfy the required condition, thus a(10) = 4.
-
Table[Function[d, Count[DeleteDuplicates[Sort /@ Map[{#, Complement[d, #]} &, Subsets@ d]], ?(CoprimeQ @@ (n - Total /@ #) &)]]@ Divisors@ n, {n, 105}] (* _Michael De Vlieger, May 27 2019 *)
-
A325807(n) = { my(divs=divisors(n), s=sigma(n),r); sum(b=0,(2^(-1+length(divs)))-1,r=sumbybits(divs,2*b);(1==gcd(n-(s-r),n-r))); };
sumbybits(v,b) = { my(s=0,i=1); while(b>0,s += (b%2)*v[i]; i++; b >>= 1); (s); };
Showing 1-10 of 16 results.
Comments