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.

Showing 1-2 of 2 results.

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).

A385721 Primes in A386964.

Original entry on oeis.org

2, 23, 2357, 2357137939171, 2357137939171373, 23571379391713739, 2357137939171373917139397137, 2357137939171373917139397137937179, 235713793917137391713939713793717991737391137913793911739171337137177939739397199113939713, 2357137939171373917139397137937179917373911379137939117391713371371779397393971991139397137971939131
Offset: 1

Views

Author

Rajsaday Dutt, Aug 04 2025

Keywords

Comments

From Michael S. Branicky, Aug 12 2025: (Start)
Also, numbers b(k) such that b(k) is prime, where b(1) = prime(1) = 2, b(n) = 10*b(n-1) + (prime(n) mod 10), as noted in Comments in A276481.
a(n) has A276481(n) digits, so a(14) has 7923 digits. (End)

Crossrefs

Programs

  • Mathematica
    a[1]=2; a[n_]:=10a[n-1]+Mod[Prime[n], 10];Select[Array[a,100],PrimeQ] (* James C. McMahon, Aug 16 2025 *)

Formula

a(n) = A386964(A276481(n)). - Michael S. Branicky, Aug 12 2025
Showing 1-2 of 2 results.