A063976 Duplicate of A064000.
2, 7, 11, 13, 15, 16, 19, 21, 22, 23, 25, 27, 29, 31, 34, 35, 37, 39, 41, 43, 45, 46, 47, 49
Offset: 1
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.
Unitary divisors of 12 are 1, 3, 4, 12. Or, 12=3*2^2 hence usigma(12)=(3+1)*(2^2+1)=20.
a034448 = sum . a077610_row -- Reinhard Zumkeller, Feb 12 2012 (Python 3.8+) from math import prod from sympy import factorint def A034448(n): return prod(p**e+1 for p, e in factorint(n).items()) # Chai Wah Wu, Jun 20 2021
A034448 := proc(n) local ans, i:ans := 1: for i from 1 to nops(ifactors(n)[ 2 ]) do ans := ans*(1+ifactors(n)[ 2 ][ i ][ 1 ]^ifactors(n)[ 2 ] [ i ] [ 2 ]): od: RETURN(ans) end: a := proc(n) local i; numtheory[divisors](n); select(d -> igcd(d,n/d)=1, %); add(i,i=%) end; # Peter Luschny, May 03 2009
usigma[n_] := Block[{d = Divisors[n]}, Plus @@ Select[d, GCD[ #, n/# ] == 1 &]]; Table[ usigma[n], {n, 71}] (* Robert G. Wilson v, Aug 28 2004 *) Table[DivisorSum[n, # &, CoprimeQ[#, n/#] &], {n, 70}] (* Michael De Vlieger, Mar 01 2017 *) usigma[n_] := If[n == 1, 1, Times @@ (1 + Power @@@ FactorInteger[n])]; Array[usigma, 100] (* faster since avoids generating divisors, Giovanni Resta, Apr 23 2017 *)
A034448(n)=sumdiv(n,d,if(gcd(d,n/d)==1,d)) \\ Rick L. Shepherd
A034448(n) = {my(f=factorint(n)); prod(k=1, #f[,2], f[k,1]^f[k,2]+1)} \\ Andrew Lelechenko, Apr 22 2014
a(n)=sumdivmult(n,d,if(gcd(d,n/d)==1,d)) \\ Charles R Greathouse IV, Sep 09 2014
untouchableQ[n_] := Catch[ Do[ If[n == DivisorSigma[1, k]-k, Throw[True]], {k, 0, (n-1)^2}]] === Null; Reap[ Table[ If[ untouchableQ[n], Print[n]; Sow[n]], {n, 2, 700}]][[2, 1]] (* Jean-François Alcover, Jun 29 2012, after Benoit Cloitre *)
isA078923(n)=if(n==0 || n==1, return(1)); for(m=1,(n-1)^2, if( sigma(m)-m == n, return(1))); 0 isA005114(n)=!isA078923(n) for(n=1,700, if (isA005114(n), print(n))) \\ R. J. Mathar, Aug 10 2006
is(n)=if(n%2 && n<4e18, return(n==5)); forfactored(m=1,(n-1)^2, if(sigma(m)-m[1]==n, return(0))); 1 \\ Charles R Greathouse IV, Dec 05 2022
from sympy import divisor_sigma as sigma from functools import cache @cache def f(m): return sigma(m)-m def okA005114(n): if n < 2: return 0 return not any(f(m) == n for m in range(1, (n-1)**2+1)) print([k for k in range(289) if okA005114(k)]) # Michael S. Branicky, Nov 16 2024
# faster for intial segment of sequence from itertools import count, islice from sympy import divisor_sigma as sigma def agen(): # generator of terms n, touchable, t = 2, {0, 1}, 1 for m in count(2): touchable.add(sigma(m)-m) while m > t: if n not in touchable: yield n else: touchable.discard(n) n += 1 t = (n-1)**2 print(list(islice(agen(), 20))) # Michael S. Branicky, Nov 16 2024
us[x_] := us[x] = Total[ Select[ Divisors[x], GCD[#, x/#] == 1 &]] - x; us[1] = 1; usQ[n_] := With[{xm = Ceiling[n^2/4]}, Catch[ Do[ If[us[x] == n, Throw[True]]; If[x == xm, Throw[False]], {x, 1, xm}]]]; A063948 = Reap[ Do[ If[ !usQ[n], Print[n]; Sow[n]], {n, 1, 6600}]][[2, 1]] (* Jean-François Alcover, Jun 22 2012 *)
usigma[n_] := Times @@ (1 + Power @@@ FactorInteger[n]); usigma[1] = 1; seq[max_] := TakeWhile[Union[Array[usigma, max]], # <= max &]; seq[160] (* Amiram Eldar, Jul 22 2024 *)
usigma(n) = {my(f = factor(n)); prod(i = 1, #f~, 1 + f[i, 1]^f[i, 2]);} lista(nmax) = Set(select(x -> x <= nmax, vector(nmax, i, usigma(i)))); \\ Amiram Eldar, Jul 22 2024
sort(convert({$1..1000} minus map(numtheory:-sigma, select(numtheory:-issqrfree, {$1..1000})),list)); # Robert Israel, Jun 26 2018
TakeWhile[Complement[Range@ #, Union@ Table[Total@ Select[Divisors@ n, SquareFreeQ], {n, 2 #}]], Function[k, k <= #]] &@ 111
usigma[1] = 1; usigma[n_] := Times @@ (1 + Power @@@ FactorInteger[n]); m = 300; v = Table[ 0, {m}]; Do[u = usigma[k]; If[u <= m, v[[u]]++], {k, 1, m}]; Position[v, _?(# == 1 &)]//Flatten
Comments