A098728 Consider the sequence {b(n), n >= 1} of digits of the natural (or counting) numbers: 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0... (A007376); a(n) = n - b(n).
0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 11, 11, 12, 13, 13, 15, 14, 17, 15, 19, 16, 21, 17, 23, 18, 25, 19, 27, 20, 28, 31, 30, 32, 32, 33, 34, 34, 36, 35, 38, 36, 40, 37, 42, 38, 44, 39, 46, 40, 47, 51, 49, 52, 51, 53, 53, 54, 55, 55, 57, 56, 59, 57, 61, 58, 63, 59, 65, 60, 66, 71, 68, 72
Offset: 0
Examples
The sequence of digits of the counting numbers is 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0... The 15th term, for instance, is a 2. Thus 15-2=13 is the 15th term of this sequence. Next one is a 1, thus 16 (the rank) - 1 (the 16th digit of the decimal expansion of the counting numbers) = 15, which is the 16th term of this sequence. Next one is 17-3=14
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
Programs
-
Mathematica
With[{c=Flatten[IntegerDigits/@Range[70]]},#[[1]]-#[[2]]&/@Partition[ Riffle[ Range[Length[c]],c],2]] (* Harvey P. Dale, Aug 07 2019 *)
Extensions
More terms from Stacy Hawthorne (shawtho1(AT)ashland.edu), Jan 12 2006
Comments