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.

A230093 Number of values of k such that k + (sum of digits of k) is n.

This page as a plain text file.
%I A230093 #34 Feb 23 2021 09:24:52
%S A230093 1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,
%T A230093 1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,
%U A230093 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,2,1
%N A230093 Number of values of k such that k + (sum of digits of k) is n.
%C A230093 a(n) is the number of times n occurs in A062028.
%C A230093 For n>=1, a(10^n) = a(9*n-1). - _Max Alekseyev_, Feb 23 2021
%H A230093 Reinhard Zumkeller, <a href="/A230093/b230093.txt">Table of n, a(n) for n = 0..10000</a>
%H A230093 <a href="/index/Coi#Colombian">Index entries for Colombian or self numbers and related sequences</a>
%p A230093 # Maple code for A062028, A230093, A003052, A225793, A230094.
%p A230093 with(LinearAlgebra):
%p A230093 read transforms; # to get digsum
%p A230093 M := 1000; A062028 := Array(0..M); A230093 := Array(0..M);
%p A230093 for n from 0 to M do
%p A230093    m := n+digsum(n);
%p A230093    A062028[n] := m;
%p A230093    if m <= M then A230093[m] := A230093[m]+1; fi;
%p A230093 od:
%p A230093 t1:=[seq(A062028[i],i=0..M)]; # A062028 as list (but incorrect offset 1)
%p A230093 t2:=[seq(A230093[i],i=0..M)]; # A230093 as list, but then a(0) has index 1
%p A230093 # A003052 := COMPl(t1); # COMPl has issues, may be incorrect for M <> 1000
%p A230093 ctmax:=4;
%p A230093 for h from 0 to ctmax do ct[h] := []; od:
%p A230093 for i from 1 to M do
%p A230093    h := lis2[i];
%p A230093    if h <= ctmax then ct[h] := [op(ct[h]),i]; fi;
%p A230093 od:
%p A230093 A225793 := ct[1]; A230094 := ct[2]; # A003052 := ct[0]; # see there for better code
%t A230093 Module[{nn=110,a,b,c,d},a=Tally[Table[x+Total[IntegerDigits[x]],{x,0,nn}]];b=a[[All,1]];c={#,0}&/@Complement[Range[nn],b];d=Sort[Join[a,c]];d[[All, 2]]] (* _Harvey P. Dale_, Jun 12 2019 *)
%o A230093 (Haskell) a230093 n = length $ filter ((== n) . a062028) [n - 9 * a055642 n .. n]  -- _Reinhard Zumkeller_, Oct 11 2013
%o A230093 (PARI) apply( A230093(n)=sum(i=n>0,min(9*logint(n+!n,10)+8,n\2),sumdigits(n-i)==i), [1..150]) \\ _M. F. Hasler_, Nov 08 2018
%Y A230093 Cf. A006064, A007953 (sum of digits), A062028 (n + sum of its digits), A004207, A228085, A003052, A176995, A225793, A230094, A055642.
%Y A230093 Cf. A107740 (this applied to primes).
%K A230093 nonn,base
%O A230093 0,102
%A A230093 _N. J. A. Sloane_, Oct 10 2013
%E A230093 Edited by _M. F. Hasler_, Nov 08 2018