OFFSET
1,2
COMMENTS
The old name was "Alternately concatenate the decimal digits from back to front 1...n such that n is always to the left.".
a(40714), with 192464 decimal digits, is the sequence's first (probable) prime. - Hans Havermann, Dec 17 2019
The terms at even indices are the same as the even-indexed terms of A053063. - Hans Havermann, Jan 16 2020
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..340
EXAMPLE
a(13) = 13119753124681012.
MAPLE
b:= proc(n) b(n):= `if`(n=1, 1, parse(cat(a(n-1), n))) end:
a:= proc(n) a(n):= `if`(n=1, 1, parse(cat(n, b(n-1)))) end:
seq(a(n), n=1..20); # Alois P. Heinz, Jan 18 2017
MATHEMATICA
f[n_] := Fold[ If[ Mod[n +#2, 2] == 0, #2, #1]*10^IntegerLength@ If[ Mod[n +#2, 2] == 0, #1, #2] +If[ Mod[n +#2, 2] == 1, #2, #1] &, 0, Range@ n]; Array[f, 17]
PROG
(Python)
def a(n):
....if n==1:
........return ["1"]
....return [str(n)]+a(n-1)[::-1]
def A281254(n):
....return "".join(a(n)) # Indranil Ghosh, Jan 23 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Jan 18 2017
EXTENSIONS
Edited by N. J. A. Sloane, Dec 07 2019
STATUS
approved