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.

A274443 Least composite squarefree number k such that (p-n) | (k-1) for all primes p dividing n.

Original entry on oeis.org

561, 21, 85, 15, 21, 35, 33, 21, 65, 91, 57, 91, 133, 55, 161, 91, 57, 133, 33, 253, 65, 91, 145, 115, 217, 451, 161, 703, 253, 551, 561, 253, 481, 217, 129, 451, 301, 1081, 161, 1189, 145, 989, 217, 235, 481, 703, 649, 329, 265, 1081, 1121, 1219, 145, 1037, 721
Offset: 1

Views

Author

Paolo P. Lava, Jun 23 2016

Keywords

Examples

			Prime factors of 561 are 3, 11 and 17: (561 - 1) / (3 - 1) = 560 / 2 = 280, (561 - 1) / (11 - 1) = 560 / 10 = 56 and (561 - 1) / (17 - 1) = 560 / 16 = 35.
Prime factors of 21 are 3 and 7: (21 - 1) / (3 - 2) = 20 / 1 = 20, (21 - 1) / (7 - 2) = 20 / 5 = 4.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local d,k,n,ok,p;
    for k from 1 to q do for n from 2 to q do
    if not isprime(n) and issqrfree(n) then p:=ifactors(n)[2]; ok:=1;
    for d from 1 to nops(p) do if p[d][1]=k then ok:=0; break; else
    if not type((n-1)/(p[d][1]-k),integer) then ok:=0; break; fi; fi; od;
    if ok=1 then print(n); break; fi; fi; od; od; end: P(10^9);
  • Mathematica
    t = Select[Range@2000, SquareFreeQ@ # && CompositeQ@ # &]; Table[SelectFirst[t, Function[k, AllTrue[First /@ FactorInteger@ k, If[# == 0, False, Divisible[k - 1, #]] &[# - n] &]]], {n, 55}] (* Michael De Vlieger, Jun 24 2016, Version 10 *)

A274445 a(n) is the smallest composite squarefree number k such that (p+n) | (k-1) for every prime p dividing k.

Original entry on oeis.org

385, 91, 65, 451, 33, 170171, 145, 1261, 161, 78409, 469, 294061, 649, 13051, 1921, 5251, 721, 8453501, 145, 300243, 1121, 47611, 3601, 1915801, 1057, 41311, 545, 5671, 1261, 19723133, 4321, 37759, 6913, 451, 4033, 102821, 1513, 40891, 11521, 1259497, 721, 364781, 145
Offset: 1

Views

Author

Paolo P. Lava, Jun 23 2016

Keywords

Examples

			For n=1, prime factors of 385 are 5, 7 and 11. (385 - 1)/(5 + 1) = 384/6 = 64, (385 - 1)/(7 + 1) = 384/8 = 48 and (385 - 1)/(11 + 1) = 384/12 = 32.
For n=2, prime factors of 91 are 7 and 13. (91 - 1)/(7 + 2) = 90/9 = 10 and (91 - 1)/(13 + 2) = 90/15 = 6.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local d,k,n,ok,p;
    for k from 1 to q do for n from 2 to q do
    if not isprime(n) and issqrfree(n) then p:=ifactors(n)[2]; ok:=1;
    for d from 1 to nops(p) do
    if not type((n-1)/(p[d][1]+k),integer) then ok:=0; break; fi; od;
    if ok=1 then print(n); break; fi; fi; od; od; end: P(10^9);
  • Mathematica
    t = Select[Range[10^6], SquareFreeQ@ # && CompositeQ@ # &]; Table[ SelectFirst[t, Function[k, AllTrue[First /@ FactorInteger@ k, Divisible[k - 1, # + n] &]]], {n, 17}] (* Michael De Vlieger, Jun 24 2016, Version 10 *)
  • PARI
    isok(k,n)=if (! issquarefree(k), return (0)); vp = factor(k) [,1]; if (#vp == 1, return (0)); for (i=1, #vp, if ((k-1) % (n+vp[i]), return (0));); 1;
    a(n) = my(k=2); while (! isok(k,n), k++); k; \\ Michel Marcus, Jun 28 2016

Extensions

a(18), a(24), a(30) added by Giovanni Resta, Jun 23 2016
More terms from Michel Marcus, Jun 28 2016

A274446 a(n) is the smallest composite squarefree number k such that (p+n) | (k+1) for all primes dividing k.

Original entry on oeis.org

399, 299, 55, 611, 143, 5549, 39, 155, 493, 615383, 713, 3247, 119, 1304489, 1333, 31415, 2599, 749, 2183, 440153, 155, 75499, 119, 168600949, 4223, 223649, 559, 66299, 6407, 15157, 3431, 85499, 799, 31589, 7313
Offset: 1

Views

Author

Paolo P. Lava, Jun 23 2016

Keywords

Examples

			Prime factors of 399 are 3, 7 and 19. (399 + 1) / (3 + 1) = 400 / 4 = 100, (399 + 1) / (7 + 1) = 400 / 8 = 50 and (399 + 1) / (19 + 1) = 400 / 20 = 20.
Prime factors of 299 are 13 and 23. (399 + 1) / (13 + 2) = 300 / 15 = 20 and (399 + 1) / (23 + 2) = 300 / 25 = 12.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local d,k,n,ok,p;
    for k from 1 to q do for n from 2 to q do
    if not isprime(n) and issqrfree(n) then p:=ifactors(n)[2]; ok:=1;
    for d from 1 to nops(p) do
    if not type((n+1)/(p[d][1]+k),integer) then ok:=0; break; fi; od;
    if ok=1 then print(n); break; fi; fi; od; od; end: P(10^9);
  • Mathematica
    t = Select[Range[2000000], SquareFreeQ@ # && CompositeQ@ # &]; Table[SelectFirst[t, Function[k, AllTrue[First /@ FactorInteger@ k, Divisible[k + 1, # + n] &]]], {n, 23}] (* Michael De Vlieger, Jun 24 2016, Version 10 *)
  • PARI
    isok(k,n) = {if (! issquarefree(k), return (0)); vp = factor(k) [,1]; if (#vp == 1, return (0)); for (i=1, #vp, if ((k+1) % (n+vp[i]), return (0));); 1;}
    a(n) = {my(k=2); while (! isok(k,n), k++); k;} \\ Michel Marcus, Jun 28 2016

Extensions

a(24) from Giovanni Resta, Jun 23 2016
Showing 1-3 of 3 results.