login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A290175 Smallest prime p such that A290174(i) = n, where i is the index of p in A000040. 1
2, 11, 41, 19, 71, 367, 587, 131, 1151, 1987, 4253, 8831, 11839, 117497, 12269, 28279, 297793, 167711, 1748653, 1427297, 7655719, 13992553, 4594229, 12932441, 54321763, 32833217, 112155839, 231132271, 211119257, 1154494127, 137764883 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
MATHEMATICA
f[n_] := Block[{p = Prime@ n, k = 0, w}, w = {p}; While[w != {}, w = Flatten@ Map[Block[{m = #, L = {}, q = 10, a, b, v}, While[q <= m, a = Floor[m/q]; b = Mod[m, q]; v = 10 q a + b; If[b >= q/10 && PrimeQ[v], AppendTo[L, v]]; q *= 10]; L] &, w]; k++]; k - 1]; With[{s = Array[f, 10^5]}, Map[If[# == 0, 0, Prime@ #] &@ First[FirstPosition[s, #] /. k_ /; MissingQ@ k -> {0}] &, Range[0, Max@ s]]] (* Michael De Vlieger, Jul 24 2017, after Giovanni Resta at A290174 *)
PROG
(PARI) insertzero(num, pos) = 10*(num-num%10^pos)+(num%10^pos)
zeroprimevec_num(n) = my(w=[]); for(k=1, #Str(n)-1, my(x=insertzero(n, k)); if(ispseudoprime(x), w=concat(w, [x]))); vecsort(w, , 8)
zeroprimevec_vec(v) = my(w=[]); for(k=1, #v, w=concat(w, zeroprimevec_num(v[k]))); vecsort(w, , 8)
a290174(n) = my(i=0, p=prime(n), v=zeroprimevec_num(p)); while(1, if(#v==0, return(i), i++); v=zeroprimevec_vec(v))
a(n) = my(x=1); while(1, if(a290174(x)==n, return(prime(x)), x++))
(PARI) first(n) = {n--; my(v = vector(n), todo = n, x=1); while(todo>0,
r = a290174(x); if(0<r&&r<=n, if(v[r]==0, v[r]=prime(x); todo--)); x++); concat([2], v)} \\ This prog uses the prog 'a290174' above. David A. Corneth, Jul 24 2017
CROSSREFS
Sequence in context: A308524 A335629 A000822 * A154813 A168367 A247101
KEYWORD
nonn,more
AUTHOR
Felix Fröhlich, Jul 24 2017
EXTENSIONS
a(20)-a(30) from Giovanni Resta, Jul 24 2017
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:06 EDT 2024. Contains 371967 sequences. (Running on oeis4.)