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.

A274046 a(n) is the smallest positive integer which can be represented as the sum of distinct positive triangular numbers in exactly n ways, or 0 if no such integer exists.

This page as a plain text file.
%I A274046 #22 Jun 09 2016 04:42:39
%S A274046 1,10,25,31,49,46,55,67,70,76,82,117,102,91,97,107,101,135,110,112,
%T A274046 116,115,119,128,0,131,133,130,148,145,136,0,137,149,154,146,0,169,
%U A274046 152,157,155,168,171,158,174,161,0,183,184,167,0,0,173,0,175,181,190
%N A274046 a(n) is the smallest positive integer which can be represented as the sum of distinct positive triangular numbers in exactly n ways, or 0 if no such integer exists.
%C A274046 46 is the smallest number that can be expressed as the sum of distinct triangular numbers in five ways, but 49 is the smallest that can be so expressed in _exactly_ five ways. There are further examples of this phenomenon.
%e A274046 25 = 1 + 3 + 6 + 15 = 10 + 15 = 1 + 3 + 21. This is the smallest number that can be written as the sum of distinct triangular numbers in three different ways. So a(3)=25.
%e A274046 The first null values of a(n) occur for n = 25, 32, 37, 47, 51, 52, 54, 61,... - _Giovanni Resta_, Jun 08 2016
%t A274046 nT[n_, m_: 0] := nT[n,m] = If[n == 0, 1, Block[{t, i=m+1, s=0}, While[(t = i*(i+1)/2) <= n, s += nT[n-t, i]; i++]; s]]; a[n_] := Block[{k=0, t}, While[(t = nT[++k]) != n && t < Max[2*n, 30]]; If[t == n, k, 0]]; Array[a, 57] (* _Giovanni Resta_, Jun 08 2016 *)
%Y A274046 Cf. A007294, A060773, A024940, A064816.
%K A274046 nonn
%O A274046 1,2
%A A274046 _Phil Scovis_, Jun 07 2016
%E A274046 a(15)-a(20) from _Tom Edgar_, Jun 08 2016
%E A274046 a(21)-a(57) from _Giovanni Resta_, Jun 08 2016