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

 


a(n) is an n-digit number with digits in increasing order with 0 following 9 and this is maintained in the concatenation of any number of consecutive terms.
8

%I #29 May 26 2022 06:54:02

%S 1,23,456,7890,12345,678901,2345678,90123456,789012345,6789012345,

%T 67890123456,789012345678,9012345678901,23456789012345,

%U 678901234567890,1234567890123456,78901234567890123,456789012345678901,2345678901234567890,12345678901234567890

%N a(n) is an n-digit number with digits in increasing order with 0 following 9 and this is maintained in the concatenation of any number of consecutive terms.

%C a(n) is congruent to A000217(n), mod 10; i.e., the last digit of a(n) is the same as the last digit of the n-th triangular number, base 10 (A008954). - _Carl R. White_, Oct 21 2009

%H Robert Israel, <a href="/A062273/b062273.txt">Table of n, a(n) for n = 1..999</a>

%F From _Carl R. White_, Oct 21 2009: (Start)

%F a(n) = floor( 10^(10*ceiling(n/10) + (n*(n+1)/2 mod 10)) * 1234567890/9999999999 ) mod 10^n.

%F The generalized form g, for any integer base b (>2), is: g(b,n) = floor( b^(b*ceiling(n/b) + (n*(n+1)/2 mod b)) * floor( b^(b+1)/(b-1)^2 - (b+1) ) / (b^b-1)) mod b^n, so here a(n) = g(10,n). (End)

%F a(n) = Sum_{i=1..n} ((n*(n-1)/2+i) mod 10)*10^(n-i). - _Vedran Glisic_, Apr 08 2011

%e a(5) = 12345 as a(4) is 7890.

%p f:= proc(n) option remember: local d,t,k;

%p d:= procname(n-1) mod 10;

%p t:= 0:

%p for k from 1 to n do

%p d:= d+1 mod 10;

%p t:= t + d*10^(n-k)

%p od:

%p t

%p end proc:

%p f(1):= 1:

%p map(f, [$1..30]); # _Robert Israel_, Apr 02 2018

%t FromDigits/@Table[Take[PadRight[{},250,Join[Range[9],{0}]],{(n(n+1))/2+ 1,((n+1)(n+2))/2}],{n,0,20}] (* _Harvey P. Dale_, May 15 2015 *)

%o (PARI) a(n) = sum(i=1, n, ((n*(n-1)/2+i) % 10)*10^(n-i)); \\ _Michel Marcus_, May 26 2022

%o (Python)

%o def a(n): return sum((n*(n-1)//2+i)%10*10**(n-i) for i in range(1, n+1))

%o print([a(n) for n in range(1, 21)]) # _Michael S. Branicky_, May 26 2022 after _Michel Marcus_

%Y Cf. A000217, A008954.

%K nonn,base,easy

%O 1,2

%A _Amarnath Murthy_, Jun 17 2001

%E More terms from Larry Reeves (larryr(AT)acm.org), Jun 18 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 20 05:21 EDT 2024. Contains 376016 sequences. (Running on oeis4.)