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.

A178388 Concatenation of the first n primes written in base 3.

Original entry on oeis.org

2, 210, 21012, 2101221, 2101221102, 2101221102111, 2101221102111122, 2101221102111122201, 2101221102111122201212, 21012211021111222012121002, 210122110211112220121210021011, 2101221102111122201212100210111101
Offset: 1

Views

Author

Jonathan Vos Post, May 26 2010

Keywords

Examples

			a(4) = Concatenate[prime(1) base 3, prime(2) base 3, prime(3) base 3, prime(3) base 3] = Concatenate[2 base 3, 3 base 3, 5 base 3, 7 base 3] = Concatenate[2, 10, 12, 21] = 2101221.
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=15,p3},p3=IntegerDigits[Prime[Range[nn]],3];Table[FromDigits[Flatten[ Take[p3,n]]],{n,nn}]] (* Harvey P. Dale, Aug 25 2022 *)
  • PARI
    v = 0; for (n=1, 12, d = digits(prime(n), 3); v = v*10^#d + fromdigits(d); print1 (v ", ")) \\ Rémy Sigrist, Aug 07 2017

Extensions

Edited by N. J. A. Sloane, Jul 02 2017