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.

A241177 Numbers n such that there are exactly two numbers m with m + (some digit of m) = n.

This page as a plain text file.
%I A241177 #33 Sep 08 2022 08:46:07
%S A241177 10,12,24,32,36,48,54,60,72,76,84,96,98,109,112,123,125,127,129,131,
%T A241177 132,133,135,137,139,141,145,147,149,151,153,155,157,159,161,163,167,
%U A241177 169,171,172,173,175,177,179,181,183,185,189,191,193,195,197,199,201,209,211,213,215,217,219,224,233,235,237,239,241,245
%N A241177 Numbers n such that there are exactly two numbers m with m + (some digit of m) = n.
%C A241177 The numbers 12, 112, 1112, ..., 111...112, ... are terms of the sequence. - _Marius A. Burtea_, Feb 18 2020
%D A241177 Eric Angelini, Posting to Sequence Fans Mailing List, Apr 20 2014.
%H A241177 David A. Corneth, <a href="/A241177/b241177.txt">Table of n, a(n) for n = 1..13111</a> (Terms <= 10^6)
%e A241177 12 = 6 + 6 = 11 + 1.
%e A241177 32 = 26 + 6 = 31 + 1.
%e A241177 112 = 106 + 6 = 111 + 1.
%p A241177 M:=2000;
%p A241177 M2:=M+10;
%p A241177 A:=Array[0..M2];
%p A241177 for n from 0 to M2 do A[n]:=0; od:
%p A241177 for n from 0 to M do
%p A241177 t1:=convert(n,base,10);
%p A241177 t2:=convert(t1,set); t3:=convert(t2,list);
%p A241177 for i from 1 to nops(t3) do A[n+t3[i]]:= A[n+t3[i]]+1; od:
%p A241177                   od:
%p A241177 ans:=[];
%p A241177 for n from 0 to M do if A[n]=2 then ans:=[op(ans),n]; fi; od:
%p A241177 [seq(ans[i],i=1..nops(ans))];
%t A241177 A241177[n_] := Module[{m, c = 0},
%t A241177    Do[c = c + Count[m + Union[IntegerDigits[m]], n], {m, 0, n}]; c];
%t A241177 Select[Range[0, 245], A241177[#] == 2 &] (* _Robert Price_, Mar 20 2019 *)
%o A241177 (PARI) upto(n) = {my(v = vector(n + 9)); for(i = 1, n, d = Set(digits(i)); for(j = 1, #d, v[i + d[j]]++ ) ); for(i = n + 1, n + 9, v[i] = 0); select(x -> x == 2, v, 1) } \\ _David A. Corneth_, Mar 20 2019
%o A241177 (Magma) f:=func<n,m|exists(c){a:a in Intseq(m)|m+a eq n }>; [k:k in [1..250]| #[m:m in [1..k]| f(k,m)] eq 2]; // _Marius A. Burtea_, Feb 18 2020
%Y A241177 Related sequences: A241173, A241174, A241175, A241176, A241177, A241178, A241179, A241180, A241181, A241182, A241183.
%K A241177 nonn,base
%O A241177 1,1
%A A241177 _N. J. A. Sloane_, Apr 23 2014