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.

A374215 a(n) = A347381(n) - A374214(n).

This page as a plain text file.
%I A374215 #9 Jul 07 2024 13:42:30
%S A374215 0,0,1,1,1,0,3,2,1,3,3,2,2,3,0,3,6,3,5,1,3,5,7,2,2,4,2,0,8,4,10,4,3,7,
%T A374215 1,4,4,7,2,4,10,4,9,4,2,9,13,4,1,4,6,7,15,4,4,5,5,9,15,4,7,10,2,5,3,6,
%U A374215 12,6,7,5,19,5,9,6,3,8,0,5,19,4,2,11,20,4,6,11,8,6,22,4,2,8,10,15,6,5,24,5,2,5,20
%N A374215 a(n) = A347381(n) - A374214(n).
%C A374215 The first negative term is a(1271) = A347381(1271) - A374214(1271) = 9 - 10 = -1. The next ones occur at n=97969, 133907, 142859, 161257, 189209.
%H A374215 Antti Karttunen, <a href="/A374215/b374215.txt">Table of n, a(n) for n = 1..65537</a>
%H A374215 <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>
%o A374215 (PARI)
%o A374215 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
%o A374215 A252463(n) = if(!(n%2),n/2,A064989(n));
%o A374215 A347381(n) = if(1==n,0, my(lista=List([]), i, k=n, stemvec, stemlen, sbr=sigma(n)); while(k>1, listput(lista,k); k = A252463(k)); stemvec = Vecrev(Vec(lista)); stemlen = #stemvec; while(1, if((i=vecsearch(stemvec,sbr))>0, return(stemlen-i)); sbr = A252463(sbr)));
%o A374215 A374214(n) = { my(m=-1,x); fordiv(n,d,if(d>1 && d<n, x = A347381(d); if(m<0 || x<m, m=x))); if(-1==m,0,m); };
%o A374215 A374215(n) = (A347381(n)-A374214(n));
%Y A374215 Cf. A005940, A347381, A374214, A374218 (indices of nonpositive terms).
%K A374215 sign
%O A374215 1,7
%A A374215 _Antti Karttunen_, Jul 07 2024