A379951 a(n) = A379504(A156942(n)).
816, 28471698, 714837, 8719965, 5969, 4385405, 830994029375, 241550466668344580
Offset: 1
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.
for(n=1,oo,if((n%2)&&((2*n)==bitand(2*n,sigma(n))),print1(n,", ")));
Select[Range[1, 7755, 2]^2, Mod[(s = DivisorSigma[1, #]), 4] == 3 && s > 2*# &] (* Amiram Eldar, Apr 05 2024 *)
isA325311(n) = (n%2 && (3==sigma(n)%4) && sigma(n)>(2*n));
a(18) = 2 as its divisor set with an extra 1 is [1_a, 1_b, 2, 3, 6, 9, 18], and this can be partitioned to two sets with equal sums either as 1_a+1_b+3+6+9 = 2+18 or as 2+3+6+9 = 1_a+1_b+18. a(36) = 8 as its divisor set with an extra 1 is [1_a, 1_b, 2, 3, 4, 6, 9, 12, 18, 36], and this can be partitioned in any of the following ways: 1_a + 1_b + 2 + 6 + 36 = 3 + 4 + 9 + 12 + 18, 1_a + 2 + 3 + 4 + 36 = 1_b + 9 + 6 + 12 + 18, 1_b + 2 + 3 + 4 + 36 = 1_a + 9 + 6 + 12 + 18, 1_a + 3 + 6 + 36 = 1_b + 2 + 4 + 9 + 12 + 18, 1_b + 3 + 6 + 36 = 1_a + 2 + 4 + 9 + 12 + 18, 1_a + 9 + 36 = 1_b + 2 + 3 + 4 + 6 + 12 + 18, 1_b + 9 + 36 = 1_a + 2 + 3 + 4 + 6 + 12 + 18, 4 + 6 + 36 = 1_a + 1_b + 2 + 3 + 9 + 12 + 18, where each sum on the left and right hand side gives (sigma(36)+1)/2 = 46.
partitions_into_distinct_parts(n, parts, from=1) = if(!n, 1, if(from>#parts, 0, my(s=0); for(i=from, #parts, if(parts[i]<=n, s += partitions_into_distinct_parts(n-parts[i], parts, i+1))); (s))); A379504(n) = if(!issquare(n) && !issquare(2*n), 0, my(divs=concat(1,divisors(n)), s=sigma(n)); partitions_into_distinct_parts((s+1)/2, vecsort(divs,,4))/2);
A379504(n) = if(!issquare(n) && !issquare(2*n), 0, my(p=('x^1 + 'x^-1)); fordiv(n, d, p *= ('x^d + 'x^-d)); (polcoeff(p, 0)/2)); \\ Faster program, after code in A083206.
is_A379949(n) = if(!(n%2) || !issquare(n) || sigma(n)<=2*n, 0, fordiv(n, d, if(d>1 && sigma(n/d, -1)>2, return(0))); (1));
is1(k) = {my(f = factor(k)); for(i = 1, #f~, f[i, 2] *= 2); if(sigma(f, -1) <= 2, return(0)); for(i = 1, #f~, f[i, 2] -= 1; if(sigma(f, -1) > 2, return(0)); f[i, 2] += 1); 1;} list(lim) = forstep(k = 1, lim, 2, if(is1(k), print1(k^2, ", "))); \\ Amiram Eldar, Mar 12 2025
Divisors of n=18: {1,2,3,6,9,18}; 18 is pseudo-perfect (A005835): 18=9+6+3, but there exist no two complementary subsets of divisors having the same sum, therefore 18 is a term.
fQ[n_] := Block[{d = Divisors[n], t, ds, x}, ds = Total[d]; If[Mod[ds, 2] > 0, False, t = CoefficientList[Product[1 + x^i, {i, d}], x]; t[[1 + ds/2]] > 0]]; Select[Range[3042], And[DivisorSigma[1, #] > 2 #, ! fQ[#]] &] (* Michael De Vlieger, Dec 04 2024, after T. D. Noe at A083207 *)
A083206(n) = { my(s=sigma(n),p=1); if(s%2 || s < 2*n, 0, fordiv(n, d, p *= ('x^d + 'x^-d)); (polcoeff(p, 0)/2)); }; is_A083211(n) = ((sigma(n)>2*n) && (0==A083206(n))); \\ Antti Karttunen, Dec 04 2024
18 is included, as its divisors with an extra 1 are [1, 1, 2, 3, 6, 9, 18], and these can be partitioned as 2+3+6+9 = 1+1+18 = 20. 36 is included, as its divisors with an extra 1 are [1, 1, 2, 3, 4, 6, 9, 12, 18, 36], and these can be partitioned to two sets with equal sums, for example as (1+2+3+4)+(36) = (1+9)+(6+12+18), and also in several other ways (see example in A379504). 11025 is included as its divisors with an extra 1 are [1, 1, 3, 5, 7, 9, 15, 21, 25, 35, 45, 49, 63, 75, 105, 147, 175, 225, 245, 315, 441, 525, 735, 1225, 1575, 2205, 3675, 11025], and 1+5+35+175+245+11025 = 1+3+7+9+15+21+25+45+49+63+75+105+147+225+315+441+525+735+1225+1575+2205+3675 = 11486 = (sigma(11025)+1)/2.
KK:= proc(S) # Karmarkar-Karp algorithm local R,n,a,b; R:= S; for n from nops(R) by -1 to 2 do R:= sort([abs(R[-1]-R[-2]), op(R[1..-3])]); od; op(R) = 0 end proc: filter:= proc(n) local S,t,d,R,i; S:= [1, op(numtheory:-divisors(n))]; t:= convert(S,`+`)/2; if t < n then return false fi; if not t::integer then return false fi; if KK(S) then return true fi; evalb(coeff(mul(1+x^d,d=S),x,t) <> 0) end proc; select(filter, [$1..10000]); # Robert Israel, Jan 06 2025
is_A379503 = A379502;
fQ[n_] := Block[{ds = DivisorSigma[1, n^2] - 2 n^2}, ds > 0 && OddQ@ ds]; Select[ Range[1, 5353, 2], fQ@# &]
is(n)=n%2 && sigma(n^2,-1)>2 \\ Charles R Greathouse IV, Feb 21 2017
[2*k-1|k<-[1..6e3\2],sigma((2*k-1)^2,-1)>2] \\ M. F. Hasler, Jan 26 2020
a(18) = 2 as its divisor set with an extra 1 is [1, 1, 2, 3, 6, 9, 18], and this can be partitioned to two sets with equal sums either as 1+1+3+6+9 = 2+18 or as 2+3+6+9 = 1+1+18. a(36) = 5 as its divisor set with an extra 1 is [1, 1, 2, 3, 4, 6, 9, 12, 18, 36], and this can be partitioned in any of the following five ways, when two 1's are considered indistinguishable: 1+1+2+6+36 = 3+4+9+12+18, 1+2+3+4+36 = 1+6+9+12+18, 1+3+6+36 = 1+2+4+9+12+18, 1+9+36 = 1+2+3+4+6+12+18, 4+6+36 = 1+1+2+3+9+12+18, where each sum on the left and right hand side gives (sigma(36)+1)/2 = 46. There are 42 partitions of (sigma(72)+1)/2 = 98 into the divisors of 72, [1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72], with an extra 1 allowed: [2, 24, 72], [1, 1, 24, 72], [8, 18, 72], [2, 6, 18, 72], [1, 1, 6, 18, 72], [1, 3, 4, 18, 72], [1, 1, 2, 4, 18, 72], [1, 4, 9, 12, 72], [2, 3, 9, 12, 72], [1, 1, 3, 9, 12, 72], [6, 8, 12, 72], [2, 4, 8, 12, 72], [1, 1, 4, 8, 12, 72], [1, 2, 3, 8, 12, 72], [1, 3, 4, 6, 12, 72], [1, 1, 2, 4, 6, 12, 72], [3, 6, 8, 9, 72], [1, 2, 6, 8, 9, 72], [2, 3, 4, 8, 9, 72], [1, 1, 3, 4, 8, 9, 72], [1, 1, 2, 3, 4, 6, 9, 72], [8, 12, 18, 24, 36], [2, 6, 12, 18, 24, 36], [1, 1, 6, 12, 18, 24, 36], [1, 3, 4, 12, 18, 24, 36], [1, 1, 2, 4, 12, 18, 24, 36], [3, 8, 9, 18, 24, 36], [1, 2, 8, 9, 18, 24, 36], [1, 4, 6, 9, 18, 24, 36], [2, 3, 6, 9, 18, 24, 36], [1, 1, 3, 6, 9, 18, 24, 36], [1, 1, 2, 3, 4, 9, 18, 24, 36], [2, 4, 6, 8, 18, 24, 36], [1, 1, 4, 6, 8, 18, 24, 36], [1, 2, 3, 6, 8, 18, 24, 36], [3, 6, 8, 9, 12, 24, 36], [1, 2, 6, 8, 9, 12, 24, 36], [2, 3, 4, 8, 9, 12, 24, 36], [1, 1, 3, 4, 8, 9, 12, 24, 36], [1, 1, 2, 3, 4, 6, 9, 12, 24, 36], [2, 3, 4, 6, 8, 9, 12, 18, 36], [1, 1, 3, 4, 6, 8, 9, 12, 18, 36], therefore a(72) = 42/2 = 21.
partitions_into_distinct_parts_with_extra1allowed(n, parts, from=1) = if(n<=1, 1, if(from>#parts, 0, my(s=0); for(i=from, #parts, if(parts[i]<=n, s += partitions_into_distinct_parts_with_extra1allowed(n-parts[i], parts, i+1))); (s))); A379505(n) = if(1==n, n, if(!issquare(n) && !issquare(2*n), 0, my(divs=divisors(n), s=sigma(n)); partitions_into_distinct_parts_with_extra1allowed((s+1)/2, vecsort(divs,,4))/2));
Comments