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.

A131417 Numbers n such that Sum_digits(n)=Sum_digits[n*Sum_digits(n)].

This page as a plain text file.
%I A131417 #11 May 10 2019 08:35:14
%S A131417 0,1,9,10,18,19,27,28,36,37,45,46,55,64,73,82,90,91,99,100,109,117,
%T A131417 118,126,127,135,136,145,154,163,172,180,181,190,198,199,208,217,225,
%U A131417 226,234,235,244,253,262,270,271,280,288,289,297,298,307,316,325,334,343
%N A131417 Numbers n such that Sum_digits(n)=Sum_digits[n*Sum_digits(n)].
%e A131417 n=271 --> 2+7+1=10 --> 271*10=2710 and 2+7+1+0=10.
%e A131417 n=468 --> 4+6+8=18 --> 468*18=8424 and 8+4+2+4=18.
%p A131417 P:=proc(n) local a,i,k,w; for i from 0 by 1 to n do w:=0; k:=i; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; a:=w; k:=i*w; w:=0; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; if a=w then print(i); fi; od; end: P(1000);
%t A131417 sdQ[n_]:=Module[{c=Total[IntegerDigits[n]]},c==Total[ IntegerDigits[ c n]]]; Select[Range[0,350],sdQ] (* _Harvey P. Dale_, Nov 13 2011 *)
%o A131417 (PARI) isok(n) = my(sn = sumdigits(n)); sn == sumdigits(n*sn); \\ _Michel Marcus_, May 10 2019
%Y A131417 Cf. A007953, A131418.
%K A131417 easy,nonn,base
%O A131417 1,3
%A A131417 _Paolo P. Lava_ and _Giorgio Balzarotti_, Jul 09 2007