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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A104645 Difference between the previous and the next primes to x, where x is the number obtained from concatenation of the first n primes (A019518). 0
10, 6, 20, 24, 24, 60, 18, 48, 100, 48, 156, 74, 88, 68, 42, 126, 366, 106, 186, 136, 228, 104, 30, 246, 52, 218, 814, 58, 536, 174, 90, 924, 180, 298, 120, 330, 96, 508, 504, 60, 762, 588, 330, 138, 552, 726, 452, 634, 660, 354, 534, 1770, 52, 262, 834, 790, 250, 624 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,1

LINKS

Table of n, a(n) for n=2..59.

FORMULA

a(n) = A151800(A019518(n)) - A151799(A019518(n))

EXAMPLE

For n=4, concatenate(2,3,5,7) gives 2357. The closest other primes are 2371 and 2351 and their difference is a(4)=20.

MATHEMATICA

<<NumberTheory`NumberTheoryFunctions` sz[x_] :=FromDigits[Flatten[Table[IntegerDigits[Prime[j]], {j, 1, x}], 1]] Table[NextPrime[sz[w]]-PreviousPrime[sz[w]], {w, 1, 100}]

PROG

(PARI) A019518(n)=my(k=""); forprime(p=2, prime(n), k=Str(k, p)); eval(k)

a(n)=my(k=A019518(n)); nextprime(k+1)-precprime(k-1)

CROSSREFS

Cf. A019518, A074809, A104462, A104463.

Sequence in context: A167873 A033986 A049004 * A181107 A234974 A248593

Adjacent sequences:  A104642 A104643 A104644 * A104646 A104647 A104648

KEYWORD

nonn,base

AUTHOR

Labos Elemer, Mar 18 2005

EXTENSIONS

Corrected, extended, and edited; also new program from Charles R Greathouse IV, Apr 28 2010

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 May 22 06:32 EDT 2019. Contains 323478 sequences. (Running on oeis4.)