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.

A287353 a(0)=0; for n>0, a(n) = 10*a(n-1) + prime(n).

Original entry on oeis.org

0, 2, 23, 235, 2357, 23581, 235823, 2358247, 23582489, 235824913, 2358249159, 23582491621, 235824916247, 2358249162511, 23582491625153, 235824916251577, 2358249162515823, 23582491625158289
Offset: 0

Views

Author

Luke Zieroth, May 23 2017

Keywords

Crossrefs

Cf. A379426 (prime terms).

Programs

  • Mathematica
    FoldList[10 #1 + Prime@ #2 &, 0, Range@ 17] (* Michael De Vlieger, May 24 2017 *)
  • PARI
    a(n) = fromdigits(primes(n)); \\ Kevin Ryde, Jun 22 2022
  • Python
    from sympy import prime
    l = [0]
    for i in range(20):
        l += [10 * l[i] + prime(i + 1)]
    print(l) # Indranil Ghosh, May 25 2017
    

Formula

a(n) = Sum_{i=1..n} 10^(n-i)*prime(i), n >= 1. - Ya-Ping Lu, Dec 24 2024