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.

A337853 a(n) is the number of partitions of n as the sum of two Niven numbers.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5, 4, 4, 3, 3, 3, 3, 3, 4, 3, 4, 4, 4, 4, 5, 4, 5, 4, 4, 4, 3, 2, 4, 3, 3, 4, 3, 3, 5, 3, 4, 5, 4, 4, 7, 4, 5, 6, 5, 3, 7, 4, 4, 6, 4, 2, 7, 3, 4, 5, 4, 3, 7, 3, 4, 5, 4, 3, 8, 3, 4, 6, 3, 3, 6, 2, 5, 6, 5, 3, 8, 4, 4, 6
Offset: 0

Views

Author

Marius A. Burtea, Sep 26 2020

Keywords

Comments

a(n) >= 1 for n >= 2 ?.
For n <= 200000, a(n) = 1 only for n = 2, 3, 299, (2 = 1 + 1, 3 = 1 + 2, 299 = 1 + 288) and a(n) = 2 only for n in {4, 5, 35, 59, 79, 95, 97, 149, 169, 179, 389}.

Examples

			0 and 1 cannot be decomposed as the sum of two Niven numbers, so a(0) = a(1) = 0.
4 = 1 + 3 = 2 + 2 and 1, 2, 3 are in A005349, so a(4) = 2.
15 = 3 + 12 = 5 + 10 = 6 + 9 = 7 + 8 and 3, 5, 6, 7, 8, 9, 10, 12 are in A005349, so a(15) = 4.
		

Crossrefs

Programs

  • Magma
    niven:=func; [#RestrictedPartitions(n,2,{k: k in [1..n-1] | niven(k)}): n in [0..100]];
  • Mathematica
    m = 100; nivens = Select[Range[m], Divisible[#, Plus @@ IntegerDigits[#]] &]; a[n_] := Length[IntegerPartitions[n, {2}, nivens]]; Array[a, m, 0] (* Amiram Eldar, Sep 27 2020 *)

A337862 a(n) is the smallest number that can be partitioned into n ways as the sum of two Moran numbers.

Original entry on oeis.org

0, 36, 63, 174, 198, 306, 312, 399, 1176, 930, 1296, 1989, 1110, 888, 2190, 1896, 2688, 3990, 3630, 3090, 3696, 3810, 8316, 6870, 4710, 12420, 11340, 9180, 13350, 12990, 14070, 14364, 14970, 9900, 15444, 14790, 15012, 18570, 19980, 25164, 23610, 25092, 23790
Offset: 0

Views

Author

Marius A. Burtea, Oct 21 2020

Keywords

Examples

			0 cannot be written as the sum of two Moran numbers because A001101(1) = 18, so 0 is a term and a(0) = 0.
36 = 18 + 18 = A001101(1) + A001101(1), so a(1) = 36.
63 = 18 + 27 = A001101(1) + A001101(5) and 63 = 21 + 42 = A001101(2) + A001101(4), so a(2) = 63.
174 = 18 + 156 = 21 + 153 = 63 + 111 and 18, 21, 63, 111, 153, 156 are in A001101, so a(3) = 174.
198 = 27 + 171 = 42 + 156 = 45 + 153 = 84 + 114 and 27, 42, 45, 84, 153, 156, 171 are in A001101, so a(4) = 198.
		

Crossrefs

Programs

  • Magma
    a:=[]; moran:=func; v:={m:m in [1..40000]|moran(m)}; for n in [0..40] do k:=0; while #RestrictedPartitions(k,2,v) ne n do k:=k+1; end while; Append(~a,k); end for; a;
  • Mathematica
    m = 60000; morans = Select[Range[m], PrimeQ[#/Plus @@ IntegerDigits[#]] &]; mx = 43; s = Table[-1, {mx}]; n = 0; c = 0; While[c < mx && n <= m, If[(i = Length[IntegerPartitions[n, {2}, morans]] + 1) <= mx && s[[i]] == -1, c++; s[[i]] = n]; n++]; s (* Amiram Eldar, Oct 21 2020 *)
Showing 1-2 of 2 results.