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.

A241899 Numbers n equal to the sum of all the two-digit numbers formed without repetition from the digits of n.

This page as a plain text file.
%I A241899 #20 Nov 16 2017 15:52:25
%S A241899 11,22,33,44,55,66,77,88,99,132,264,396
%N A241899 Numbers n equal to the sum of all the two-digit numbers formed without repetition from the digits of n.
%C A241899 The sequence is complete because the maximum number of partitions of an m-digit number n into sets of 2-digit numbers is 2*binomial(m,2) = m*(m-1). (See the Oblong numbers A002378.) The maximum value of the sum of all the two-digit numbers is M = 99*m*(m-1) where m = floor(log_10(n) + 1). But M < n for n > 1188 because the solution of the equation 99*m*(m-1) = n with m = floor(log_10(n) + 1) is n = 1188.
%e A241899 132 is in the sequence because 132 = 12 + 13 + 21 + 23 + 31 + 32.
%p A241899 with(numtheory):
%p A241899 for n from 10 to 10000 do:
%p A241899      lst:={}:k:=0:x:=convert(n,base,10):n1:=nops(x):
%p A241899         for i from 1 to n1 do:
%p A241899           for j from i+1 to n1 do:
%p A241899           lst:=lst union {x[i]+10*x[j]}:
%p A241899           od:
%p A241899         od:
%p A241899            for a from n1 by -1 to 1 do:
%p A241899              for b from a-1 by -1 to 1 do:
%p A241899              lst:=lst union
%p A241899              {x[a]+10*x[b]}:
%p A241899              od:
%p A241899            od:
%p A241899            n2:=nops(lst):s:=sum('lst[i]', 'i'=1..n2):
%p A241899            if s=n
%p A241899              then
%p A241899              printf(`%d, `,n):
%p A241899              else
%p A241899            fi:
%p A241899   od:
%t A241899 Select[Range[10,400],Total[FromDigits/@Permutations[IntegerDigits[#],{2}]]==#&] (* _Ivan N. Ianakiev_, Oct 24 2014 *)
%Y A241899 Cf. A002378.
%K A241899 nonn,base,fini,full
%O A241899 10,1
%A A241899 _Michel Lagneau_, May 01 2014