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!)
A344763 a(n) = n - A011772(n). 6
0, -1, 1, -3, 1, 3, 1, -7, 1, 6, 1, 4, 1, 7, 10, -15, 1, 10, 1, 5, 15, 11, 1, 9, 1, 14, 1, 21, 1, 15, 1, -31, 22, 18, 21, 28, 1, 19, 27, 25, 1, 22, 1, 12, 36, 23, 1, 16, 1, 26, 34, 13, 1, 27, 45, 8, 39, 30, 1, 45, 1, 31, 36, -63, 40, 55, 1, 52, 46, 50, 1, 9, 1, 38, 51, 20, 56, 66, 1, 16, 1, 42, 1, 36, 51, 43, 58, 56, 1, 55 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
a(n) = n - A011772(n).
a(n) = A344765(n) - A001065(n).
a(2^k) = 1-2^k. - Chai Wah Wu, Jun 15 2022
MATHEMATICA
A011772[n_] := Module[{m = 1}, While[!IntegerQ[(m(m+1))/(2n)], m++]; m];
a[n_] := n - A011772[n];
Array[a, 100] (* Jean-François Alcover, Jun 12 2021 *)
PROG
(PARI) A344763(n) = (n-A011772(n));
(Python)
from sympy.ntheory.modular import crt
from sympy import factorint
from math import prod
from itertools import combinations
def A344763(n):
plist = tuple(p**q for p, q in factorint(2*n).items())
return 1-n if len(plist) == 1 else n-int(min(min(crt((m, 2*n//m), (0, -1))[0], crt((2*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)))) # Chai Wah Wu, Jun 15 2022
CROSSREFS
Sequence in context: A236757 A095250 A135521 * A176032 A218403 A318506
KEYWORD
sign
AUTHOR
Antti Karttunen, May 30 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 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)