A007923 Lengths increase by 1, digits cycle through positive digits.
1, 23, 456, 7891, 23456, 789123, 4567891, 23456789, 123456789, 1234567891, 23456789123, 456789123456, 7891234567891, 23456789123456, 789123456789123, 4567891234567891, 23456789123456789, 123456789123456789
Offset: 1
References
- C. Ashbacher, Some Problems Concerning the Smarandache Deconstructive Sequence, J. Recreational Mathematics, Vol. 29, No. 2, pages 82-84.
- K. Atanassov, On the 4th Smarandache Problem, Notes on Number Theory and Discrete Mathematics, Sophia, Bulgaria, Vol. 5 (1999), No. 1, 33-35.
Links
- John Cerkan, Table of n, a(n) for n = 1..994
- K. Atanassov, On Some of Smarandache's Problems
- F. Smarandache, Only Problems, Not Solutions!
- Eric Weisstein's World of Mathematics, Smarandache Sequences
Programs
-
Mathematica
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 *)
-
PARI
a(n)=my(m=(n*(n+1)/2-1)%9); sum(k=0,n-1,10^k*((m-k)%9+1))
Formula
a(n) = (10^9+1) a(n-9) - 10^9 a(n-18), n>=18. - corrected by Michael Somos, Sep 28 2002
a(n) = Sum_{i=1..n} ((n*(n-1)/2+i-1 mod 9)+1)*10^(n-i). - Vedran Glisic, Apr 08 2011
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