login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A281253 Alternately concatenate the decimal digits from front to back 1...n such that n is always to the right. 2
1, 12, 213, 3124, 42135, 531246, 6421357, 75312468, 864213579, 97531246810, 1086421357911, 119753124681012, 12108642135791113, 1311975312468101214, 141210864213579111315, 15131197531246810121416, 1614121086421357911131517 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) is prime for n: 121, 1399 and no others < 3000.
LINKS
EXAMPLE
a(13) = 12108642135791113.
MAPLE
b:= proc(n) b(n):= `if`(n=1, 1, parse(cat(n, a(n-1)))) end:
a:= proc(n) a(n):= `if`(n=1, 1, parse(cat(b(n-1), n))) end:
seq(a(n), n=1..20); # Alois P. Heinz, Jan 18 2017
MATHEMATICA
f[n_] := Fold[ If[ Mod[n +#2, 2] == 0, #1, #2]*10^IntegerLength@ If[ Mod[n +#2, 2] == 0, #2, #1] +If[ Mod[n +#2, 2] == 0, #2, #1] &, 0, Range@ n]; Array[f, 17]
PROG
(Python)
def a(n):
....if n==1:
........return ["1"]
....return a(n-1)[::-1]+[str(n)]
def A281253(n):
....return "".join(a(n)) # Indranil Ghosh, Jan 27 2017
CROSSREFS
Sequence in context: A296681 A231260 A317199 * A184711 A262739 A027487
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)