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.

A289438 The arithmetic function v_4(n,4).

This page as a plain text file.
%I A289438 #19 Apr 23 2020 11:19:30
%S A289438 0,1,0,1,2,2,1,3,2,3,4,3,4,5,3,4,6,5,4,7,6,6,8,6,6,9,8,7,10,8,7,11,8,
%T A289438 10,12,9,10,13,9,10,14,11,12,15,12,12,16,14,12,17,12,13,18,15,16,19,
%U A289438 14,15,20,15,16,21,15,16,22,17,16,23,20
%N A289438 The arithmetic function v_4(n,4).
%D A289438 J. Butterworth, Examining the arithmetic function v_g(n,h). Research Papers in Mathematics, B. Bajnok, ed., Gettysburg College, Vol. 8 (2008).
%H A289438 Bela Bajnok, <a href="https://arxiv.org/abs/1705.07444">Additive Combinatorics: A Menu of Research Problems</a>, arXiv:1705.07444 [math.NT], May 2017. See Table in Section 1.6.1.
%p A289438 a:= n-> n*max(seq((floor((d-1-igcd(d, 4))/4)+1)
%p A289438         /d, d=numtheory[divisors](n))):
%p A289438 seq(a(n), n=2..100);  # _Alois P. Heinz_, Jul 07 2017
%t A289438 a[n_]:=n*Max[Table[(Floor[(d - 1 - GCD[d, 4])/4] + 1)/d, {d, Divisors[n]}]]; Table[a[n], {n, 2, 100}] (* _Indranil Ghosh_, Jul 08 2017 *)
%o A289438 (PARI)
%o A289438 v(g,n,h)={my(t=0);fordiv(n,d,t=max(t,((d-1-gcd(d,g))\h + 1)*(n/d)));t}
%o A289438 a(n)=v(4,n,4); \\ _Andrew Howroyd_, Jul 07 2017
%o A289438 (Python)
%o A289438 from sympy import divisors, floor, gcd
%o A289438 def a(n): return n*max([(floor((d - 1 - gcd(d, 4))/4) + 1)/d for d in divisors(n)])
%o A289438 print([a(n) for n in range(2, 101)]) # _Indranil Ghosh_, Jul 08 2017
%Y A289438 Cf. A289436, A289437.
%K A289438 nonn
%O A289438 2,5
%A A289438 _N. J. A. Sloane_, Jul 07 2017
%E A289438 a(41)-a(70) from _Andrew Howroyd_, Jul 07 2017