OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
EXAMPLE
a(2) = 49 because 2^2 = 4 and 3^2 = 9.
a(3) = 916 because 3^2 = 9 and 4^2 = 16.
a(4) = 1625 because 4^2 = 16 and 5^2 = 25.
MAPLE
a:= n-> parse(cat(n^2, (n+1)^2)):
seq(a(n), n=0..40); # Alois P. Heinz, May 27 2018
MATHEMATICA
Table[FromDigits[Join[IntegerDigits[n^2], IntegerDigits[(n + 1)^2]]], {n, 0, 39}] (* Alonso del Arte, Sep 13 2014 *)
PROG
(Magma) [1] cat [Seqint(Intseq(n^2+2*n+1) cat Intseq(n^2)): n in [1..50]]; // Vincenzo Librandi, Sep 13 2014
(PARI) a(n) = eval(Str(n^2, (n+1)^2)) \\ Michel Marcus, Sep 13 2014 and M. F. Hasler, May 27 2018
(PARI) A246973(n)=n^2*10^logint(10*(n+1)^2, 10)+(n+1)^2 \\ Over 4 x faster than using eval(Str(...)). - M. F. Hasler, May 27 2018
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, Sep 13 2014
STATUS
approved