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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A317756 Number of distinct primes obtained by cyclically shifting the decimal digits of the n-th prime. 1
1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 3, 2, 3, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 3, 2, 2, 2, 3, 1, 1, 1, 2, 2, 3, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,6

COMMENTS

First occurrence of k, k=1,2,3,...: 2, 13, 113, 1193, 11939, 193939, 17773937, 119139133, ..., . A247153.

a(n) is equal to the row index of prime(n) in A317716.

Every positive integer occurs in this sequence if and only if A247153(i) != 0 for every i >= 1.

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = A262988(A000040(n)).

MAPLE

P:=proc(n) local a, b, c, k, x; a:=ithprime(n); c:=[a]; x:=1;

for k from 1 to ilog10(a) do

b:=(a mod 10^k)*10^(ilog10(trunc(a/10^k))+1)+trunc(a/10^k);

if isprime(b) and numboccur(c, b)=0 then x:=x+1; c:=[op(c), b]; fi;

od; x; end: seq(P(i), i=1..105); # Paolo P. Lava, Aug 08 2018

MATHEMATICA

f[n_] := Block[{len = IntegerLength@n, s = {n}}, Do[AppendTo[s, FromDigits@RotateRight@IntegerDigits@s[[k - 1]]], {k, 2, len}]; DeleteDuplicates@Select[s, PrimeQ]] (* after Michael De Vlieger in A262988 *); Array[Length@f@Prime@# &, 105] (* Robert G. Wilson v, Aug 06 2018 *)

PROG

(PARI) eva(n) = subst(Pol(n), x, 10)

rot(n) = if(#Str(n)==1, v=vector(1), v=vector(#n-1)); for(i=2, #n, v[i-1]=n[i]); u=vector(#n); for(i=1, #n, u[i]=n[i]); v=concat(v, u[1]); v

count_primes(n) = my(d=digits(n), i=0); while(1, if(ispseudoprime(eva(d)), i++); d=rot(d); if(d==digits(n), return(i)))

a(n) = my(p=prime(n)); count_primes(p) \\ Felix Fröhlich, Aug 06 2018

CROSSREFS

Cf. A000040, A262988, A247153, A317716.

Sequence in context: A083019 A137865 A052494 * A039998 A316089 A000999

Adjacent sequences:  A317753 A317754 A317755 * A317757 A317758 A317759

KEYWORD

base,easy,nonn

AUTHOR

Felix Fröhlich and Robert G. Wilson v, Aug 06 2018

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 13 18:14 EDT 2019. Contains 327981 sequences. (Running on oeis4.)