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-12 of 12 results.

A387087 GCD of pairs of consecutive terms of the sequence A386482.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 2, 2, 2, 7, 7, 3, 2, 4, 5, 5, 5, 5, 2, 2, 2, 2, 11, 11, 3, 9, 2, 2, 2, 19, 19, 3, 2, 2, 2, 2, 2, 2, 2, 5, 5, 3, 13, 13, 5, 2, 2, 7, 7, 3, 17, 17, 2, 2, 2, 31, 31, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 3, 23, 23, 2, 47, 47, 3, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Rémy Sigrist, Aug 16 2025

Keywords

Examples

			The first terms, alongside the first terms of A386482, are:
  n   a(n)  A386482(n)
  --  ----  ----------
   1     1           1
   2     2           2
   3     2           4
   4     3           6
   5     3           3
   6     3           9
   7     2          12
   8     2          10
   9     2           8
  10     7          14
  11     7           7
  12     3          21
  13     2          18
  14     4          16
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

a(n) = gcd(A386482(n), A386482(n+1)).

A348470 a(n) = lpf(EKG(n)) = A020639(A064413(n)).

Original entry on oeis.org

1, 2, 2, 2, 3, 3, 2, 2, 2, 5, 3, 2, 2, 7, 3, 2, 2, 2, 2, 11, 3, 3, 2, 5, 5, 2, 2, 13, 3, 2, 2, 2, 17, 3, 2, 2, 19, 3, 3, 2, 2, 2, 23, 3, 2, 2, 2, 2, 2, 7, 3, 2, 5, 5, 2, 2, 29, 3, 2, 2, 31, 3, 2, 2, 2, 2, 37, 3, 3, 2, 2, 2, 2, 41, 3, 3, 2, 7, 2, 2, 43, 3, 2, 5
Offset: 1

Views

Author

Michael De Vlieger, Dec 06 2021

Keywords

Comments

Prime p_n appears first at a(A064955(n)).
Records are A008578.

Crossrefs

Programs

  • Mathematica
    Map[FactorInteger[#][[1, 1]] &, Nest[Block[{k = 3}, While[Or[MemberQ[#, k], GCD[#[[-1]], k] == 1], k++]; Append[#, k]] &, {1, 2}, 84]]
    (* or, faster *)
    s = {1, 2}; u = 3; c[_] = 0; Set[j, 2]; Array[Set[c[#], #] &, 2]; Range[2]~Join~Reap[Do[If[PrimeQ[j], Set[u, NextPrime[u]]]; Set[k, u]; Which[And[PrimeQ[j], OddQ[j]], Set[k, 3 j], And[PrimeQ[j/2], OddQ[j/2]], Set[k, j/2], True, While[Nand[c[k] == 0, GCD[j, k] > 1], k++]]; Sow[FactorInteger[k][[1, 1]] ]; Set[c[k], i]; j = k, {i, 4, 10^4}]][[-1, -1]]
  • Python
    from itertools import islice, count
    from math import gcd
    from sympy import primefactors
    def A064413gen(): # generator of terms
        yield 1
        yield 2
        l, s, b = 2, 3, set()
        for _ in count(0):
            i = s
            while True:
                if not i in b and gcd(i,l) > 1:
                    yield i
                    l = i
                    b.add(i)
                    while s in b:
                        b.remove(s)
                        s += 1
                    break
                i += 1
    def A348470(n): return 1 if n == 1 else min(primefactors(next(islice(A064413gen(),n-1,None)))) # Chai Wah Wu, Dec 07 2021
Previous Showing 11-12 of 12 results.