The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A334259 Self-locating numbers within the Copeland-Erdős constant: numbers k such that the string k is at the 0-indexed position k in the decimal digits of the concatenation of the prime numbers as a decimal sequence. 0
37, 3790, 4991, 38073, 908979, 8378611, 62110713, 87126031, 8490820681, 9514920697, 24717215429, 784191725098, 836390891918 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This is inspired by the self-locating digits in Pi (A057680). Similar to A064810, these digits are 0-indexed, whereas in A057680 the sequence is 1-indexed.
The first two terms of the 1-indexed sequence are 8031711 and 648967141. - Giovanni Resta, Apr 22 2020
LINKS
EXAMPLE
37 is a term because the 3 digit of 37 appears in the 37th 0-indexed position of the Copeland-Erdős constant.
MATHEMATICA
q=23; p=3; dq=2; dn=dp=1; L={}; n=-1; pP=nP=10; While[++n < 10^6, If[n == nP, nP *= 10; dn++]; While[ q<n, p = NextPrime[p]; If[p > pP, pP *= 10; dp++]; q = q pP + p; dq += dp]; If[n == Floor[ q/10^(dq - dn)], Print@ AppendTo[L, n]]; q = Mod[q, 10^(--dq)]]; L (* Giovanni Resta, Apr 21 2020 *)
PROG
(Python)
import sympy
from sympy import sieve
def digits_at(ss, n):
''' Extracts len(str(n)) digits at position n.'''
t = len(str(n))
s = ss[n:n+t]
if s == '':
return -1
return int(s)
def self_locating(ss, n):
return digits_at(ss, n) == n
SS = ""
for p in sieve.primerange(2, 100000):
SS += str(p)
for i in range(100000):
if self_locating(SS, i):
print(i, end=", ")
CROSSREFS
Sequence in context: A074992 A231522 A030095 * A139043 A305142 A125599
KEYWORD
nonn,base,more
AUTHOR
Soren Telfer, Apr 20 2020
EXTENSIONS
a(3)-a(13) from Giovanni Resta, Apr 22 2020
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 June 4 15:08 EDT 2024. Contains 373099 sequences. (Running on oeis4.)