cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A276435 Smallest integer z > 1 that satisfies all the integer congruences z mod i = b(i) mod i, where b(i) is the i-th composite between prime(k) and prime(k+1), 0 < i < prime(k+1) - prime(k) - 1, and k > 1 is the smallest integer not used by previous terms of the sequence.

Original entry on oeis.org

23, 31, 47, 53, 13, 23, 89, 113, 11, 139, 31, 37, 47, 53, 181, 199, 211, 53, 241, 11, 17, 23, 31, 283, 293, 317, 31, 337, 53, 359, 7, 13, 23, 389, 401, 409, 421, 13, 23, 29, 467, 59, 71, 23, 509, 523, 547, 17, 23, 31, 577, 47, 53, 7, 619, 631, 47, 53, 661, 17, 263, 691, 281, 709, 299, 7, 13, 323
Offset: 1

Views

Author

Andres Cicuttin, Sep 02 2016

Keywords

Comments

1) All lists of consecutive composites are checked in order. The first list is empty since for k=1 there are no numbers between prime(k)=2 and prime(k+1)=3.
2) The second list of composites corresponds to k=2 and is made by numbers between prime(k)=3 and prime(k+1)=5 which consists of the number 4 only. But for this number the smallest number z that satisfies "z mod 1 = 4 mod 1" is z=0 and since this is not greater than 1, z=0 is not in the sequence.
3) To find the first element of the sequence we must keep on increasing k until the list of i composites {C1,C2,C3,...,Ci} between prime(k) and prime(k+1) is such that the smallest number z that satisfies the integer congruences "z mod 1 = C1 mod 1", "z mod 2 = C1 mod 2", "z mod 3 = C3 mod 3", ... "z mod i = Ci mod i", is greater than 1.
The first k for which the previous condition is satisfied is k=9, as explained in the Example section. So the first term of the sequence is a(1)=23.
4) Following this algorithm we find that a(n=2)=31 with k=11, and a(n=11) =31 with k=36. The value 31 is also assigned to a(n=23) obtained with k=58. In fact for k=58 we have the i=5 composites 272, 273,274, 275 and 276 (between prime(58)=271 and prime(59)=277), and z=31 is the smallest number greater than 1 that satisfies the corresponding five congruences.
The four scatter plots of the first elements obtained exploring respectively the first 10^2, 10^3, 10^4 and 10^5 primes shows similar peculiar patterns which suggests self-similarity and quite probably a fractal structure (see plots in link).

Examples

			The first term is obtained with k = 9 for which prime(9)=23, prime(10)=29, and its corresponding i=5 intermediate composites are 24, 25, 26, 27 and 28, then a(1) = z = 23 because this is the smallest integer that satisfies all five integer congruences:
z mod 1 = 24 mod 1,
z mod 2 = 25 mod 2,
z mod 3 = 26 mod 3,
z mod 4 = 27 mod 4,
z mod 5 = 28 mod 5.
With k = 10 the corresponding primes are prime(10)=29 and prime(11)=31, and the only (i=1) corresponding intermediate composite is 30, then the smallest z that satisfies z mod 1 = 30 mod 1 is z=0 which is not greater than 1 and then, k=10 cannot be used to generate a term of the sequence.
The second term is obtained with k = 11 for which prime(11)=31, prime(12)=37, and the corresponding i=5 intermediate composites are 32, 33, 34, 35 and 36, then a(2) = z = 31 because this is the smallest integer that satisfies:
z mod 1 = 32 mod 1,
z mod 2 = 33 mod 2,
z mod 3 = 34 mod 3,
z mod 4 = 35 mod 4,
z mod 5 = 36 mod 5.
a(7) = 89 is obtained with k = 24 for which prime(24)=89, prime(25)=97, and its corresponding i=7 intermediate composites are 90,91,...,95,96, then a(7) = z = 89 because this is the smallest integer that satisfies:
z mod 1 = 90 mod 1,
z mod 2 = 91 mod 2,
...
z mod 6 = 95 mod 6,
z mod 7 = 96 mod 7.
		

Programs

  • Mathematica
    nmax = 132 (* last explorative prime index *);
    Select[Table[ChineseRemainder[Range[Prime[k]+1,Prime[k+1]-1],Table[j,{j,1,Prime[k+1]-Prime[k]-1}]],{k,2,nmax}],#>1&]
  • PARI
    lista(nn) = {for (n=1, nn, p = prime(n); nbc = nextprime(p+1) - p - 1; if (nbc, v = vector(nbc, k, p+k); vm = vector(nbc, k, Mod(v[k], k)); ij = lift(chinese(vm)); if (ij>1, print1(ij, ", "));););} \\ Michel Marcus, Sep 11 2016