OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
PROG
(PARI)
A007733(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ This function from Michel Marcus, Apr 11 2015
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
(Python)
from sympy import divisors, factorint
def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
def a002326(n):
m=1
while True:
if (2**m - 1)%(2*n + 1)==0: return m
else: m+=1
def a000265(n): return max(list(filter(lambda i: i%2 == 1, divisors(n))))
def a007733(n): return a002326((a000265(n) - 1)/2)
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 a(n): return T(a007733(n), a046523(n)) # Indranil Ghosh, May 26 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 26 2017
STATUS
approved