This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A000422 Concatenation of numbers from n down to 1. 50

%I

%S 1,21,321,4321,54321,654321,7654321,87654321,987654321,10987654321,

%T 1110987654321,121110987654321,13121110987654321,1413121110987654321,

%U 151413121110987654321,16151413121110987654321,1716151413121110987654321,181716151413121110987654321

%N Concatenation of numbers from n down to 1.

%C The first prime term in this sequence is a(82). - _Artur Jasinski_, Mar 30 2008

%C For n < 10^4, a(n)/A000217(n) is an integer for n = 1, 2, and 18. The integers are 1, 7 (prime), and 1062667552123515268933651, respectively. - _Derek Orr_, Sep 04 2014

%C There are no further prime terms up to n=4000. - _Daniel Arribas_, Jun 04 2016

%D F. Smarandache, "Properties of the Numbers", University of Craiova Archives, 1975; Arizona State University Special Collections, Tempe, AZ

%H T. D. Noe, <a href="/A000422/b000422.txt">Table of n, a(n) for n = 1..150</a>

%H R. W. Stephan, <a href="http://www.ark.in-berlin.de/sm.pdf">Factors and primes in two Smarandache sequences</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ConsecutiveNumberSequences.html">Consecutive Number Sequences</a>

%F a(n+1) = (n+1)*10^len(a(n)) + a(n), where len(k) = number of digits in k.

%p a[1]:= 1:

%p for n from 2 to 100 do

%p a[n]:= n*10^(1+ilog10(a[n-1])) + a[n-1]

%p od:

%p seq(a[n],n=1..100); # _Robert Israel_, Sep 05 2014

%t b = {}; a = {}; Do[w = RealDigits[n]; w = First[w]; Do[PrependTo[a, w[[Length[w] - k + 1]]], {k, 1, Length[w]}]; p = FromDigits[a]; AppendTo[b, p], {n, 1, 30}]; b (* _Artur Jasinski_, Mar 30 2008 *)

%o (PARI) a(n)=my(t=n);forstep(k=n-1,1,-1,t=t*10^#Str(k)+k);t \\ _Charles R Greathouse IV_, Jul 15 2011

%o (PARI) A000422(n,p=1,L=1)=sum(k=1,n,k*p*=L+(k==L&&!L*=10)) \\ _M. F. Hasler_, Nov 02 2016

%Y Cf. A007908, A058183, A104759, A116504, A116505, A138789, A138790, A138793.

%K nonn,base

%O 1,2

%A R. Muller

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.