OFFSET
0,2
COMMENTS
Note the indexing: although the domain starts from 0, the range excludes zero.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..440
David Newman, et al, New sequences from old, Discussion on SeqFan-mailing list, January 2018.
PROG
(PARI)
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 05 2018
STATUS
approved