A085493
Numbers k having partitions into distinct divisors of k + 1.
Original entry on oeis.org
1, 3, 5, 7, 11, 15, 17, 19, 23, 27, 29, 31, 35, 39, 41, 47, 53, 55, 59, 63, 65, 69, 71, 77, 79, 83, 87, 89, 95, 99, 103, 107, 111, 119, 125, 127, 131, 139, 143, 149, 155, 159, 161, 167, 175, 179, 191, 195, 197, 199, 203, 207, 209, 215, 219, 223, 227, 233, 239
Offset: 1
The divisors of 42 are 1, 2, 3, 6, 7, 14, 21, 42. Since 6 + 14 + 21 = 41, 41 is in the sequence.
The divisors of 43 are 1, 43. Since no selection of these divisors can possibly add up to 42, this means that 42 is not in the sequence.
-
q:= proc(m) option remember; local b, l; b, l:=
proc(n, i) option remember; n=0 or i>=1 and
(l[i]<=n and b(n-l[i], i-1) or b(n, i-1))
end, sort([numtheory[divisors](m+1)[]]);
b(m, nops(l)-1)
end:
select(q, [$1..300])[]; # Alois P. Heinz, Feb 04 2023
-
divNextableQ[n_] := TrueQ[Length[Select[Subsets[Divisors[n + 1]], Plus@@# == n &]] > 0]; Select[Range[100], divNextableQ] (* Alonso del Arte, Jan 07 2023 *)
-
def divisors(n: Int): IndexedSeq[Int] = (1 to n).filter(n % _ == 0)
def divPartSums(n: Int): List[Int] = divisors(n).toSet.subsets.toList.map(_.sum)
(1 to 128).filter(n => divPartSums(n + 1).contains(n)) // Alonso del Arte, Jan 26 2023
A085496
Number of ways to write prime(n) as sum of distinct divisors of prime(n)+1.
Original entry on oeis.org
0, 1, 1, 1, 2, 0, 1, 1, 5, 3, 1, 0, 2, 0, 10, 1, 31, 0, 0, 26, 0, 6, 23, 20, 0, 0, 1, 13, 0, 0, 1, 15, 0, 14, 9, 0, 0, 0, 190, 0, 713, 0, 42, 0, 7, 9, 0, 9, 6, 0, 6, 2148, 0, 509, 0, 120, 109, 1, 0, 0, 0, 4, 6, 100, 0, 0, 0, 0, 2, 4, 0, 21897, 1, 0, 3, 85, 79, 0, 0, 0, 19172, 0, 1130
Offset: 1
n=5, divisors of A000040(5)+1=11+1=12 that are not greater 11: {1,2,3,4,6}, 11=6+4+1=6+3+2, therefore a(5)=2.
-
b:= proc(n, i) option remember; global l;
`if`(n=0, 1, `if`(i<1, 0, b(n, i-1)+
`if`(l[i]>n, 0, b(n-l[i], i-1))))
end:
a:= proc(n) global l; local p;
forget(b);
p:= ithprime(n);
l:= sort([numtheory[divisors](p+1)[]]);
b(p, nops(l)-1)
end:
seq(a(n), n=1..50); # Alois P. Heinz, May 01 2012
-
Count[Total/@Subsets[Most[Divisors[Prime[#]+1]]],Prime[#]]&/@Range[90] (* Harvey P. Dale, Jan 31 2016 *)
A085492
Numbers n having no partition into distinct divisors of n+1.
Original entry on oeis.org
2, 4, 6, 8, 9, 10, 12, 13, 14, 16, 18, 20, 21, 22, 24, 25, 26, 28, 30, 32, 33, 34, 36, 37, 38, 40, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 54, 56, 57, 58, 60, 61, 62, 64, 66, 67, 68, 70, 72, 73, 74, 75, 76, 78, 80, 81, 82, 84, 85, 86, 88, 90, 91, 92, 93, 94, 96, 97
Offset: 1
A085494
Numbers k having exactly one partition into distinct divisors of k+1.
Original entry on oeis.org
1, 3, 5, 7, 15, 17, 19, 27, 31, 53, 63, 65, 69, 77, 87, 99, 103, 127, 161, 195, 255, 271, 303, 367, 413, 463, 485, 495, 499, 511, 579, 649, 725, 819, 859, 867, 967, 1013, 1023, 1035, 1147, 1183, 1311, 1315, 1351, 1371, 1375, 1457, 1483, 1503, 1695, 1887, 1951
Offset: 1
-
q[k_] := Module[{d = Divisors[k+1], x}, CoefficientList[Product[1 + x^i, {i, d}], x][[1+k]] == 1]; Select[Range[2000], q] (* Amiram Eldar, Apr 16 2025 *)
A359196
a(n) is the number of subsets of the divisors of n which sum to n+1.
Original entry on oeis.org
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 5, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 8, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 33, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 27, 1, 1, 1, 1, 1, 2, 1, 7, 1, 1, 1, 25, 1, 1, 1, 2, 1, 20, 1, 1, 1, 1, 1, 21, 1, 1, 1, 3
Offset: 1
a(1) = 0; a(2) = 1 since the divisors of 2, {1, 2} sum to 3;
a(18) = 2 since the divisors of 18, {1, 2, 3, 6, 9, 18}, have two subsets, {1, 18}, {1, 3, 6, 9} which sum to 19;
a(12) = 3 since the divisors of 12, {1, 2, 3, 4, 6, 12}, have three subsets, {1, 12}, {3, 4, 6}, {1, 2, 4, 6} which sum to 13;
a(162) = 4 since its divisors are {1, 2, 3, 6, 9, 18, 27, 54, 81, 162}, have four subsets, {1, 162}, {1, 27, 54, 81}, {1, 9, 18, 54, 81}, {1, 3, 6, 18, 54, 81} which sum to 163;
a(24) = 5 since its divisors {1, 2, 3, 4, 6, 8, 12, 24} have five subsets {1, 24}, {1, 4, 8, 12}, {2, 3, 8, 12}, {3, 4, 6, 12}, {1, 2, 4, 6, 12} which sum to 25; etc.
-
a[n_] := Block[{c = k =1, d = Most@ Divisors@ n}, lgth = Length@ d; If[lgth < 18, c = 1 + Count[Total /@ Subsets@ d, n +1], While[k < 1 + 2^(lgth - 18), c += Count[Total /@ Subsets[d, All, {1 + (k -1)*2^18, k*2^18}], n +1]; k++]]; c]; Array[a, 100] (* or *)
a[n_] := Block[{d = Divisors@ n}, SeriesCoefficient[ Series[ Product[1 + x^d[[i]], {i, Length@ d}], {x, 0, n +1}], n +1]]; Array[a, 100]
-
A359196(n) = if(!n, 0, if(sigma(n)<=n, 1, my(p=1); fordiv(n, d, p *= (1 + 'x^d)); polcoeff(p, 1+n))); \\ Antti Karttunen, Jan 20 2025
Showing 1-5 of 5 results.
Comments