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.

A386964 a(1) = prime(1) = 2, a(n) = 10*a(n-1) + (prime(n) mod 10).

Original entry on oeis.org

2, 23, 235, 2357, 23571, 235713, 2357137, 23571379, 235713793, 2357137939, 23571379391, 235713793917, 2357137939171, 23571379391713, 235713793917137, 2357137939171373, 23571379391713739, 235713793917137391, 2357137939171373917, 23571379391713739171, 235713793917137391713
Offset: 1

Views

Author

Michael S. Branicky, Aug 11 2025

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<1, 0, a(n-1)*10+irem(ithprime(n), 10)) end:
    seq(a(n), n=1..21);  # Alois P. Heinz, Aug 12 2025
  • Mathematica
    a[1]=2;a[n_]:=10a[n-1]+Mod[Prime[n],10];Array[a,21] (* James C. McMahon, Aug 12 2025 *)
  • Python
    from sympy import nextprime
    from itertools import islice
    def A386964(): # generator of terms
        an = pn = 2
        while True:
            yield an
            an = 10*an + (pn:=nextprime(pn))%10
    print(list(islice(A386964(), 21)))

Formula

a(n) = concatenation of A007652(1)..A007652(n).