OFFSET
1,1
COMMENTS
Concatenation of the consecutive integers 1..n, with n prepended (n > 0).
The terms a(1), a(7), a(31), and a(337) are primes (of the form n1...n).
a(3643) is a 13469-digit probable prime (the number of digits is also a prime).
These indices 7, 31, 337, 3643 are themselves primes of the form 6m+1.
For the known terms a(n) which are primes and for a(3643), a(n) == 2 (mod 3).
There is no other prime term for n < 15000 (and no prime term with prime index n < 25000).
LINKS
Winston de Greef, Table of n, a(n) for n = 1..367
G. L. Honaker, Jr. and Chris K. Caldwell, Prime Curios! 71234567
FORMULA
a(n) = concat(n, A007908(n)).
EXAMPLE
a(2) = 212 since it is the concatenation of the consecutive positive integers <= 2, with 2 prepended.
MATHEMATICA
aUpTo[n_] := Table[ FromDigits @ Flatten @ IntegerDigits @ {i, Range @ i}, {i, n}]; aUpTo[999]
PROG
(PARI) a(n) = my(s=Str(n)); for(k=1, n, s=Str(s, k)); eval(s); \\ Michel Marcus, Jan 20 2023
(Python)
def a(n): return int(str(n)+"".join(map(str, range(1, n+1))))
print([a(n) for n in range(1, 17)]) # Michael S. Branicky, Jan 20 2023
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Mikk Heidemaa, Jan 18 2023
STATUS
approved