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!)
A344006 a(n) = m*(m+1)/n, where A344005(n) is the smallest number m such that n divides m*(m+1). 2
2, 1, 2, 3, 4, 1, 6, 7, 8, 2, 10, 1, 12, 3, 2, 15, 16, 4, 18, 1, 2, 5, 22, 3, 24, 6, 26, 2, 28, 1, 30, 31, 4, 8, 6, 2, 36, 9, 4, 6, 40, 1, 42, 3, 2, 11, 46, 5, 48, 12, 6, 3, 52, 13, 2, 1, 6, 14, 58, 4, 60, 15, 12, 63, 10, 2, 66, 4, 8, 3, 70, 1, 72, 18, 8, 5, 6, 2, 78, 3, 80, 20, 82, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) = n-1 if n is a prime power. - Chai Wah Wu, Jun 04 2021
LINKS
PROG
(PARI) a(n) = for(m=1, oo, if((m*(m+1))%n==0, return(m*(m+1)/n))) \\ Felix Fröhlich, Jun 04 2021
(Python 3.8+)
from itertools import combinations
from math import prod
from sympy import factorint
from sympy.ntheory.modular import crt
def A344006(n):
if n == 1:
return 2
plist = [p**q for p, q in factorint(n).items()]
if len(plist) == 1:
return n-1
else:
m = int(min(min(crt([m, n//m], [0, -1])[0], crt([n//m, m], [0, -1])[0]) for m in (prod(d) for l in range(1, len(plist)//2+1) for d in combinations(plist, l))))
return m*(m+1)//n # Chai Wah Wu, Jun 04 2021
CROSSREFS
Sequence in context: A162190 A349325 A134292 * A353319 A205123 A108715
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 04 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 April 19 10:38 EDT 2024. Contains 371791 sequences. (Running on oeis4.)