login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A174911 Sequence by greedy construction satisfying Lucier-Sárközy difference set condition. 2
1, 4, 9, 12, 33, 36, 57, 60, 65, 68, 119, 122, 209, 212, 217, 220, 623, 626, 713, 716, 721, 724, 745, 748, 897, 900, 987, 990, 2561, 2564, 2779, 2782, 3807, 3810, 3891, 3894, 4199, 4202, 4585, 4588, 5339, 5342, 5459, 5462, 5963, 5966, 8643, 8646, 12085, 12088 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Ruzsa proves that if N is an integer and A contained in {1, . . . ,N} is such that the difference between any two elements of A is never one less than a prime, then |A| = O(N exp(-c*(log N)^(1/4))) for some absolute c > 0.

REFERENCES

J. Lucier. Difference sets and shifted primes. Acta Math. Hungar., 120(1-2):79-102, 2008.

I. Z. Ruzsa. On measures on intersectivity. Acta Math. Hungar., 43(3-4):335-340, 1984.

A. Sárközy. On difference sets of sequences of integers. III. Acta Math. Acad. Sci. Hungar., 31(3-4):355-386, 1978.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..274

Imre Z. Ruzsa, Tom Sanders, Difference sets and the primes, April 1, 2010.

FORMULA

a(1) = 1. a(n) = least positive integer k such that the difference between any two elements of [a(1), ..., a(n-1)} is never one less than a prime.

EXAMPLE

a(1) = 1 by definition. a(2) cannot be 2 because 2-a(1)=2-1=1 which is 1 less than 2=prime(1). a(2) cannot be 3 because 3-a(1)=3-1=2 which is 1 less than 3=prime(2). a(2) = 4 because the next smallest integer 4 is such that 4-1=3 and 3+1 is not prime. Next, a(3) cannot be 5 or 6 because as above, an increment of 1 or 2 above the previous value does not work. a(3) cannot be 8 because 8-4=4 and 4+1 is 5 = prime(3). However, a(3)=9 because 9-1=8 (not 1 less than a prime) and 9-4=5 (not 1 less than a prime).

MAPLE

A174911 := proc(n) option remember ; local wrks, a, i; if n = 1 then 1; elif n = 2 then 4; else for a from procname(n-1)+1 do wrks := true; for i from 1 to n-1 do if isprime(abs(a-procname(i))+1) then wrks := false; break; end if; end do; if wrks then return a; end if; end do: end if: end proc: seq(A174911(n), n=1..80) ; # R. J. Mathar, Apr 15 2010

MATHEMATICA

a[1] = 1; a[n_] := a[n] = For[k = 2, True, k++, If[FreeQ[aa = Array[a, n-1], k] && AllTrue[Abs[k-aa], !PrimeQ[#+1]&], Return[k]]]; Array[a, 50] (* Jean-François Alcover, Nov 07 2017 *)

CROSSREFS

Cf. A000040, A131849.

Sequence in context: A083351 A055381 A287498 * A032820 A197615 A125848

Adjacent sequences:  A174908 A174909 A174910 * A174912 A174913 A174914

KEYWORD

nonn

AUTHOR

Jonathan Vos Post, Apr 01 2010

EXTENSIONS

More terms from R. J. Mathar, Apr 15 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 December 2 23:30 EST 2021. Contains 349445 sequences. (Running on oeis4.)