login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A269315 Numbers x that are the sum of the digits of some consecutive run of numbers x-1, x-2, x-3, ... 3

%I #11 May 22 2019 21:01:44

%S 3,12,15,21,24,30,33,42,51,60,69,120,135,144,150,159,168,177,186,195,

%T 210,237,243,258,267,291,300,333,342,357,372,423,447,468,492,513,540,

%U 558,579,594,603,630,645,654,660,675,720,735,747,777,792,810,825,837,873

%N Numbers x that are the sum of the digits of some consecutive run of numbers x-1, x-2, x-3, ...

%C All terms are multiples of 3.

%H Paolo P. Lava, <a href="/A269315/b269315.txt">Table of n, a(n) for n = 1..1000</a>

%e 3 = 2 + 1;

%e 12 = 1+1 + 1+0 + 9;

%e 15 = 1+4 + 1+3 + 1+2 + 1+1 + 1+0.

%p P:= proc(q) local a,b,c,k,n; for n from 1 to q do a:=0; b:=0;

%p while a<n do b:=b+1; c:=n-b; for k from 1 to ilog10(n-b)+1 do a:=a+(c mod 10); c:=trunc(c/10);

%p od; od; if a=n then print(n); fi; od; end: P(10^6);

%t Select[Range[3,1000], (x = # - 1; s = Total[IntegerDigits[x]]; While[s < #, x--; s += Total[IntegerDigits[x]]]; s == #) &] (* _Robert Price_, May 22 2019 *)

%Y Cf. A269314.

%K nonn,base,easy

%O 1,1

%A _Paolo P. Lava_, Feb 25 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 02:12 EDT 2024. Contains 371782 sequences. (Running on oeis4.)