login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A276481 Numbers n such that b(n) is a prime, where b(1) = prime(1) = 2, b(n) = 10*b(n-1) + (prime(n) mod 10). 0
1, 2, 4, 13, 16, 17, 28, 34, 90, 100, 132, 331, 534, 7923 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Primes in the sequence b(n) are 2, 23, 2357, 2357137939171, ...

LINKS

Table of n, a(n) for n=1..14.

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

PROG

(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

CROSSREFS

Cf. A007652, A069151.

Sequence in context: A116662 A024580 A074097 * A287684 A033628 A077319

Adjacent sequences:  A276478 A276479 A276480 * A276482 A276483 A276484

KEYWORD

nonn,base

AUTHOR

Thomas Ordowski, Sep 05 2016

EXTENSIONS

a(7)-a(13) from Michel Marcus, Sep 05 2016

a(14) from Robert Israel, Sep 05 2016

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 25 00:39 EST 2018. Contains 299630 sequences. (Running on oeis4.)