The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A348470 a(n) = lpf(EKG(n)) = A020639(A064413(n)). 1
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Prime p_n appears first at a(A064955(n)).
Records are A008578.
LINKS
Michael De Vlieger, Log-log scatterplot of a(n) for n=1..2^12.
Michael De Vlieger, Log-log scatterplot of a(n) for n=1..2^18.
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]]
PROG
(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
CROSSREFS
Sequence in context: A094321 A107789 A124064 * A317369 A096916 A098014
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Dec 06 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 10:35 EDT 2024. Contains 373105 sequences. (Running on oeis4.)