cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A062273 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.

This page as a plain text file.
%I A062273 #29 May 26 2022 06:54:02
%S A062273 1,23,456,7890,12345,678901,2345678,90123456,789012345,6789012345,
%T A062273 67890123456,789012345678,9012345678901,23456789012345,
%U A062273 678901234567890,1234567890123456,78901234567890123,456789012345678901,2345678901234567890,12345678901234567890
%N A062273 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 A062273 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 A062273 Robert Israel, <a href="/A062273/b062273.txt">Table of n, a(n) for n = 1..999</a>
%F A062273 From _Carl R. White_, Oct 21 2009: (Start)
%F A062273 a(n) = floor( 10^(10*ceiling(n/10) + (n*(n+1)/2 mod 10)) * 1234567890/9999999999 ) mod 10^n.
%F A062273 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 A062273 a(n) = Sum_{i=1..n} ((n*(n-1)/2+i) mod 10)*10^(n-i). - _Vedran Glisic_, Apr 08 2011
%e A062273 a(5) = 12345 as a(4) is 7890.
%p A062273 f:= proc(n) option remember: local d,t,k;
%p A062273   d:= procname(n-1) mod 10;
%p A062273   t:= 0:
%p A062273   for k from 1 to n do
%p A062273     d:= d+1 mod 10;
%p A062273     t:= t + d*10^(n-k)
%p A062273   od:
%p A062273 t
%p A062273 end proc:
%p A062273 f(1):= 1:
%p A062273 map(f, [$1..30]); # _Robert Israel_, Apr 02 2018
%t A062273 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 A062273 (PARI) a(n) = sum(i=1, n, ((n*(n-1)/2+i) % 10)*10^(n-i)); \\ _Michel Marcus_, May 26 2022
%o A062273 (Python)
%o A062273 def a(n): return sum((n*(n-1)//2+i)%10*10**(n-i) for i in range(1, n+1))
%o A062273 print([a(n) for n in range(1, 21)]) # _Michael S. Branicky_, May 26 2022 after _Michel Marcus_
%Y A062273 Cf. A000217, A008954.
%K A062273 nonn,base,easy
%O A062273 1,2
%A A062273 _Amarnath Murthy_, Jun 17 2001
%E A062273 More terms from Larry Reeves (larryr(AT)acm.org), Jun 18 2001