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.

Showing 1-8 of 8 results.

A097032 Total length of transient and terminal cycle if unitary-proper-divisor-sum function f(x) = A034460(x) is iterated and the initial value is n. Number of distinct terms in iteration list, including also the terminal 0 in the count if the iteration doesn't end in a cycle.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Aug 30 2004

Keywords

Examples

			From _Antti Karttunen_, Sep 24 2018: (Start)
For n = 1, A034460(1) = 0, thus a(1) = 1+1 = 2.
For n = 2, A034460(2) = 1, and A034460(1) = 0, so we end to the zero after a transient part of length 2, thus a(2) = 2+1 = 3.
For n = 30, A034460(30) = 42, A034460(42) = 54, A034460(54) = 30, thus a(30) = a(42) = a(54) = 0+3 = 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) = 6+14 = 20.
		

Crossrefs

Cf. A002827 (the positions of ones).
Cf. A318882 (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
    a097032[n_] := Map[Length[NestWhileList[a034460, #, UnsameQ, All]]-1&, Range[n]]
    a097032[105] (* Hartmut F. W. Hoft, Jan 24 2024 *)
  • PARI
    A034460(n) = (sumdivmult(n, d, if(gcd(d, n/d)==1, d))-n); \\ From A034460
    A097032(n) = { my(visited = Map()); for(j=1, oo, if(mapisdefined(visited, n), return(j-1), mapput(visited, n, j)); n = A034460(n); if(!n,return(j+1))); }; \\ Antti Karttunen, Sep 23 2018

Formula

a(n) = A318882(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

A318882 Total length of transient and terminal cycle if unitary-proper-divisor-sum function f(x) = A063919(x) is iterated and the initial value is n. Number of distinct terms in iteration list.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 22 2018, after Labos Elemer's A097032

Keywords

Comments

This sequence implements the original definition given for A097032.

Examples

			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) = 0+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+1 = 2.
For n = 30, A063919(30) = 42, A063919(42) = 54, A063919(54) = 30, thus a(30) = a(42) = a(54) = 0+3 = 3, as 30, 42 and 54 are all contained in their own terminal cycle of length 3, without a preceding transient part.
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+14 = 20.
		

Crossrefs

Cf. A002827 (the positions of ones after the initial 1).

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
    a318882[n_] := Map[Length[NestWhileList[a063919, #, UnsameQ, All]]-1&, Range[n]]
    a318882[105] (* Hartmut F. W. Hoft, Jan 25 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));
    A318882(n) = { my(visited = Map()); for(j=1, oo, if(mapisdefined(visited, n), return(j-1), 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); };
    A318882(n) = { my(visited = List([]), k); for(j=1, oo, if((k = pil(n,visited)) > 0, return(j-1)); listput(visited, n); n = A063919(n)); };

Formula

a(n) = A097031(n) + A318883(n).
a(n) = A097032(n) + A318880(n) - 1.

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

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

A318883 Number of transient terms if unitary-proper-divisor-sum-function f(x) = A063919(x) is iterated and the initial value is n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 22 2018, after Labos Elemer's A097033

Keywords

Comments

This sequence implements the original definition given for A097033.

Examples

			For n = 1, A063919(1) = 1, that is, we immediately end with a terminal cycle (of length 1 in this case), thus there are no transient part, and a(1) = 0.
For n = 2, A063919(2) = 1, and A063919(1) = 1, so we end with a terminal cycle 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) = 0, as 30, 42 and 54 are all contained in their own terminal cycle, without a preceding transient part.
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

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
    transient[k_] := Module[{iter=NestWhileList[a063919, k, UnsameQ, All]}, Position[iter, Last[iter]][[1, 1]]]-1
    a318883[n_] := Map[transient, Range[n]]
    a318883[105] (* Hartmut F. W. Hoft, Jan 25 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));
    A318883(n) = { my(visited = Map()); for(j=1, oo, if(mapisdefined(visited, n), return(mapget(visited, n)-1), 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); };
    A318883(n) = { my(visited = List([]), k); for(j=1, oo, if((k = pil(n,visited)) > 0, return(k-1)); listput(visited, n); n = A063919(n)); };

Formula

a(n) = A318882(n) - A097031(n).
a(n) = A097033(n) + A318880(n) - 1.

A327157 Numbers that are members of unitary sigma aliquot cycles (union of unitary perfect, unitary amicable and unitary sociable numbers).

Original entry on oeis.org

6, 30, 42, 54, 60, 90, 114, 126, 1140, 1260, 1482, 1878, 1890, 2142, 2178, 2418, 2958, 3522, 3534, 3582, 3774, 3906, 3954, 3966, 3978, 4146, 4158, 4434, 4446, 18018, 22302, 24180, 29580, 32130, 35220, 35238, 35340, 35820, 37740, 38682, 39060, 39540, 39660, 39780, 40446, 41460, 41580, 44340, 44460, 44772, 45402
Offset: 1

Views

Author

Antti Karttunen, Sep 17 2019

Keywords

Comments

Positions of nonzeros in A327159.
Numbers n for which n = A034460^k(n) for some k >= 1, where A034460^k(n) means k-fold application of A034460 starting from n.
The terms that are not multiples of 6 are: 142310, 168730, 1077890, 1099390, 1156870, 1292570, ..., that seem all to be present in A063991.
Among the first 440 terms, there are numbers present in 1-cycles (A002827), 2-cycles (A063991), and also cycles of sizes 3, 4 (A319902), 5 (A097024), 6 (A319917), 14 (A097030), 25, 26, 39 and 65.

Examples

			6 is a member as A034460(6) = 6.
30 is a member as A034460(A034460(A034460(30))) = 30.
		

Crossrefs

Subsequence of A003062.

Programs

  • Mathematica
    (* Function cycleL[] and support a034460[] are defined in A327159 *)
    a327157[n_] := Map[cycleL, Range[n]]
    a327157[45402] (* Hartmut F. W. Hoft, Feb 04 2024 *)
  • PARI
    A034448(n) = { my(f=factorint(n)); prod(k=1, #f~, 1+(f[k, 1]^f[k, 2])); };
    A034460(n) = (A034448(n) - n);
    memo327159 = Map();
    A327159(n) = if(1==n,0,my(v,orgn=n,xs=Set([])); if(mapisdefined(memo327159, n, &v), v, while(n && !vecsearch(xs,n), xs = setunion([n],xs); n = A034460(n); if(mapisdefined(memo327159,n),for(i=1,#xs,mapput(memo327159,xs[i],0)); return(0))); if(n==orgn,v = length(xs); for(i=1,v,mapput(memo327159,xs[i],v)), v = 0; mapput(memo327159,orgn,v)); (v)));
    k=0; n=0; while(k<=1001, n++; if(t=A327159(n), k++; print(n," -> ",t); write("b327157.txt", k," ", n)));

A327159 Size of the cycle containing n in the map x -> usigma(x)-x or 0 if n is not a member of any finite cycle. Here usigma is the sum of unitary divisors of n (A034448).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 28 2019

Keywords

Examples

			Because A034460(6) = 6, a(6) = 1.
Because A034460(30) = 42, A034460(42) = 54, A034460(54) = 30, a(30) = a(42) = a(54) = 3.
Because A034460(90) = 90, a(90) = 1. Because A034460(78) = 90, a(78) = 0, as even though 78 ends into a cycle of one, it itself is not a part of that cycle.
		

Crossrefs

Cf. A002827 (positions of ones), A063991 (of 2's), A319902 (of 4's), A097024 (of 5's), A319917 (of 6's), A319937 (of 10's), A097030 (of 14's), A327157 (of all nonzero terms).

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
    cycleL[k_] := Module[{nL=NestWhileList[a034460, k, UnsameQ, All]}, If[k==Last[nL], Length[nL]-1, 0]]
    a327159[n_] := Map[cycleL, Range[n]]
    a327159[120] (* Hartmut F. W. Hoft, Feb 04 2024 *)
  • PARI
    A034460(n) = (sumdivmult(n, d, if(gcd(d, n/d)==1, d))-n); \\ From A034460
    A327159(n,orgn=n,xs=Set([])) = if(1==n,0,if(vecsearch(xs,n), if(n==orgn,length(xs),0), xs = setunion([n],xs); A327159(A034460(n),orgn,xs)));

A369895 Irregular triangle of iteration steps of A063919 until the end of the terminal cycle is reached, read by rows.

Original entry on oeis.org

1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 7, 1, 8, 1, 9, 1, 10, 8, 1, 11, 1, 12, 8, 1, 13, 1, 14, 10, 8, 1, 15, 9, 1, 16, 1, 17, 1, 18, 12, 8, 1, 19, 1, 20, 10, 8, 1, 21, 11, 1, 22, 14, 10, 8, 1, 23, 1, 24, 12, 8, 1, 25, 1, 26, 16, 1, 27, 1, 28, 12, 8, 1, 29, 1, 30, 42, 54
Offset: 1

Views

Author

Hartmut F. W. Hoft, Feb 04 2024

Keywords

Examples

			The beginning of the irregular triangle showing 3 terminal cycles ( 1 ), ( 6 ) and ( 30 42 54 ):
  1
  2    1
  3    1
  4    1
  5    1
  6
  7    1
  ...
  14  10   8   1
  ...
  30  42  54
  31  1
  ...
Row 1230 contains a non-monotone iteration that ends in the 5-cycle starting at A097035(3):
1230, 1794, 2238, 2250, 1530, 1710, {1890, 2142, 2178, 1482, 1878 }.
		

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
    iter[k_] := Most[NestWhileList[a063919, k, UnsameQ, All]]
    a369895[n_] := Map[iter, Range[n]]
    a369895[30] (* irregular triangle *)
    Flatten[a369895[30]] (* sequence data *)
Showing 1-8 of 8 results.