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.

A292770 If sigma(n)+phi(n) is even then a(n) = (sigma(n)+phi(n))/2 otherwise -1.

This page as a plain text file.
%I A292770 #16 Dec 06 2024 07:01:18
%S A292770 1,2,3,-1,5,7,7,-1,-1,11,11,16,13,15,16,-1,17,-1,19,25,22,23,23,34,-1,
%T A292770 27,29,34,29,40,31,-1,34,35,36,-1,37,39,40,53,41,54,43,52,51,47,47,70,
%U A292770 -1,-1,52,61,53,69,56,72,58,59,59,92,61,63,70,-1,66,82,67,79,70,84,71,-1,73,75,82,88,78,96
%N A292770 If sigma(n)+phi(n) is even then a(n) = (sigma(n)+phi(n))/2 otherwise -1.
%H A292770 Robert Israel, <a href="/A292770/b292770.txt">Table of n, a(n) for n = 1..10000</a>
%F A292770 a(n) = -1 if and only if n is in A028982 \ {1, 2}. - _Amiram Eldar_, Dec 06 2024
%p A292770 f:= proc(n) local v;
%p A292770    v:= numtheory:-sigma(n)+numtheory:-phi(n);
%p A292770    if v::even then v/2 else -1 fi
%p A292770 end proc:
%p A292770 map(f, [$1..100]); # _Robert Israel_, Sep 28 2017
%t A292770 Table[If[EvenQ[DivisorSigma[1,n]+EulerPhi[n]],(DivisorSigma[1,n]+EulerPhi[n])/2,-1],{n,120}] (* _Harvey P. Dale_, Jun 19 2022 *)
%o A292770 (PARI) a(n) = {my(f = factor(n), s = sigma(f) + eulerphi(f)); if(s%2, -1, s/2);} \\ _Amiram Eldar_, Dec 06 2024
%Y A292770 Cf. A000010, A000203, A028982, A065387, A291790, A292108, A292766, A292771.
%K A292770 sign,easy
%O A292770 1,2
%A A292770 _N. J. A. Sloane_, Sep 28 2017