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!)
A001704 a(n) = n concatenated with n + 1. 30
12, 23, 34, 45, 56, 67, 78, 89, 910, 1011, 1112, 1213, 1314, 1415, 1516, 1617, 1718, 1819, 1920, 2021, 2122, 2223, 2324, 2425, 2526, 2627, 2728, 2829, 2930, 3031, 3132, 3233, 3334, 3435, 3536, 3637, 3738, 3839, 3940, 4041, 4142, 4243, 4344, 4445, 4546 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
See A030457 for the indices of prime terms in this sequence. - Reinhard Zumkeller, Jun 27 2015 [Simplified by Jianing Song, Jan 27 2019]
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..25000 (first 1000 terms from T. D. Noe)
MAPLE
f:=proc(i) i*10^(1+floor(evalf(log10(i+1), 10)))+i+1; end: # gives a(n) - N. J. A. Sloane, Aug 04 2012
# alternative Maple program:
a:= n-> parse(cat(n, n+1)):
seq(a(n), n=1..55); # Alois P. Heinz, Jul 05 2018
MATHEMATICA
Table[FromDigits@Flatten@IntegerDigits[{n, n + 1}], {n, 100}] (* T. D. Noe, Aug 09 2012 *)
PROG
(Haskell)
a001704 n = a001704_list !! (n-1)
a001704_list = map read (zipWith (++) iss $ tail iss) :: [Integer]
where iss = map show [1..]
-- Reinhard Zumkeller, Oct 07 2014
(PARI) a(n)=eval(Str(n, n+1)) \\ Charles R Greathouse IV, Jul 23 2016
(Emacs Lisp)
;; Concatenation
(defun A001704 (n) (string-to-int (concat (int-to-string n) (int-to-string (1+ n)))))
;; Formula
(defun A001704 (n) (1+ n (* n (expt 10 (1+ (floor (log (1+ n) 10)))))))
(mapcar '(lambda (n) (cons n (A001704 n))) '(1 2 3 10 11 12 99 999)) => ((1 . 12) (2 . 23) (3 . 34) (10 . 1011) (11 . 1112) (12 . 1213) (99 . 99100) (999 . 9991000))
; Tim Chambers, Jul 07 2018
(Magma) [Seqint(Intseq(n+1) cat Intseq(n)): n in [1..50]]; // Vincenzo Librandi, Jul 08 2018
(Python) for n in range(1, 100): print(str(n)+str(n+1)) # David F. Marrs, Sep 17 2018
(Scala) val numerStrs = (1 to 50).map(Integer.toString(_)).toList
val concats = (numerStrs.dropRight(1)) zip (numerStrs.drop(1))
concats.map(x => Integer.parseInt(x._1 + x._2)) // Alonso del Arte, Oct 24 2019
CROSSREFS
See A127421 for a version with offset 0.
Sequence in context: A363820 A072485 A035333 * A127421 A112131 A233032
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Joshua Zucker and Jon E. Schoenfield, May 15 2007
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 27 20:19 EDT 2024. Contains 372020 sequences. (Running on oeis4.)