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.

Previous Showing 11-17 of 17 results.

A299143 a(n) is the least k > n such that gcd(k,n) > 1 and gcd(k+1,n+1) > 1.

Original entry on oeis.org

8, 9, 14, 15, 20, 21, 14, 15, 32, 33, 38, 39, 20, 21, 50, 51, 56, 57, 26, 27, 68, 69, 34, 35, 32, 33, 86, 87, 92, 93, 38, 39, 44, 45, 110, 111, 44, 45, 122, 123, 128, 129, 50, 51, 140, 141, 62, 63, 56, 57, 158, 159, 64, 65, 62, 63, 176, 177, 182, 183, 68, 69
Offset: 2

Views

Author

Alex Ratushnyak, Feb 03 2018

Keywords

Examples

			8 is the least k>2 such that gcd(8,2)>1 and gcd(9,3)>1. So a(2)=8.
15 is the least k>9 such that gcd(15,9)>1 and gcd(16,10)>1. Therefore a(9)=15.
		

Crossrefs

Cf. A172170.
Cf. A061228 or A159475 (when simply gcd(k,n) > 1).

Programs

  • Maple
    f:= proc(n) local k;
          for k from n+1 do if igcd(k,n)>1 and igcd(k+1,n+1)>1 then return k fi od
    end proc:
    map(f, [$2..100]); # Robert Israel, Mar 08 2018
  • Mathematica
    Array[Block[{k = # + 1}, While[Or[CoprimeQ[#, k], CoprimeQ[# + 1, k + 1]], k++]; k] &, 62, 2] (* Michael De Vlieger, Feb 03 2018 *)
  • PARI
    a(n) = for (k=n+1, oo, if (gcd(n,k)>1 && gcd(n+1, k+1)>1, return (k))) \\ Rémy Sigrist, Feb 04 2018

Formula

From Rémy Sigrist, Feb 04 2018: (Start)
a(p) = 3 * p for any odd prime p.
a(2*k + 1) = a(2*k) + 1 for any k > 0.
a(n) = n + 2*A172170(n + 1) for any n > 1.
(End)

A322292 a(n) = Max_{c composite, c < n} (c + least prime factor of c).

Original entry on oeis.org

6, 6, 8, 8, 10, 12, 12, 12, 14, 14, 16, 18, 18, 18, 20, 20, 22, 24, 24, 24, 26, 30, 30, 30, 30, 30, 32, 32, 34, 36, 36, 40, 40, 40, 40, 42, 42, 42, 44, 44, 46, 48, 48, 48, 50, 56, 56, 56, 56, 56, 56, 60, 60, 60, 60, 60, 62, 62, 64, 66, 66, 70, 70, 70, 70, 72, 72, 72
Offset: 5

Views

Author

Michel Marcus, Dec 02 2018

Keywords

Comments

a(n) is only defined for n >= 5, because for n < 5, the condition {c composite, c < n} results in the empty set.

Examples

			a(5) = 6 because the largest composite c < n = 5 is 4, which has the largest prime factor 2. Hence a(5) = 4 + 2 = 6. - _David A. Corneth_, Dec 03 2018
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(5)..a(N)
    V:= Vector(N):
    V[5]:= 6;
    for n from 6 to N do
      if isprime(n-1) then V[n]:= V[n-1]
      else V[n]:= max(V[n-1],n-1+min(numtheory:-factorset(n-1)))
      fi
    od:
    convert(V[5..N],list); # Robert Israel, Dec 03 2018
  • Mathematica
    a[n_] := Module[{smax = 0}, Do[If[CompositeQ[m],  smax = Max[smax, m + FactorInteger[m][[1, 1]]]], {m, 2, n-1}]; smax]; Array[a, 100, 5] (* Amiram Eldar, Dec 02 2018 *)
  • PARI
    a(n) = {my(smax = 0); for(m=2, n-1, if (!isprime(m), smax = max(smax, m + factor(m)[1, 1]); )); smax; }

A322293 Integers k such that A322292(k) <= k.

Original entry on oeis.org

6, 8, 12, 14, 18, 20, 24, 30, 32, 42, 44, 48, 60, 62, 72, 74, 84, 90, 102, 104, 108, 110, 114, 132, 140, 168, 182, 198, 200, 234, 240, 242, 270, 272, 282, 284, 312, 314, 318, 354, 360, 390, 420, 422, 434, 462, 464, 468, 510, 572, 648, 660, 662, 762, 840, 884, 888, 942, 1064
Offset: 1

Views

Author

Michel Marcus, Dec 02 2018

Keywords

Comments

Erdos conjectures that this sequence is finite.

Crossrefs

Programs

  • Maple
    N:= 10^6: # to get all terms <= N
    Res:= 6: v:= 6:
    for n from 7 to N do
      if not isprime(n-1) then v:= max(v, n-1 + min(numtheory:-factorset(n-1))) fi;
    if v <= n then Res:= Res, n fi;
    od:
    Res; # Robert Israel, Dec 03 2018
  • Mathematica
    f[n_] := Module[{smax = 0}, Do[If[CompositeQ[m],  smax = Max[smax, m + FactorInteger[m][[1, 1]]]], {m, 2, n-1}]; smax];aQ[n_] := f[n]<=n; Select[Range[6, 1000], aQ] (* Amiram Eldar, Dec 02 2018 *)
  • PARI
    f(n) = {my(smax = 0); forcomposite(m=1, n-1, smax = max(smax, m + factor(m)[1,1]);); smax;} \\ A322292
    isok(n) = f(n) <= n;

A130904 Numbers n such that the trajectory of the map n -> (n + lpf(n)) / 2 reaches 3, where lpf(n) is the least prime factor of n (A020639).

Original entry on oeis.org

3, 4, 6, 9, 10, 15, 16, 18, 25, 27, 28, 30, 33, 34, 48, 49, 51, 52, 54, 55, 57, 58, 63, 64, 66, 91, 93, 94, 96, 99, 100, 102, 105, 106, 108, 111, 112, 114, 119, 121, 123, 124, 126, 129, 130, 169, 180, 183, 184, 186, 187, 189, 190, 195, 196, 198
Offset: 1

Views

Author

Grant Garcia, Jan 06 2011

Keywords

Comments

The only prime term is 3 because all primes map to themselves.

Examples

			(15 + 3) / 2 = 9, (9 + 3) / 2 = 6, (6 + 2) / 2 = 4, and (4 + 2) / 2 = 3, thus 15 is in the sequence.
(21 + 3) / 2 = 12, (12 + 2) / 2 = 7, and (7 + 7) / 2 = 7, so 21 never reaches 3 and therefore is not in the sequence.
		

Crossrefs

A179329 Number of iterations of (n + lpf(n)) / 2 required to reach a prime, where lpf equals the least prime factor.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 1, 3, 3, 0, 1, 0, 2, 4, 4, 0, 4, 0, 1, 2, 2, 0, 1, 5, 3, 5, 5, 0, 5, 0, 1, 5, 5, 2, 1, 0, 2, 3, 3, 0, 3, 0, 1, 2, 2, 0, 6, 6, 4, 6, 6, 0, 6, 6, 1, 6, 6, 0, 1, 0, 2, 6, 6, 3, 6, 0, 3, 2, 2, 0, 1, 0, 3, 4, 4, 4, 4, 0, 1, 4, 4, 0, 1, 3, 2, 3, 3, 0, 3, 7, 1, 7, 7, 5, 7, 0, 5, 7, 7, 0, 7, 0, 1, 7, 7
Offset: 2

Views

Author

Grant Garcia, Jan 12 2011

Keywords

Comments

Zeros indicate prime indices.

Examples

			a(15) gives (15 + 3) / 2 = 9, (9 + 3) / 2 = 6, (6 + 2) / 2 = 4, (4 + 2) / 2 = 3. Four iterations were required to reach a prime, so a(15) = 4.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ NestWhileList[(# + FactorInteger[#][[1, 1]])/2 &, n, ! PrimeQ@ # &] - 1; Array[f, 105, 2]

A263569 Number of distinct prime divisors p of 2*n such that lpf(2*n - p) = p, where lpf = least prime factor (A020639).

Original entry on oeis.org

0, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 2, 2, 2, 3, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 3, 2, 1, 3, 1, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 2, 2, 2, 2, 1, 3, 1, 2, 2, 2, 2, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 4
Offset: 1

Views

Author

Gionata Neri, Oct 21 2015

Keywords

Comments

a(n) gives the number of times 2*n occurs in A061228.

Examples

			a(10) = 1 since the distinct prime divisors of 2*10 = 20 are 2 and 5, A020639(20 - 2) = 2 and A020639(20 - 5) = 3, so only prime 2 is to be considered.
a(15) = 3 since the distinct prime divisors of 2*15 = 30 are 2, 3 and 5, A020639(30 - 2) = 2 and A020639(30 - 3) = 3 and A020639(30 - 5) = 5, so all three prime 2, 3 and 5 are to be considered.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Select[First /@ FactorInteger[2 n], FactorInteger[2 n - #][[1, 1]] == # &]; Length /@ Table[f@ n, {n, 2, 105}] (* Michael De Vlieger, Oct 22 2015 *)
  • PARI
    a(n) = {my(f=factor(2*n)); sum(k=1, #f~, p=f[k,1]; p == factor(2*n-p)[1,1]);} \\ Michel Marcus, Oct 31 2015

A179997 Where records occur in A179329.

Original entry on oeis.org

2, 4, 6, 9, 15, 25, 48, 91, 169, 336, 669, 1335, 2665, 5317, 10573, 21037, 42072, 84141, 168279, 336553, 673099, 1345639, 2691276, 5382549, 10765095, 21528959, 43057916, 86115821, 172231631, 344463251, 688926491, 1377847349, 2755694696, 5511375473, 11022750944
Offset: 1

Views

Author

Grant Garcia, Jan 13 2011

Keywords

Comments

a(n + 1) / a(n) converges to 2.

Crossrefs

Extensions

Corrected and extended by Grant Garcia, Jan 19 2011
a(30)-a(35) from Amiram Eldar, Oct 25 2024
Previous Showing 11-17 of 17 results.