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.

A276481 Numbers k such that b(k) is prime, where b(1) = prime(1) = 2, b(n) = 10*b(n-1) + (prime(n) mod 10).

Original entry on oeis.org

1, 2, 4, 13, 16, 17, 28, 34, 90, 100, 132, 331, 534, 7923, 10157, 40197
Offset: 1

Views

Author

Thomas Ordowski, Sep 05 2016

Keywords

Comments

Primes in the sequence b(n) are 2, 23, 2357, 2357137939171, ...
a(17) > 50000. - Michael S. Branicky, Aug 12 2025

Crossrefs

Programs

  • Maple
    Res:= NULL: p:= 0: b:= 0:
    for n from 1 to 600 do
      p:= nextprime(p);
      b:= 10*b + (p mod 10);
      if isprime(b) then Res:= Res, n fi
    od:
    Res; # Robert Israel, Sep 05 2016
  • Mathematica
    b[1] = Prime@ 1; b[n_] := b[n] = 10 b[n - 1] + Mod[Prime@ n, 10]; Select[Range[10^3], PrimeQ@ b[#] &] (* Michael De Vlieger, Sep 06 2016 *)
  • PARI
    b(n) = if (n==1, 2, 10*b(n-1) + (prime(n) % 10));
    isok(n) = isprime(b(n)); \\ Michel Marcus, Sep 05 2016
    
  • PARI
    list(lim)=my(v=List(),s,n); forprime(p=2,, if(n++>lim, return(Vec(v))); if(ispseudoprime(s=10*s+p%10), listput(v, n))) \\ Charles R Greathouse IV, Sep 05 2016

Formula

{k | A386964(k) is prime}. - Michael S. Branicky, Aug 12 2025

Extensions

a(7)-a(13) from Michel Marcus, Sep 05 2016
a(14) from Robert Israel, Sep 05 2016
a(15)-a(16) from Michael S. Branicky, Aug 11 2025