cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A344976 a(n) = A344878(n) - A011772(n).

This page as a plain text file.
%I A344976 #19 Jun 30 2021 19:48:56
%S A344976 0,0,0,0,0,3,0,0,0,8,0,6,0,-1,-1,0,0,16,0,13,0,19,0,15,0,0,0,35,0,-3,
%T A344976 0,0,-1,32,-2,48,0,-1,0,45,0,-14,0,38,-1,43,0,30,0,0,-1,45,0,51,10,
%U A344976 -18,0,56,0,13,0,-1,-3,0,-13,19,0,96,-1,-8,0,57,0,0,0,70,9,0,0,60,0,80,0,-6,-18,-1,-1,-2,0,-11,-1,131
%N A344976 a(n) = A344878(n) - A011772(n).
%H A344976 Antti Karttunen, <a href="/A344976/b344976.txt">Table of n, a(n) for n = 1..16384</a>
%H A344976 Antti Karttunen, <a href="/A344976/a344976.txt">Data supplement: n, a(n) computed for n = 1..65537</a>
%F A344976 a(n) = A344878(n) - A011772(n).
%F A344976 a(n) <= A344876(n).
%t A344976 A011772[n_] := Module[{m = 1}, While[Not[IntegerQ[m(m+1)/(2n)]], m++]; m];
%t A344976 A344878[n_] := If[n == 1, 1, Module[{p, e}, LCM @@ Table[{p, e} = pe; (p^(e + If[p == 2, 1, 0])) - 1, {pe, FactorInteger[n]}]]];
%t A344976 a[n_] := A344878[n] - A011772[n];
%t A344976 Array[a, 100] (* _Jean-François Alcover_, Jun 12 2021 *)
%o A344976 (PARI)
%o A344976 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
%o A344976 A344878(n) = if(1==n,n, my(f=factor(n)~); lcm(vector(#f, i, (f[1, i]^(f[2, i]+(2==f[1, i]))-1))));
%o A344976 A344976(n) = (A344878(n)-A011772(n));
%Y A344976 Cf. A011772, A344876, A344878, A344977 (positions of negative terms), A344978, A344979 (positions of zeros), A344885 (and their characteristic function).
%K A344976 sign
%O A344976 1,6
%A A344976 _Antti Karttunen_, Jun 04 2021