cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A137287 a(n) is the number 2 written (prime(n)-1)/2 times followed by the digit 1; a(1)=2.

Original entry on oeis.org

2, 21, 221, 2221, 222221, 2222221, 222222221, 2222222221, 222222222221, 222222222222221, 2222222222222221, 2222222222222222221, 222222222222222222221, 2222222222222222222221, 222222222222222222222221, 222222222222222222222222221, 222222222222222222222222222221
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 05 2008

Keywords

Comments

Sum of digits of a(n) = prime(n).

Examples

			prime(7)=17; (17-1)/2=8; a(7) = 222222221, 8*"2" concatenated with "1".
		

Crossrefs

Programs

  • PARI
    a(n) = if (n==1, 2, fromdigits(concat(vector((prime(n)-1)/2, k, 2), 1))); \\ Michel Marcus, Mar 15 2022

Formula

A007953(a(n)) = A000040(n). - Michel Marcus, Mar 15 2022

Extensions

More terms from Michel Marcus, Mar 15 2022