login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A281254 Alternately concatenate the decimal digits from back to front 1...n such that n is always to the left. 2
1, 21, 312, 4213, 53124, 642135, 7531246, 86421357, 975312468, 10864213579, 1197531246810, 121086421357911, 13119753124681012, 1412108642135791113, 151311975312468101214, 16141210864213579111315, 1715131197531246810121416 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(n) is not prime for any n <= 3000.

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

Cf. A000422, A007908, A138793, A138957, A281253.

Sequence in context: A198376 A306428 A317201 * A157088 A226990 A016321

Adjacent sequences:  A281251 A281252 A281253 * A281255 A281256 A281257

KEYWORD

nonn,base,easy

AUTHOR

Robert G. Wilson v, Jan 18 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 25 01:28 EDT 2019. Contains 323534 sequences. (Running on oeis4.)