

A174911


Sequence by greedy construction satisfying LucierSá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(12):79102, 2008.
I. Z. Ruzsa. On measures on intersectivity. Acta Math. Hungar., 43(34):335340, 1984.
A. Sárközy. On difference sets of sequences of integers. III. Acta Math. Acad. Sci. Hungar., 31(34):355386, 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(n1)} is never one less than a prime.


EXAMPLE

a(1) = 1 by definition. a(2) cannot be 2 because 2a(1)=21=1 which is 1 less than 2=prime(1). a(2) cannot be 3 because 3a(1)=31=2 which is 1 less than 3=prime(2). a(2) = 4 because the next smallest integer 4 is such that 41=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 84=4 and 4+1 is 5 = prime(3). However, a(3)=9 because 91=8 (not 1 less than a prime) and 94=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(n1)+1 do wrks := true; for i from 1 to n1 do if isprime(abs(aprocname(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, n1], k] && AllTrue[Abs[kaa], !PrimeQ[#+1]&], Return[k]]]; Array[a, 50] (* JeanFranç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



