A137287 a(n) is the number 2 written (prime(n)-1)/2 times followed by the digit 1; a(1)=2.
2, 21, 221, 2221, 222221, 2222221, 222222221, 2222222221, 222222222221, 222222222222221, 2222222222222221, 2222222222222222221, 222222222222222222221, 2222222222222222222221, 222222222222222222222221, 222222222222222222222222221, 222222222222222222222222222221
Offset: 1
Examples
prime(7)=17; (17-1)/2=8; a(7) = 222222221, 8*"2" concatenated with "1".
Programs
-
PARI
a(n) = if (n==1, 2, fromdigits(concat(vector((prime(n)-1)/2, k, 2), 1))); \\ Michel Marcus, Mar 15 2022
Formula
Extensions
More terms from Michel Marcus, Mar 15 2022
Comments