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.
%I A007942 #46 Jan 01 2024 02:18:59 %S A007942 1,212,32123,4321234,543212345,65432123456,7654321234567, %T A007942 876543212345678,98765432123456789,109876543212345678910, %U A007942 1110987654321234567891011,12111098765432123456789101112,131211109876543212345678910111213,1413121110987654321234567891011121314 %N A007942 Decimal concatenation of sequence (n, n-1, ..., 2, 1, 2, ..., n-1, n). %C A007942 For n <= 1530, only a(13) = 131211109876543212345678910111213 is prime. - _XU Pingya_, May 21 2017 %H A007942 Michael S. Branicky, <a href="/A007942/b007942.txt">Table of n, a(n) for n = 1..202</a> %H A007942 F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/OPNS.pdf">Only Problems, Not Solutions!</a> %p A007942 a:= n-> parse(cat(n-i$i=0..n-1, $2..n)): %p A007942 seq(a(n), n=1..23); # _Alois P. Heinz_, Dec 19 2021 %t A007942 Table[d = Flatten[IntegerDigits /@ Range@ n]; FromDigits@ Flatten[{Reverse@ d, Rest@ d}, 1], {n, 11}] (* _Michael De Vlieger_, Aug 20 2015 *) %o A007942 (PARI) a(n) = s = ""; forstep (k=n,1,-1, s = concat(s, k)); for (k=2, n, s = concat(s, k)); eval(s); \\ _Michel Marcus_, Aug 20 2015 %o A007942 (Python) %o A007942 from itertools import count, islice %o A007942 def agen(): # generator of terms %o A007942 s = "1" %o A007942 for n in count(2): %o A007942 yield int(s) %o A007942 s = str(n) + s + str(n) %o A007942 print(list(islice(agen(), 14))) # _Michael S. Branicky_, Dec 09 2022 %o A007942 (Python) %o A007942 def A007942(n): return int(''.join(map(str,range(n,1,-1)))+''.join(map(str,range(1,n+1)))) # _Chai Wah Wu_, Mar 21 2023 %K A007942 nonn,base,easy %O A007942 1,2 %A A007942 R. Muller