cp's OEIS Frontend

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.

A373892 a(n) is the smallest number that can be partitioned in exactly n ways as the sum of two Duffinian numbers (A003624).

This page as a plain text file.
%I A373892 #18 Aug 06 2024 05:43:16
%S A373892 1,8,25,43,84,71,102,160,150,219,226,196,244,350,328,300,330,354,400,
%T A373892 386,448,408,434,390,510,536,462,546,570,624,608,740,722,690,714,770,
%U A373892 726,660,750,804,842,858,876,870,932,914,924,840,986,1038,966,1108,1050,1056
%N A373892 a(n) is the smallest number that can be partitioned in exactly n ways as the sum of two Duffinian numbers (A003624).
%e A373892 1 cannot be written as the sum of two Duffinian numbers, so a(0) = 1.
%e A373892 The numbers from 2 to 7 cannot be written as the sum of two Duffinian numbers and 8 = 4 + 4 = A003624(1) + A003624(1), so a(1) = 8.
%e A373892 25 = 4 + 21 = 9 + 16 and 4 = A003624(1), 9 = A003624(3), 16 = A003624(4), 21 = A003624(5) and the numbers 9 to 24 cannot be written in two ways as a sum of two Duffinian numbers. Thus a(2) = 25.
%t A373892 dufQ[n_] := CompositeQ[n] && CoprimeQ[n, DivisorSigma[1, n]]; f[n_] := Sum[If[dufQ[k] && dufQ[n - k], 1, 0], {k, 1, Floor[n/2]}]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n] + 1; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[54, 2000] (* _Amiram Eldar_, Jul 19 2024 *)
%o A373892 (Magma) f:=func<n|n ne 1 and not IsPrime(n) and Gcd(n,DivisorSigma(1,n)) eq 1>; b:=[n: n in [1..2000] |f(n)]; a:=[]; for n in [0..60] do k:=1; while #RestrictedPartitions(k,2,Set(b)) ne n do k:=k+1; end while; Append(~a,k); end for; a;
%Y A373892 Cf. A003624.
%K A373892 nonn
%O A373892 0,2
%A A373892 _Marius A. Burtea_, Jul 12 2024