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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 51, 48, 72, 108, 126, 90, 138, 144, 120, 198, 162, 210, 216, 315, 240, 234, 306, 252, 372, 270, 546, 360, 342, 444, 414, 468, 420, 642, 450, 522, 540, 924, 612, 600, 666, 630, 888, 930, 756, 840, 882, 936, 972, 1098, 1215, 1026, 1212, 1080
Offset: 0

Views

Author

Marius A. Burtea, Sep 26 2020

Keywords

Examples

			a(0) = 0 because 0 cannot be written as the sum of two Niven numbers.
a(1) = 2 because 2 is uniquely written 2 = 1 + 1, with 1 in A005349.
a(2) = 4 because 4 = 1 + 3 = 2 + 2 and 1, 2, 3 are in A005349.
a(3) = 6 because 6 = 1 + 5 = 2 + 4 = 3 + 3 and 1, 2, 3, 4, 5 are terms in A005349.
a(6) = 51, because 51 = 1 + 50 = 3 + 48 = 6 + 45 = 9 + 42 = 21 + 30 = 24 + 27 and 1, 3, 6, 9, 21, 24, 27, 30, 42, 45, 48, 50 are terms in A005349.
		

Crossrefs

Programs

  • Magma
    a:=[]; niven:=func; for n in [0..55] do k:=0; while k le 10000 and #RestrictedPartitions(k,2,{m:m in [1..k-1]| niven(m)}) ne n do k:=k+1; end  while; Append(~a,k); end for; a;
  • Mathematica
    m = 1300; nivens = Select[Range[m], Divisible[#, Plus @@ IntegerDigits[#]] &]; a[n_] := Length[IntegerPartitions[n, {2}, nivens]]; mx = 54; s = Table[-1, {mx}]; c = 0; n = 0; While[c < mx, i = a[n] + 1; If[i <= mx && s[[i]] < 0, c++; s[[i]] = n]; n++]; s (* Amiram Eldar, Sep 27 2020 *)

A337861 Numbers that can be written as the sum of two Moran numbers (see A001101).

Original entry on oeis.org

36, 39, 42, 45, 48, 54, 60, 63, 66, 69, 72, 81, 84, 87, 90, 102, 105, 108, 111, 126, 129, 132, 135, 138, 141, 144, 147, 151, 153, 154, 156, 159, 160, 162, 168, 170, 171, 173, 174, 175, 177, 178, 179, 180, 183, 189, 192, 194, 195, 196, 197, 198, 201, 208, 211
Offset: 1

Views

Author

Marius A. Burtea, Oct 21 2020

Keywords

Examples

			36 = 18 + 18 = A001101(1) + A001101(1), so 36 is a term.
39 = 18 + 21 = A001101(1) + A001101(2), so 39 is a term.
87 = 42 + 45 = A001101(4) + A001101(5), so 87 is a term.
		

Crossrefs

Programs

  • Magma
    moran:=func; [n:n in [1..220] | #RestrictedPartitions(n,2,{k:k in [1..n-1] | moran(k)}) ne 0];
  • Mathematica
    m = 211; morans = Select[Range[m], PrimeQ[#/Plus @@ IntegerDigits[#]] &]; Select[Range[m], Length[IntegerPartitions[#, {2}, morans]] > 0 &] (* Amiram Eldar, Oct 21 2020 *)
Showing 1-2 of 2 results.