OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
PROG
(PARI)
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ This function from Charles R Greathouse IV, Aug 17 2011
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)};
for(n=1, 10000, write("b286250.txt", n, " ", A286250(n)));
(Scheme)
(Python)
from sympy import factorint, prevprime
from operator import mul
def P(n):
f = factorint(n)
return sorted([f[i] for i in f])
def a046523(n):
x=1
while True:
if P(n) == P(x): return x
else: x+=1
def a064216(n):
f=factorint(2*n - 1)
return 1 if n==1 else reduce(mul, [prevprime(i)**f[i] for i in f])
def a(n): return a046523((2*a064216(n)) - 1) # Indranil Ghosh, May 13 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 07 2017
STATUS
approved