%I #43 Dec 04 2023 02:35:32
%S 1,23,456,7891,23456,789123,4567891,23456789,123456789,1234567891,
%T 23456789123,456789123456,7891234567891,23456789123456,
%U 789123456789123,4567891234567891,23456789123456789,123456789123456789
%N Lengths increase by 1, digits cycle through positive digits.
%D C. Ashbacher, Some Problems Concerning the Smarandache Deconstructive Sequence, J. Recreational Mathematics, Vol. 29, No. 2, pages 82-84.
%D K. Atanassov, On the 4th Smarandache Problem, Notes on Number Theory and Discrete Mathematics, Sophia, Bulgaria, Vol. 5 (1999), No. 1, 33-35.
%H John Cerkan, <a href="/A007923/b007923.txt">Table of n, a(n) for n = 1..994</a>
%H K. Atanassov, <a href="http://www.gallup.unm.edu/~smarandache/Atanassov-SomeProblems.pdf">On Some of Smarandache's Problems</a>
%H F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/OPNS.pdf">Only Problems, Not Solutions!</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SmarandacheSequences.html">Smarandache Sequences</a>
%F a(n) = (10^9+1) a(n-9) - 10^9 a(n-18), n>=18. - corrected by _Michael Somos_, Sep 28 2002
%F a(n) = Sum_{i=1..n} ((n*(n-1)/2+i-1 mod 9)+1)*10^(n-i). - _Vedran Glisic_, Apr 08 2011
%F a(n) = floor(10^(n*(n+1)/2)*123456789/999999999) - 10^n*floor(10^(n*(n-1)/2)*123456789/999999999). - _Néstor Jofré_, Jun 03 2017
%t A007923[n_Integer] := Module[{result = 0},Do[ result += (Mod[(n*(n - 1)/2 + i - 1), 9] + 1) * 10^(n - i),{i, 1, n} ]; result ]; Table[A007923[n],{n,18}] (* _James C. McMahon_, Dec 04 2023 *)
%o (PARI) a(n)=my(m=(n*(n+1)/2-1)%9); sum(k=0,n-1,10^k*((m-k)%9+1))
%Y Cf. A001369, A007924, A050234, A066547.
%K nonn,easy,base
%O 1,2
%A R. Muller