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.

Previous Showing 11-20 of 45 results. Next

A097031 Length of terminal cycle if unitary-proper-divisor-sum function f(x) = A063919(x) is iterated and the initial value is n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Labos Elemer, Aug 30 2004

Keywords

Examples

			From _Antti Karttunen_, Sep 22 2018: (Start)
For n = 1, A063919(1) = 1, that is, we immediately end with a terminal cycle of length 1 without a preceding transient part, thus a(1) = 1.
For n = 2, A063919(2) = 1, and A063919(1) = 1, so we end with a terminal cycle of length 1 (after a transient part of length 1) thus a(2) = 1.
For n = 30, A063919(30) = 42, A063919(42) = 54, A063919(54) = 30, thus a(30) = a(42) = a(54) = 3, as 30, 42 and 54 are all contained in their own terminal cycle of length 3, without a preceding transient part. (End)
For n = 1506, the iteration-list is {1506, 1518, 1938, 2382, 2394, 2406, [2418, 2958, 3522, 3534, 4146, 4158, 3906, 3774, 4434, 4446, 3954, 3966, 3978, 3582, 2418, ..., ad infinitum]}. After a transient of length 6 the iteration ends in a cycle of length 14, thus a(1506) = 14.
		

Crossrefs

Programs

  • Mathematica
    a063919[1] = 1; (* function a[] in A063919 by Jean-François Alcover *)
    a063919[n_] := Total[Select[Divisors[n], GCD[#, n/#]==1&]]-n/;n>1
    cycleLength[k_] := Module[{cycle=NestWhileList[a063919, k, UnsameQ, All]}, Apply[Subtract, Reverse[Flatten[Position[cycle, Last[cycle]], 1]]]]
    a097031[n_] := Map[cycleLength, Range[n]]
    a097031[105] (* Hartmut F. W. Hoft, Jan 24 2024 *)
  • PARI
    A034460(n) = (sumdivmult(n, d, if(gcd(d, n/d)==1, d))-n); \\ From A034460
    A063919(n) = if(1==n,n,A034460(n));
    A097031(n) = { my(visited = Map()); for(j=1, oo, if(mapisdefined(visited, n), return(j-mapget(visited, n)), mapput(visited, n, j)); n = A063919(n)); };
    \\ Or by using lists:
    pil(item,lista) = { for(i=1,#lista,if(lista[i]==item,return(i))); (0); };
    A097031(n) = { my(visited = List([]), k); for(j=1, oo, if((k = pil(n,visited)) > 0, return(j-k)); listput(visited, n); n = A063919(n)); }; \\ Antti Karttunen, Sep 22 2018

Formula

a(n) = A318882(n) - A318883(n). - Antti Karttunen, Sep 22 2018

A097036 Initial values for iteration of A063919[x] function such that iteration ends in a 3-cycle.

Original entry on oeis.org

30, 42, 54, 100, 140, 148, 194, 196, 208, 220, 238, 252, 274, 288, 300, 336, 348, 350, 364, 374, 380, 382, 386, 400, 420, 440, 492, 516, 528, 540, 542, 550, 592, 600, 612, 660, 694, 708, 720, 722, 740, 756, 758, 764, 766, 780, 792, 794, 820, 836, 900, 932
Offset: 1

Views

Author

Labos Elemer, Aug 30 2004

Keywords

Examples

			n=100: list={100, [30, 42, 54], 30, ... after 1 transient a 3-cycle arises.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := If[n > 1, Times @@ (1 + Power @@@ FactorInteger[n]) - n, 0]; useq[n_] := Most[NestWhileList[s, n, UnsameQ, All]]; cycleQ[k_] := Module[{s1 = s[k]}, s1 != k && s[s[s1]] == k]; aQ[n_] := cycleQ[Last[useq[n]]]; Select[Range[1000], aQ] (* Amiram Eldar, Apr 06 2019 *)

A327158 Unitary multiply-perfect numbers: n divides usigma(n), where usigma is the sum of unitary divisors of n (A034448).

Original entry on oeis.org

1, 6, 60, 90, 87360
Offset: 1

Views

Author

Antti Karttunen, Aug 28 2019

Keywords

Comments

10^13 < a(6) <= 146361946186458562560000. - Giovanni Resta, Aug 29 2019

Crossrefs

Fixed points of A323166, positions of zeros in A327164.
Cf. A002827 (a subsequence), A034448, A327163.
Cf. also A007691.

Programs

  • PARI
    A034448(n) = { my(f=factorint(n)); prod(k=1, #f~, 1+(f[k, 1]^f[k, 2])); }; \\ After code in A034448
    isA327158(n) = (gcd(n,A034448(n))==n);

A003062 Beginnings of periodic unitary aliquot sequences.

Original entry on oeis.org

6, 30, 42, 54, 60, 66, 78, 90, 100, 102, 114, 126, 140, 148, 194, 196, 208, 220, 238, 244, 252, 274, 288, 292, 300, 336, 348, 350, 364, 374, 380, 382, 386, 388, 400, 420, 436, 440, 476, 482, 484, 492, 516, 528, 540, 542, 550, 570, 578, 592, 600, 612, 648, 660, 680, 688, 694, 708, 720, 722, 740, 756, 758, 764, 766, 770, 780, 784, 792, 794, 812
Offset: 1

Views

Author

Keywords

Comments

Provided that A034460 has no infinite unbounded trajectories, these are also numbers m such that when iterating the map k -> A034460(k), starting from k = m, the iteration will never reach 0, that is, will instead eventually enter into a finite cycle. - Antti Karttunen, Sep 23 2018

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A034460, A097010 (complement), A318880 (characteristic function).

Programs

  • Mathematica
    a034460[0] = 0; (* avoids dividing by 0 when an iteration reaches 0 *)
    a034460[n_] := Total[Select[Divisors[n], GCD[#, n/#]==1&]]-n/;n>0
    periodicQ[k_] := NestWhile[a034460, k, UnsameQ, All]!=0
    nmax = 812; Select[Range[nmax], periodicQ]
    (* Hartmut F. W. Hoft, Jan 24 2024 *)
  • PARI
    up_to = 20000;
    A034460(n) = (sumdivmult(n, d, if(gcd(d, n/d)==1, d))-n); \\ From A034460
    A318880(n) = { my(visited = Map()); for(j=1, oo, if(mapisdefined(visited, n), return(1), mapput(visited, n, j)); n = A034460(n); if(!n,return(0))); };
    A003062list(up_to) = { my(v = vector(up_to), k=0, n=1); while(kA318880(n), k++; v[k] = n); n++); (v); };
    v003062 = A003062list(up_to);
    A003062(n) = v003062[n]; \\ Antti Karttunen, Sep 23 2018

Extensions

More terms from Antti Karttunen, Sep 23 2018

A129468 Unitary abundance of n.

Original entry on oeis.org

-1, -1, -2, -3, -4, 0, -6, -7, -8, -2, -10, -4, -12, -4, -6, -15, -16, -6, -18, -10, -10, -8, -22, -12, -24, -10, -26, -16, -28, 12, -30, -31, -18, -14, -22, -22, -36, -16, -22, -26, -40, 12, -42, -28, -30, -20, -46, -28, -48, -22, -30, -34, -52, -24
Offset: 1

Views

Author

Ant King, Apr 17 2007

Keywords

Comments

The values of n which generate negative elements of this sequence are in A129487, the values of n which generate the zeros of this sequence are in A002827 and the values of n which generate positive elements of this sequence are in A034683

Examples

			As the unitary divisors of 12 are 1, 3, 4 and 12, which sum to 20, then a(12) = 20 - 2*12 = -4.
		

Crossrefs

Programs

  • Maple
    A129468 := proc(n)
        A034448(n)-2*n ;
    end proc:
    seq(A129468(n),n=1..40) ; # R. J. Mathar, Nov 10 2014
  • Mathematica
    UnitaryDivisors[n_Integer?Positive] := Select[Divisors[n], GCD[ #,n/# ] == 1&]; sstar[n_] := Plus@@UnitaryDivisors[n] - n; sstar[ # ] - # &/@ Range[40]
    a[n_] := Times @@ (1 + Power @@@ FactorInteger[n]) - 2*n; a[1] = -1; Array[a, 100] (* Amiram Eldar, Apr 06 2024 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i=1, #f~, 1 + f[i, 1]^f[i, 2]) - 2*n; } \\ Amiram Eldar, Apr 06 2024

Formula

a(n) = A034460(n) - n = A034448(n) - 2n.
From Amiram Eldar, Apr 06 2024: (Start)
a(A129487(n)) < 0.
a(A002827(n)) = 0.
a(A034683(n)) > 0.
Sum_{k=1..n} a(k) ~ c * n^2, where c = zeta(2)/(2*zeta(3)) - 1 = -0.3157836111... . (End)

A319902 Unitary sociable numbers of order 4.

Original entry on oeis.org

263820, 263940, 280380, 280500, 395730, 395910, 420570, 420750, 172459210, 209524210, 218628662, 218725430, 230143790, 231439570, 246667790, 272130250, 384121920, 384296640, 408233280, 408408000
Offset: 1

Views

Author

Michel Marcus, Oct 01 2018

Keywords

Comments

Is this a duplicate of A098188? - R. J. Mathar, Oct 04 2018
Note that the first 4 terms and the next 4 terms form two sociable groups. But then the next 8 terms belong to two distinct sociable groups, whereas in A098188 the integers are grouped by cycle.
From Hartmut F. W. Hoft, Aug 23 2023: (Start)
This sequence is A098188 in ascending order.
Among the 19 4-cycles listed in the link by J. O. M. Pedersen only four of the 6 possible patterns of relative sizes of the numbers in a cycle are realized. (End)

Crossrefs

Cf. A063919 (sum of proper unitary divisors).
Cf. A002827 (unitary perfect), A063991 (unitary amicable).
Cf. A097024 (order 5), A097030 (order 14).
Cf. A090615 (least member of sociable quadruples).
Cf. A098188.

Programs

  • Mathematica
    f[n_] := f[n] = Module[{s = 0}, s = Total[Select[Divisors[n], GCD[#, n/#] == 1 &]]; Return[s - n]]; isok1[n_] := isok1[n] = Quiet[Check[f[n] == n, 0]]; isok2[n_] := isok2[n] = Quiet[Check[f[f[n]] == n, 0]]; isok4[n_] := isok4[n] = Quiet[Check[f[f[f[f[n]]]] == n, 0]]; isok[n_] := isok[n] = isok4[n] && Not[isok1[n]] && Not[isok2[n]]; Monitor[Position[Table[isok[n], {n, 1, 408408000}], True], n] (* Robert P. P. McKone, Aug 24 2023 *)
  • PARI
    f(n) = sumdiv(n, d, if(gcd(d, n/d)==1, d)) - n;
    isok4(n) = iferr(f(f(f(f(n)))) == n, E, 0);
    isok2(n) = iferr(f(f(n)) == n, E, 0);
    isok1(n) = iferr(f(n) == n, E, 0);
    isok(n) = isok4(n) && !isok1(n) && !isok2(n);

A097010 Numbers n such that zero is eventually reached when the map x -> A034460(x) is iterated, starting from x = n.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79
Offset: 1

Views

Author

Labos Elemer, Aug 31 2004

Keywords

Comments

Numbers n for which A318880(n) = 0. - Antti Karttunen, Sep 23 2018
The sequence doesn't contain any numbers from attractor sets like A002827, A063991, A097024, A097030, etc, nor any number x such that the iteration of the map x -> A034460(x) would lead to such an attractor set (e.g., numbers in A097034 - A097037). - Antti Karttunen, Sep 24 2018, after the original author's example.

Crossrefs

Cf. A003062 (complement), A318880.
Differs from A129487 for the first time at n=51, as A129487(51) = 54, but that term is lacking here, as in this sequence a(51) = 55.

Programs

  • Mathematica
    di[x_] :=Divisors[x];ta={{0}}; ud[x_] :=Part[di[x],Flatten[Position[GCD[di[x],Reverse[di[x]]],1]]]; asu[x_] :=Apply[Plus,ud[x]]-x;nsf[x_,ho_] :=NestList[asu,x,ho] Do[g=n;s=Last[NestList[asu,n,100]];If[Equal[s,0],Print[{n,s}]; ta=Append[ta,n]],{n,1,256}];ta = Delete[ta,1]
  • PARI
    up_to = 10000;
    A034460(n) = (sumdivmult(n, d, if(gcd(d, n/d)==1, d))-n); \\ From A034460
    A318880(n) = { my(visited = Map()); for(j=1, oo, if(mapisdefined(visited, n), return(1), mapput(visited, n, j)); n = A034460(n); if(!n,return(0))); };
    A097010list(up_to) = { my(v = vector(up_to), k=0, n=1); while(kA318880(n), k++; v[k] = n); n++); (v); };
    v097010 = A097010list(up_to);
    A097010(n) = v097010[n]; \\ Antti Karttunen, Sep 24 2018

Extensions

Edited by Antti Karttunen, Sep 24 2018

A322609 Numbers k such that s(k) = 2*k, where s(k) is the sum of divisors of k that have a square factor (A162296).

Original entry on oeis.org

24, 54, 112, 150, 294, 726, 1014, 1734, 1984, 2166, 3174, 5046, 5766, 8214, 10086, 11094, 13254, 16854, 19900, 20886, 22326, 26934, 30246, 31974, 32512, 37446, 41334, 47526, 56454, 61206, 63654, 68694, 71286, 76614, 96774, 102966, 112614, 115926, 133206
Offset: 1

Views

Author

Amiram Eldar, Dec 20 2018

Keywords

Comments

This sequence is infinite since 6*p^2 is included for all primes p. Terms that are not of the form 6*p^2: 112, 1984, 19900, 32512, 134201344, ...
Includes 4*k if k is an even perfect number: see A000396. - Robert Israel, Jan 06 2019
From Amiram Eldar, Oct 01 2022: (Start)
24 = 6*prime(1)^2 = 4*A000396(1) is the only term that is common to the two forms that are mentioned above.
19900 is the only term below 10^11 which is not of any of these two forms. Are there any other such terms?
All the known nonunitary perfect numbers (A064591) are also of the form 4*k, where k is an even perfect number.
Equivalently, numbers k such that A325314(k) = -k. (End)

Examples

			24 is a term since A162296(24) = 48 = 2*24.
		

Crossrefs

Subsequence of A005101 and A013929.
Numbers k such that A162296(k) = m*k: A005117 (m=0), A001248 (m=1), this sequence (m=2), A357493 (m=3), A357494 (m=4).

Programs

  • Maple
    filter:= proc(n) convert(remove(numtheory:-issqrfree,numtheory:-divisors(n)),`+`)=2*n end proc:
    select(filter, [$1..200000]); # Robert Israel, Jan 06 2019
  • Mathematica
    s[1]=0; s[n_] := DivisorSigma[1,n] - Times@@(1+FactorInteger[n][[;;,1]]); Select[Range[10000], s[#] == 2# &]
  • PARI
    s(n) = sumdiv(n, d, d*(1-moebius(d)^2)); \\ A162296
    isok(n) = s(n) == 2*n; \\ Michel Marcus, Dec 20 2018
    
  • Python
    from sympy import divisors, factorint
    A322609_list = [k for k in range(1,10**3) if sum(d for d in divisors(k,generator=True) if max(factorint(d).values(),default=1) >= 2) == 2*k] # Chai Wah Wu, Sep 19 2021

A324707 Tri-unitary perfect numbers: numbers k such that tsigma(k) = 2k, where tsigma(k) is the sum of the tri-unitary divisors of k (A324706).

Original entry on oeis.org

6, 60, 90, 36720, 47520, 8173440, 22276800, 126463680, 597542400, 4201148160, 287704872000, 1632485836800
Offset: 1

Views

Author

Amiram Eldar, Mar 11 2019

Keywords

Comments

Also in the sequence is 21623407345626345971712000.
a(13) > 5*10^12. - Giovanni Resta, Mar 14 2019

Examples

			36720 is in the sequence since its sum of tri-unitary divisors is A324706(36720) = 73440 = 2 * 36720.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 3, (p^4-1)/(p-1), If[e==6, (p^8-1)/(p^2-1), p^e+1]]; tsigma[1]=1; tsigma[n_]:= Times @@ f @@@ FactorInteger[n]; Select[Range[50000], tsigma[#]==2# &]

Extensions

a(11)-a(12) from Giovanni Resta, Mar 14 2019

A097033 Number of transient terms before either 0 or a finite cycle is reached when unitary-proper-divisor-sum-function f(x) = A034460(x) is iterated and the initial value is n.

Original entry on oeis.org

1, 2, 2, 2, 2, 0, 2, 2, 2, 3, 2, 3, 2, 4, 3, 2, 2, 4, 2, 4, 3, 5, 2, 4, 2, 3, 2, 4, 2, 0, 2, 2, 4, 5, 3, 5, 2, 6, 3, 5, 2, 0, 2, 3, 4, 4, 2, 5, 2, 5, 4, 5, 2, 0, 3, 3, 3, 3, 2, 0, 2, 6, 3, 2, 3, 2, 2, 6, 3, 7, 2, 5, 2, 6, 3, 5, 3, 1, 2, 6, 2, 4, 2, 6, 3, 5, 5, 5, 2, 0, 4, 5, 4, 6, 3, 6, 2, 6, 4, 1, 2, 1, 2, 6, 6
Offset: 1

Views

Author

Labos Elemer, Aug 30 2004

Keywords

Examples

			From _Antti Karttunen_, Sep 24 2018: (Start)
For n = 1, A034460(1) = 0 that is, we end to a terminal zero after a transient part of length 1, thus a(1) = 1.
For n = 2, A034460(2) = 1, and A034460(1) = 0, so we end to a terminal zero after a transient part of length 2, thus a(2) = 2.
For n = 30, A034460(30) = 42, A034460(42) = 54, A034460(54) = 30, thus a(30) = a(42) = a(54) = 0, as 30, 42 and 54 are all contained in their own terminal cycle, without a preceding transient part. (End)
For n = 1506, the iteration-list is {1506, 1518, 1938, 2382, 2394, 2406, [2418, 2958, 3522, 3534, 4146, 4158, 3906, 3774, 4434, 4446, 3954, 3966, 3978, 3582, 2418, ..., ad infinitum]}. After a transient of length 6 the iteration ends in a cycle of length 14, thus a(1506) = 6.
If a(n) = 0, then n is a term in an attractor set like A002827, A063991, A097024, A097030.
		

Crossrefs

Cf. A318883 (sequence that implements the original definition of this sequence).

Programs

  • Mathematica
    a034460[0] = 0; (* avoids dividing by 0 when an iteration reaches 0 *)
    a034460[n_] := Total[Select[Divisors[n], GCD[#, n/#]==1&]]-n/;n>0
    transient[k_] := Module[{iter=NestWhileList[a034460, k, UnsameQ, All]}, Position[iter, Last[iter]][[1, 1]]-1]
    a097033[n_] := Map[transient, Range[n]]
    a097033[105] (* Hartmut F. W. Hoft, Jan 24 2024 *)
  • PARI
    A034460(n) = (sumdivmult(n, d, if(gcd(d, n/d)==1, d))-n); \\ From A034460
    A097033(n) = { my(visited = Map()); for(j=1, oo, if(mapisdefined(visited, n), return(mapget(visited, n)-1), mapput(visited, n, j)); n = A034460(n); if(!n,return(j))); }; \\ Antti Karttunen, Sep 23 2018

Formula

a(n) = A318883(n) + (1-A318880(n)). - Antti Karttunen, Sep 23 2018

Extensions

Definition corrected (to agree with the given terms) by Antti Karttunen, Sep 23 2018, based on observations by Hartmut F. W. Hoft
Previous Showing 11-20 of 45 results. Next