The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A344769 a(n) = A005187(n) - A011772(n). 3
 0, 0, 2, 0, 4, 7, 5, 0, 8, 14, 9, 14, 11, 18, 21, 0, 16, 26, 17, 23, 33, 30, 20, 31, 23, 37, 24, 46, 26, 41, 27, 0, 53, 50, 53, 62, 35, 54, 62, 63, 39, 61, 40, 53, 77, 65, 43, 62, 47, 73, 81, 62, 50, 77, 95, 61, 92, 84, 55, 101, 57, 88, 93, 0, 103, 119, 65, 118, 112, 117, 68, 79, 71, 109, 122, 93, 129, 140, 75, 94, 79, 121 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Antti Karttunen, Table of n, a(n) for n = 1..16384 Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537 FORMULA a(n) = A005187(n) - A011772(n). a(n) = A344765(n) + A294898(n). a(2^e) = 0, for e >= 0. If n is an odd prime power, then a(n) = n+1-A000120(n). - Chai Wah Wu, Jun 03 2021 PROG (PARI) A005187(n) = { my(s=n); while(n>>=1, s+=n); s; }; A011772(n) = { if(n==1, return(1)); my(f=factor(if(n%2, n, 2*n)), step=vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); forstep(m=step, 2*n, step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))); }; \\ From A011772 A344769(n) = (A005187(n) - A011772(n)); (Python 3.8+) from itertools import combinations from math import prod from sympy import factorint, divisors from sympy.ntheory.modular import crt def A344769(n):     c = 2*n-bin(n).count('1')     plist = [p**q for p, q in factorint(2*n).items()]     if len(plist) == 1:         return int(c+1+(plist[0] % 2 - 2)*n)     return int(c-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 03 2021 CROSSREFS Cf. A000120, A005187, A011772, A294898, A344763, A344765. Sequence in context: A317965 A190791 A002885 * A011121 A255643 A230277 Adjacent sequences:  A344766 A344767 A344768 * A344770 A344771 A344772 KEYWORD nonn 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 17 07:35 EDT 2021. Contains 347478 sequences. (Running on oeis4.)