OFFSET
1,2
COMMENTS
This sequence is related to the cyclotomic sequences A013595 and A020500, leading to the procedure used in the Mathematica program. - Roger L. Bagula, Jul 08 2008
"LCM numeral system": a(n+1) is radix for index n, n >= 0; a(-n+1) is 1/radix for index n, n < 0. - Daniel Forgues, May 03 2014
This is the LCM-transform of A000961; same as A014963 with all 1's (except a(1)) removed. - David James Sycamore, Jan 11 2024
REFERENCES
Paul J. McCarthy, Algebraic Extensions of Fields, Dover books, 1976, pages 40, 69
LINKS
David Wasserman, Table of n, a(n) for n = 1..1000
OEIS Wiki, LCM numeral system
Eric Weisstein's World of Mathematics, Cyclotomic Polynomial
FORMULA
From Reinhard Zumkeller, Jun 26 2011: (Start)
MAPLE
cvm := proc(n, level) local f, opf; if n < 2 then RETURN() fi;
f := ifactors(n); opf := op(1, op(2, f)); if nops(op(2, f)) > 1 or
op(2, opf) <= level then RETURN() fi; op(1, opf) end:
A025473_list := n -> [1, seq(cvm(i, 0), i=1..n)];
A025473_list(240); # Peter Luschny, Sep 21 2011
MATHEMATICA
a = Join[{1}, Flatten[Table[If[PrimeQ[Apply[Plus, CoefficientList[Cyclotomic[n, x], x]]], Apply[Plus, CoefficientList[Cyclotomic[n, x], x]], {}], {n, 1, 1000}]]] (* Roger L. Bagula, Jul 08 2008 *)
Join[{1}, First@ First@# & /@ FactorInteger@ Select[Range@ 240, PrimePowerQ]] (* Robert G. Wilson v, Aug 17 2017 *)
PROG
(Sage)
def A025473_list(n) :
R = [1]
for i in (2..n) :
if i.is_prime_power() :
R.append(prime_divisors(i)[0])
return R
A025473_list(239) # Peter Luschny, Feb 07 2012
(Haskell)
a025473 = a020639 . a000961 -- Reinhard Zumkeller, Aug 14 2013
(PARI) print1(1); for(n=2, 1e3, if(isprimepower(n, &p), print1(", "p))) \\ Charles R Greathouse IV, Apr 28 2014
(Python)
from sympy import primepi, integer_nthroot, primefactors
def A025473(n):
if n == 1: return 1
def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x, k)[0]) for k in range(1, x.bit_length())))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return primefactors(m)[0] # Chai Wah Wu, Aug 15 2024
CROSSREFS
KEYWORD
easy,nonn,nice
AUTHOR
David W. Wilson, Dec 11 1999
EXTENSIONS
Offset corrected by David Wasserman, Dec 22 2008
STATUS
approved