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.

Showing 1-3 of 3 results.

A271630 Composite numbers n coprime to all number that can be obtained by changing just one digit of n.

Original entry on oeis.org

121, 143, 169, 187, 209, 221, 247, 253, 289, 299, 319, 323, 341, 343, 361, 377, 391, 403, 407, 437, 451, 473, 481, 493, 517, 527, 529, 533, 551, 553, 559, 583, 589, 611, 629, 649, 667, 671, 689, 697, 703, 713, 731, 737, 767, 779, 781, 793, 799, 803, 817, 841, 851
Offset: 1

Views

Author

Paolo P. Lava, Apr 14 2016

Keywords

Comments

Only numbers ending in 1, 3, 7 and 9.
Apart from the first 10 terms, A078972 is a subset of this sequence.
Subsequence of A038510. - Altug Alkan, Apr 15 2016
Least squareless numbers with increasing number of primes:
143 = 11 * 13;
2431 = 11 * 13 * 17;
45353 = 7 * 11 * 19 * 31;
1062347 = 11 * 13 * 17 * 19 * 23;
30808063 = 11 * 13 * 17 * 19 * 23 * 29;
955049953 = 11 * 13 * 17 * 19 * 23 * 29 * 31;
35336848261 = 11 * 13 * 17 * 19 * 23 * 29 * 31 * 37;
1448810778701 = 11 * 13 * 17 * 19 * 23 * 29 * 31 * 37 * 41; etc.

Examples

			343 is coprime to:
43, 143, 243, 443, 543, 643, 743, 843, 943 (where the MSD has been changed);
303, 313, 323, 333, 353, 363, 373, 383, 393 (where the '4' in the middle has been changed);
340, 341, 342, 344, 345, 346, 347, 348, 349 (where the LSD has been changed) .
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a,j,k,n,ok;
    for n from 2 to q do if not isprime(n) then ok:=1; j:=0;
    while ok=1 and j<9 do j:=j+1; for k from 1 to ilog10(n)+1 do
    a:=trunc(n/10^k)*10^k+((trunc((n mod 10^k)/10^(k-1))-j) mod 10)*10^(k-1)+(n mod 10^(k-1));
    if gcd(n,a)>1 then ok:=0; break; fi; od; od;
    if ok=1 then print(n); fi; fi; od; end: P(10^5);
  • Mathematica
    Select[Range[10^3], Function[n, And[CompositeQ@ n, AllTrue[Flatten@ Function[w, Map[Function[k, Map[FromDigits[ReplacePart[w, k -> #]] &, Range[0, 9]]], Range@ Length@ w] /. m_ /; m == n -> Nothing]@ IntegerDigits@ n, CoprimeQ[#, n] &]]]] (* Michael De Vlieger, Apr 15 2016 *)

A345356 Numbers k coprime to 30 such that ceiling(sqrt(k))^2 - k is a square.

Original entry on oeis.org

1, 49, 77, 91, 121, 143, 169, 187, 209, 221, 247, 289, 299, 323, 361, 391, 437, 493, 529, 551, 589, 667, 713, 841, 851, 899, 961, 1073, 1147, 1189, 1247, 1271, 1333, 1369, 1457, 1517, 1591, 1681, 1739, 1763, 1813, 1849, 1927, 1961, 2009, 2021
Offset: 1

Views

Author

Bill McEachen, Jun 15 2021

Keywords

Comments

Multiples of 2, 3, and 5 are excluded. This is not a subsequence of A087718, since not all terms are semiprimes. Subsequence of A077554 (limited data)? Besides 1, a subsequence of A038510.

Examples

			For k=77, ceiling(sqrt(k)) is 9, so we evaluate 9^2 - 77 = 4, which is a square, so 77 is a term.
Let k=97, 100 - 97 = 3 is not a square and is not a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2000], CoprimeQ[#, 30] && IntegerQ @ Sqrt[Ceiling[Sqrt[#]]^2 - #] &] (* Amiram Eldar, Jun 23 2021 *)
  • PARI
    genit(minn=1,maxx)={arr=List();forstep(w=minn,maxx,2,if(w%5==0||w%6==3,next);z=sqrtint(w-1)+1;if(issquare(z^2-w)>0,listput(arr,w);next));arr}

A348394 Primes preceding record runs of composites coprime to 30 (A007775).

Original entry on oeis.org

7, 47, 113, 317, 523, 1327, 9551, 15683, 19609, 25471, 31397, 155921, 360653, 370261, 1349533, 1357201, 2010733, 4652353, 17051707, 20831323, 47326693, 122164747, 189695659, 191912783, 387096133, 1294268491, 1453168141, 2300942549, 3842610773, 4302407359, 10726904659, 20678048297, 22367084959, 25056082087, 42652618343, 127976334671, 182226896239
Offset: 1

Views

Author

Harry E. Neel, Oct 16 2021

Keywords

Comments

"There are 8 potential primes modulo 30...." Using only the potential prime locations within this domain there are no consecutive integers within the domain until an integer is determined to have a prime factor, here the first such integer is 49. When an integer is determined to be composite then there is a "gap" within the succession of primes.
While the location of the first few record consecutive integers differ from established maximal gaps, they quickly become the same. It is not known if they continue to remain the same or if some variation may occur. Here the record number of composites will always be lower because the count of composites are only those that are within this domain.
Hugo van der Sanden greatly expanded the data contained in this sequence.

Examples

			The next number coprime to 30 after 7 is 11, giving a run of 0 composites.
47 is followed by 49 = 7^2 and 53 (prime), a run of 1 composite.
113 is followed by 119 = 7*17, 121 = 11^2, and 127 (prime), a run of 2 composites.
The first few entries correspond to the following table. The table contains the order in which record composites occur (n), the number of composites between successive primes (gap size), the prime preceding the record composites (1st prime), the prime following the record composites (2nd prime) and the merit of the gap (merit) rounded to 4 decimals. The merit is the gap size divided by the natural log of the 1st prime (gap size / log(1st prime)).
   n  gap size 1st prime  2nd prime   gap merit
   1,    0,        7,          11,      0.0000
   2,    1,       47,          53,      0.2597
   3,    2,      113,         127,      0.4231
   4,    3,      317,         331,      0.5209
   5,    4,      523,         541,      0.6390
   6,    8,     1327,        1361,      1.1126
   7,    9,     9551,        9587,      0.9821
   8,   10,    15683,       15727,      1.0352
   9,   12,    19609,       19661,      1.2141
  10,   13,    25471,       25523,      1.2814
  11,   18,    31397,       31469,      1.7384
  12,   22,   155921,      156007,      1.8399
  13,   24,   360653,      360749,      1.8756
  ...
  38,  125, 182226896239, 182226896713,  4.8209
		

Crossrefs

Programs

  • Mathematica
    Block[{m = Select[Range[29], CoprimeQ[#, 30] &], s, t}, s = Reap[Array[Map[If[! PrimeQ[#], Sow[#]] &, 30 # + m] &, 2^20]][[-1, -1]]; Set[{s, t}, Transpose@ #] &@ Tally@ Array[NextPrime[s[[#]], -1] &, Length@ s]; Map[s[[FirstPosition[t, #][[1]]]] &, Union@ FoldList[Max, t]] ] (* Michael De Vlieger, Oct 25 2021 *)
  • PARI
    isok(x) = vecsearch([1, 7, 11, 13, 17, 19, 23, 29], x%30);
    nbc(n, v) = {my(i=n+1, c= v[i], nb=0); while(!isprime(c), nb++; i++; if (i>#v, return(-1)); c = v[i]); nb;}
    lista(nn) = {my(v = [2..nn], m=-1, nb); v = select(x->isok(x), v); v = apply(isprime, v); for (n=1, #v-1, if (isprime(v[n]), nb = nbc(n, v); if (nb==-1, break); if (nb > m, print1(v[n], ", "); m = nb);););} \\ Michel Marcus, Oct 21 2021
Showing 1-3 of 3 results.